diff options
author | Laszlo Csomor <laszlocsomor@google.com> | 2018-08-14 08:29:29 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-08-14 08:31:03 -0700 |
commit | 9a933772e87dfcf684590eb74eee9970e8b66669 (patch) | |
tree | e1aa9f9bd258af2415b3659e05f6db7fbac0f9de /src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java | |
parent | 4d57f86c3df2c36763cf9cf92b8cfd206a7153b6 (diff) |
test-wrapper: add empty impl + Bazel flag
This commit adds:
- the skeleton implementation of the Windows
native test wrapper
- a depenency on the native test wrapper from test
rules, through the new $test_wrapper rule
attribute
- the --windows_native_test_wrapper Bazel flag,
which is currently a no-op
See https://github.com/bazelbuild/bazel/issues/5508
Change-Id: I8df95c8ce8bab53c51c257698ec95416065a836e
Closes #5854.
Change-Id: I2ffc78bceec5dd867af775b5878f105fa87c3dba
PiperOrigin-RevId: 208650699
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java index 0d2f85b1cb..fe60cc1f39 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/test/TestConfiguration.java @@ -216,6 +216,23 @@ public class TestConfiguration extends Fragment { ) public Label coverageReportGenerator; + @Option( + name = "windows_native_test_wrapper", + // Undocumented: this features is under development and not yet ready for production use. + // We define the flag to be able to test the feature. + // Design: + // https://github.com/laszlocsomor/proposals/blob/win-test-runner/designs/2018-07-18-windows-native-test-runner.md + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + // Affects loading and analysis: this flag affects which target Bazel loads and creates test + // actions with on Windows. + effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS}, + defaultValue = "false", + help = + "Do not use yet, this flag's functionality is not yet implemented. " + + "(On Windows: if true, uses the C++ test wrapper to run tests, otherwise uses " + + "tools/test/test-setup.sh as on other platforms. On other platforms: no-op.)") + public boolean windowsNativeTestWrapper; + @Override public Map<String, Set<Label>> getDefaultsLabels() { return ImmutableMap.<String, Set<Label>>of( @@ -298,6 +315,10 @@ public class TestConfiguration extends Fragment { return options.coverageReportGenerator; } + public boolean isUsingWindowsNativeTestWrapper() { + return options.windowsNativeTestWrapper; + } + /** * @return number of times the given test should run. If the test doesn't match any of the * filters, runs it once. |