diff options
author | Rahat Mahmood <rahat@google.com> | 2020-09-29 17:27:16 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-29 17:29:08 -0700 |
commit | fee2c0772811d1c6de5fc9d3a754108994f4c4ab (patch) | |
tree | 78cadb5871e4f15be17f52cb4a49c863ad0d06e6 /pkg/sentry/fsimpl/testutil | |
parent | 6ae83404afcfdcc02966487973eef354969984f5 (diff) |
go-marshal tests should respect build tags.
Previously, the go-marshal-generated tests did not respect build
tags. This can cause the test to unbuildable under some build
configurations, as the original types the tests refer to may not be
defined.
This CL copies the build tags from the input files to the test,
similar to the generated library; however test packages have an
additional constraint. A test package cannot be totally empty
(i.e. have no test/example/benchmark defined), otherwise the go
compiler returns an error. To ensure the generated test package always
contains a testable entity under all build configurations, we now emit
an extra test file with no build tags that contains a single no-op
example.
PiperOrigin-RevId: 334496821
Diffstat (limited to 'pkg/sentry/fsimpl/testutil')
0 files changed, 0 insertions, 0 deletions