Skip to content

Commit

Permalink
tests,windows: enable android.desugar.runtime
Browse files Browse the repository at this point in the history
Add the j.c.g.d.build.android.desugar.runtime
tests to the transitive closure of
//src:all_windows_tests, thus running them on CI.

See bazelbuild#4292
  • Loading branch information
laszlocsomor committed Mar 8, 2018
1 parent a2fc4e3 commit 2ce53c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Expand Up @@ -28,9 +28,8 @@ java_test(
srcs = ["ThrowableExtensionTest.java"],
jvm_flags = [
"-Dfortest.simulated.android.sdk_int=18",
"'-Dexpected.strategy=com.google.devtools.build.android.desugar.runtime.ThrowableExtension$$MimicDesugaringStrategy'",
"-Dexpected.strategy='com.google.devtools.build.android.desugar.runtime.ThrowableExtension$$MimicDesugaringStrategy'",
],
tags = ["no_windows"],
test_class = "com.google.devtools.build.android.desugar.runtime.ThrowableExtensionTest",
deps = [
":throwable_extension_test_utility",
Expand All @@ -50,9 +49,8 @@ java_test(
jvm_flags = [
"-Dfortest.simulated.android.sdk_int=18",
"-Dcom.google.devtools.build.android.desugar.runtime.twr_disable_mimic=true",
"'-Dexpected.strategy=com.google.devtools.build.android.desugar.runtime.ThrowableExtension$$NullDesugaringStrategy'",
"-Dexpected.strategy='com.google.devtools.build.android.desugar.runtime.ThrowableExtension$$NullDesugaringStrategy'",
],
tags = ["no_windows"],
test_class = "com.google.devtools.build.android.desugar.runtime.ThrowableExtensionTest",
deps = [
":throwable_extension_test_utility",
Expand All @@ -71,9 +69,8 @@ java_test(
srcs = ["ThrowableExtensionTest.java"],
jvm_flags = [
"-Dfortest.simulated.android.sdk_int=19",
"'-Dexpected.strategy=com.google.devtools.build.android.desugar.runtime.ThrowableExtension$$ReuseDesugaringStrategy'",
"-Dexpected.strategy='com.google.devtools.build.android.desugar.runtime.ThrowableExtension$$ReuseDesugaringStrategy'",
],
tags = ["no_windows"],
test_class = "com.google.devtools.build.android.desugar.runtime.ThrowableExtensionTest",
deps = [
":throwable_extension_test_utility",
Expand Down
Expand Up @@ -28,6 +28,10 @@ public class ThrowableExtensionTestUtility {

public static String getTwrStrategyClassNameSpecifiedInSystemProperty() {
String className = System.getProperty(SYSTEM_PROPERTY_EXPECTED_STRATEGY);
if (className.startsWith("'") || className.startsWith("\"")) {
assertThat(className).endsWith(className.substring(0, 1));
className = className.substring(1, className.length() - 1);
}
assertThat(className).isNotEmpty();
return className;
}
Expand Down

0 comments on commit 2ce53c4

Please sign in to comment.