From 278a10a06783ed12b467b32245443c77447f6b51 Mon Sep 17 00:00:00 2001 From: softprops Date: Tue, 19 Jun 2018 23:42:53 -0400 Subject: [PATCH 1/2] scala => scalarules so that we can refer to scala std lib in java --- test/A.scala | 2 +- test/BUILD | 98 +++++++++--------- test/D.scala | 2 +- test/DataRoot1.scala | 2 +- test/DataRoot2.scala | 2 +- test/Exported.scala | 4 +- test/HelloLib.scala | 2 +- test/HelloLibTest.scala | 2 +- test/HelloLibTest2.scala | 2 +- test/JavaBinary.java | 2 +- test/LibToBin.scala | 2 +- test/LibToTest.scala | 2 +- test/MacroTest.scala | 2 +- test/OtherJavaLib.java | 2 +- test/OtherLib.scala | 2 +- test/Runtime.scala | 2 +- test/ScalaBinary.scala | 2 +- test/SuiteUsage.scala | 2 +- test/TestFilterTestA.scala | 2 +- test/TestFilterTestB.scala | 2 +- .../{scala => scalarules}/test/BUILD | 0 .../resources/{scala => scalarules}/test/byes | 0 .../test/classpath_resource1/BUILD | 0 .../classpath_resource1/classpath-resource | 0 .../test/classpath_resource2/BUILD | 0 .../classpath_resource2/classpath-resource | 0 .../{scala => scalarules}/test/hellos | 0 .../test/hellos-and-byes.jar | Bin .../{scala => scalarules}/test/more-byes | 0 .../{scala => scalarules}/test/more-hellos | 0 .../scala/test/classpath_resources/BUILD | 24 ----- .../test/junit/support/JUnitRuntimeDep.scala | 2 - .../scala/scala/test/mix_java_scala/Bar.scala | 3 - .../scala/test/mix_java_scala/Baz.srcjar | Bin 193 -> 0 bytes .../scala/test/srcjars/SourceJar1.srcjar | Bin 320 -> 0 bytes .../test/strict_deps/no_recompilation/A.scala | 7 -- .../test/strict_deps/no_recompilation/B.scala | 7 -- .../test/strict_deps/no_recompilation/C.scala | 7 -- .../test/twitter_scrooge/JustScrooge1.scala | 14 --- .../test/twitter_scrooge/JustScrooge2a.scala | 8 -- .../test/twitter_scrooge/JustScrooge2b.scala | 12 --- .../test/twitter_scrooge/JustScrooge3.scala | 7 -- .../scala/test/twitter_scrooge/Mixed.scala | 20 ---- .../scala/test/twitter_scrooge/Scrooge2.scala | 8 -- .../prefix_test/a/b/c/d/A.thrift | 5 - .../test/BinaryDependentOnJava.scala | 2 +- .../test/MixJavaScalaLibBinary.scala | 2 +- .../test/ResourcesStripScalaBinary.scala | 2 +- .../test/ResourcesStripScalaLib.scala | 8 +- .../test/ScalaLibBinary.scala | 2 +- .../test/ScalaLibResources.scala | 2 +- .../scalarules/test/classpath_resources/BUILD | 24 +++++ .../ObjectWithClasspathResources.scala | 2 +- ...bjectWithDuplicateClasspathResources.scala | 2 +- .../disappearing_class/ClassProvider.scala | 2 +- .../{scala => scalarules}/test/ijar/A.scala | 4 +- .../{scala => scalarules}/test/ijar/B.scala | 2 +- .../{scala => scalarules}/test/ijar/BUILD | 0 .../{scala => scalarules}/test/ijar/C.java | 2 +- .../test/junit/FilterTest.scala | 2 +- .../JunitAbstractClassAndInterface.scala | 4 +- .../test/junit/JunitCustomRunner.java | 2 +- .../test/junit/JunitCustomRunnerTest.scala | 4 +- .../test/junit/JunitIncludesRunWith.scala | 4 +- .../junit/JunitIncludesTestHierarchies.scala | 4 +- .../test/junit/JunitInnerClass.scala | 4 +- .../test/junit/JunitJavaTest.java | 2 +- .../test/junit/JunitMultiplePrefixes.scala | 4 +- .../test/junit/JunitMultipleSuffixes.scala | 2 +- .../test/junit/JunitNoTests.scala | 4 +- .../test/junit/JunitTests.scala | 8 +- .../test/junit/scala.scala | 4 +- .../test/junit/specs2/Specs2Tests.scala | 4 +- .../junit/support/JUnitCompileTimeDep.scala | 4 +- .../test/junit/support/JUnitRuntimeDep.scala | 2 + .../test/large_classpath/BUILD | 2 +- .../ObjectWithLargeClasspath.scala | 2 +- .../test/large_classpath/helper.bzl | 0 .../LocationExpansionTest.scala | 2 +- .../scalarules/test/mix_java_scala/Bar.scala | 3 + .../test/mix_java_scala/Baz.java | 2 +- .../scalarules/test/mix_java_scala/Baz.srcjar | Bin 0 -> 198 bytes .../test/mix_java_scala/FooBar.java | 2 +- .../test/only_java/Alpha.java | 2 +- .../test/resource_jars/BUILD | 2 +- .../test/resource_jars/TestResourceJars.scala | 0 .../test/resources/BUILD | 0 .../ScalaLibOnlyResourcesFilegroupTest.scala | 2 +- .../resources/ScalaLibOnlyResourcesTest.scala | 2 +- ...ScalaLibResourcesFromExternalDepTest.scala | 2 +- ...alaLibResourcesFromExternalScalaTest.scala | 2 +- .../test/resources/resource.txt | 0 .../test/resources/strip/BUILD | 2 +- .../strip/ResourceStripPrefixTest.scala | 2 +- .../resources/strip/nosrc_jar_resource.txt | 0 .../test/resources/subdir/resource.txt | 0 .../test/scala_import/BUILD | 0 .../scala_import/ReferCatsImplicits.scala | 2 +- .../ScalaImportExposesFileJarsTest.scala | 2 +- .../ScalaImportExposesJarsTest.scala | 2 +- ...ScalaImportPropagatesRuntimeDepsTest.scala | 2 +- .../test/scala_import/relate_2.11-2.1.1.jar | Bin .../test/sources_jars_in_deps/BUILD | 0 .../ReferCatsImplicits.scala | 0 .../{scala => scalarules}/test/srcjars/BUILD | 4 +- .../test/srcjars/SourceJar1.scala | 4 +- .../scalarules/test/srcjars/SourceJar1.srcjar | Bin 0 -> 335 bytes .../test/srcjars/SourceJar2.scala | 4 +- .../test/srcjars_with_java/BUILD | 0 .../srcjars_with_java/JavaDependent.scala | 0 .../test/srcjars_with_java/JavaSource.java | 0 .../srcjars_with_java/JavaSourceJar.srcjar | Bin .../MixedLanguageDependent.scala | 0 .../MixedLanguageSourceJar.srcjar | Bin .../test/srcjars_with_java/ScalaSource.scala | 0 .../test/strict_deps/no_recompilation/A.scala | 7 ++ .../test/strict_deps/no_recompilation/B.scala | 7 ++ .../test/strict_deps/no_recompilation/BUILD | 0 .../test/strict_deps/no_recompilation/C.scala | 7 ++ .../test/twitter_scrooge/BUILD | 34 +++--- .../test/twitter_scrooge/BareThrifts.scala | 2 +- .../test/twitter_scrooge/JustScrooge1.scala | 14 +++ .../test/twitter_scrooge/JustScrooge2a.scala | 8 ++ .../test/twitter_scrooge/JustScrooge2b.scala | 12 +++ .../test/twitter_scrooge/JustScrooge3.scala | 7 ++ .../test/twitter_scrooge/Mixed.scala | 20 ++++ .../test/twitter_scrooge/Scrooge2.scala | 8 ++ .../test/twitter_scrooge/Twodeep.scala | 4 +- .../prefix_test/a/b/c/d/A.thrift | 5 + .../twitter_scrooge/prefix_test/a/b/c/d/BUILD | 0 .../prefix_test/e/f/b/c/d/B.thrift | 2 +- .../prefix_test/e/f/b/c/d/BUILD | 4 +- .../test/twitter_scrooge/thrift/BUILD | 4 +- .../twitter_scrooge/thrift/Thrift1.thrift | 2 +- .../twitter_scrooge/thrift/ThriftMany1.thrift | 0 .../twitter_scrooge/thrift/ThriftMany2.thrift | 0 .../thrift/bare_jar_thrifts/BUILD | 4 +- .../thrift/bare_jar_thrifts/BareJar.thrift | 0 .../thrift/bare_jar_thrifts/bare-thrift.jar | Bin .../thrift/bare_jar_thrifts/bare_jar_1/BUILD | 0 .../bare_jar_1/bare-thrift-1.jar | Bin .../thrift/bare_jar_thrifts/bare_jar_2/BUILD | 0 .../bare_jar_2/bare-thrift-2.jar | Bin .../test/twitter_scrooge/thrift/thrift2/BUILD | 4 +- .../thrift/thrift2/Thrift2_A.thrift | 2 +- .../thrift/thrift2/Thrift2_B.thrift | 2 +- .../thrift/thrift2/thrift3/BUILD | 0 .../thrift/thrift2/thrift3/Thrift3.thrift | 2 +- .../thrift/thrift2/thrift4/BUILD | 0 .../thrift/thrift2/thrift4/Thrift4.thrift | 2 +- .../thrift/thrift2/thrift4/Thrift4a.thrift | 0 .../test/utf8/JavaClassWithUtf8.java | 2 +- .../test/utf8/ScalaClassWithUtf8.scala | 2 +- test_rules_scala.sh | 76 +++++++------- 154 files changed, 334 insertions(+), 334 deletions(-) rename test/src/main/resources/{scala => scalarules}/test/BUILD (100%) rename test/src/main/resources/{scala => scalarules}/test/byes (100%) rename test/src/main/resources/{scala => scalarules}/test/classpath_resource1/BUILD (100%) rename test/src/main/resources/{scala => scalarules}/test/classpath_resource1/classpath-resource (100%) rename test/src/main/resources/{scala => scalarules}/test/classpath_resource2/BUILD (100%) rename test/src/main/resources/{scala => scalarules}/test/classpath_resource2/classpath-resource (100%) rename test/src/main/resources/{scala => scalarules}/test/hellos (100%) rename test/src/main/resources/{scala => scalarules}/test/hellos-and-byes.jar (100%) rename test/src/main/resources/{scala => scalarules}/test/more-byes (100%) rename test/src/main/resources/{scala => scalarules}/test/more-hellos (100%) delete mode 100644 test/src/main/scala/scala/test/classpath_resources/BUILD delete mode 100644 test/src/main/scala/scala/test/junit/support/JUnitRuntimeDep.scala delete mode 100644 test/src/main/scala/scala/test/mix_java_scala/Bar.scala delete mode 100644 test/src/main/scala/scala/test/mix_java_scala/Baz.srcjar delete mode 100644 test/src/main/scala/scala/test/srcjars/SourceJar1.srcjar delete mode 100644 test/src/main/scala/scala/test/strict_deps/no_recompilation/A.scala delete mode 100644 test/src/main/scala/scala/test/strict_deps/no_recompilation/B.scala delete mode 100644 test/src/main/scala/scala/test/strict_deps/no_recompilation/C.scala delete mode 100644 test/src/main/scala/scala/test/twitter_scrooge/JustScrooge1.scala delete mode 100644 test/src/main/scala/scala/test/twitter_scrooge/JustScrooge2a.scala delete mode 100644 test/src/main/scala/scala/test/twitter_scrooge/JustScrooge2b.scala delete mode 100644 test/src/main/scala/scala/test/twitter_scrooge/JustScrooge3.scala delete mode 100644 test/src/main/scala/scala/test/twitter_scrooge/Mixed.scala delete mode 100644 test/src/main/scala/scala/test/twitter_scrooge/Scrooge2.scala delete mode 100644 test/src/main/scala/scala/test/twitter_scrooge/prefix_test/a/b/c/d/A.thrift rename test/src/main/scala/{scala => scalarules}/test/BinaryDependentOnJava.scala (75%) rename test/src/main/scala/{scala => scalarules}/test/MixJavaScalaLibBinary.scala (97%) rename test/src/main/scala/{scala => scalarules}/test/ResourcesStripScalaBinary.scala (97%) rename test/src/main/scala/{scala => scalarules}/test/ResourcesStripScalaLib.scala (76%) rename test/src/main/scala/{scala => scalarules}/test/ScalaLibBinary.scala (97%) rename test/src/main/scala/{scala => scalarules}/test/ScalaLibResources.scala (97%) create mode 100644 test/src/main/scala/scalarules/test/classpath_resources/BUILD rename test/src/main/scala/{scala => scalarules}/test/classpath_resources/ObjectWithClasspathResources.scala (93%) rename test/src/main/scala/{scala => scalarules}/test/classpath_resources/ObjectWithDuplicateClasspathResources.scala (57%) rename test/src/main/scala/{scala => scalarules}/test/disappearing_class/ClassProvider.scala (52%) rename test/src/main/scala/{scala => scalarules}/test/ijar/A.scala (58%) rename test/src/main/scala/{scala => scalarules}/test/ijar/B.scala (75%) rename test/src/main/scala/{scala => scalarules}/test/ijar/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/ijar/C.java (80%) rename test/src/main/scala/{scala => scalarules}/test/junit/FilterTest.scala (95%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitAbstractClassAndInterface.scala (90%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitCustomRunner.java (94%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitCustomRunnerTest.scala (90%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitIncludesRunWith.scala (91%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitIncludesTestHierarchies.scala (60%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitInnerClass.scala (77%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitJavaTest.java (74%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitMultiplePrefixes.scala (88%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitMultipleSuffixes.scala (88%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitNoTests.scala (82%) rename test/src/main/scala/{scala => scalarules}/test/junit/JunitTests.scala (71%) rename test/src/main/scala/{scala => scalarules}/test/junit/scala.scala (86%) rename test/src/main/scala/{scala => scalarules}/test/junit/specs2/Specs2Tests.scala (89%) rename test/src/main/scala/{scala => scalarules}/test/junit/support/JUnitCompileTimeDep.scala (55%) create mode 100644 test/src/main/scala/scalarules/test/junit/support/JUnitRuntimeDep.scala rename test/src/main/scala/{scala => scalarules}/test/large_classpath/BUILD (81%) rename test/src/main/scala/{scala => scalarules}/test/large_classpath/ObjectWithLargeClasspath.scala (63%) rename test/src/main/scala/{scala => scalarules}/test/large_classpath/helper.bzl (100%) rename test/src/main/scala/{scala => scalarules}/test/location_expansion/LocationExpansionTest.scala (84%) create mode 100644 test/src/main/scala/scalarules/test/mix_java_scala/Bar.scala rename test/src/main/scala/{scala => scalarules}/test/mix_java_scala/Baz.java (56%) create mode 100644 test/src/main/scala/scalarules/test/mix_java_scala/Baz.srcjar rename test/src/main/scala/{scala => scalarules}/test/mix_java_scala/FooBar.java (59%) rename test/src/main/scala/{scala => scalarules}/test/only_java/Alpha.java (83%) rename test/src/main/scala/{scala => scalarules}/test/resource_jars/BUILD (61%) rename test/src/main/scala/{scala => scalarules}/test/resource_jars/TestResourceJars.scala (100%) rename test/src/main/scala/{scala => scalarules}/test/resources/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/resources/ScalaLibOnlyResourcesFilegroupTest.scala (93%) rename test/src/main/scala/{scala => scalarules}/test/resources/ScalaLibOnlyResourcesTest.scala (92%) rename test/src/main/scala/{scala => scalarules}/test/resources/ScalaLibResourcesFromExternalDepTest.scala (92%) rename test/src/main/scala/{scala => scalarules}/test/resources/ScalaLibResourcesFromExternalScalaTest.scala (92%) rename test/src/main/scala/{scala => scalarules}/test/resources/resource.txt (100%) rename test/src/main/scala/{scala => scalarules}/test/resources/strip/BUILD (81%) rename test/src/main/scala/{scala => scalarules}/test/resources/strip/ResourceStripPrefixTest.scala (88%) rename test/src/main/scala/{scala => scalarules}/test/resources/strip/nosrc_jar_resource.txt (100%) rename test/src/main/scala/{scala => scalarules}/test/resources/subdir/resource.txt (100%) rename test/src/main/scala/{scala => scalarules}/test/scala_import/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/scala_import/ReferCatsImplicits.scala (54%) rename test/src/main/scala/{scala => scalarules}/test/scala_import/ScalaImportExposesFileJarsTest.scala (88%) rename test/src/main/scala/{scala => scalarules}/test/scala_import/ScalaImportExposesJarsTest.scala (91%) rename test/src/main/scala/{scala => scalarules}/test/scala_import/ScalaImportPropagatesRuntimeDepsTest.scala (91%) rename test/src/main/scala/{scala => scalarules}/test/scala_import/relate_2.11-2.1.1.jar (100%) rename test/src/main/scala/{scala => scalarules}/test/sources_jars_in_deps/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/sources_jars_in_deps/ReferCatsImplicits.scala (100%) rename test/src/main/scala/{scala => scalarules}/test/srcjars/BUILD (75%) rename test/src/main/scala/{scala => scalarules}/test/srcjars/SourceJar1.scala (66%) create mode 100644 test/src/main/scala/scalarules/test/srcjars/SourceJar1.srcjar rename test/src/main/scala/{scala => scalarules}/test/srcjars/SourceJar2.scala (58%) rename test/src/main/scala/{scala => scalarules}/test/srcjars_with_java/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/srcjars_with_java/JavaDependent.scala (100%) rename test/src/main/scala/{scala => scalarules}/test/srcjars_with_java/JavaSource.java (100%) rename test/src/main/scala/{scala => scalarules}/test/srcjars_with_java/JavaSourceJar.srcjar (100%) rename test/src/main/scala/{scala => scalarules}/test/srcjars_with_java/MixedLanguageDependent.scala (100%) rename test/src/main/scala/{scala => scalarules}/test/srcjars_with_java/MixedLanguageSourceJar.srcjar (100%) rename test/src/main/scala/{scala => scalarules}/test/srcjars_with_java/ScalaSource.scala (100%) create mode 100644 test/src/main/scala/scalarules/test/strict_deps/no_recompilation/A.scala create mode 100644 test/src/main/scala/scalarules/test/strict_deps/no_recompilation/B.scala rename test/src/main/scala/{scala => scalarules}/test/strict_deps/no_recompilation/BUILD (100%) create mode 100644 test/src/main/scala/scalarules/test/strict_deps/no_recompilation/C.scala rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/BUILD (68%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/BareThrifts.scala (86%) create mode 100644 test/src/main/scala/scalarules/test/twitter_scrooge/JustScrooge1.scala create mode 100644 test/src/main/scala/scalarules/test/twitter_scrooge/JustScrooge2a.scala create mode 100644 test/src/main/scala/scalarules/test/twitter_scrooge/JustScrooge2b.scala create mode 100644 test/src/main/scala/scalarules/test/twitter_scrooge/JustScrooge3.scala create mode 100644 test/src/main/scala/scalarules/test/twitter_scrooge/Mixed.scala create mode 100644 test/src/main/scala/scalarules/test/twitter_scrooge/Scrooge2.scala rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/Twodeep.scala (60%) create mode 100644 test/src/main/scala/scalarules/test/twitter_scrooge/prefix_test/a/b/c/d/A.thrift rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/prefix_test/a/b/c/d/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/prefix_test/e/f/b/c/d/B.thrift (50%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/prefix_test/e/f/b/c/d/BUILD (70%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/BUILD (65%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/Thrift1.thrift (80%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/ThriftMany1.thrift (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/ThriftMany2.thrift (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/bare_jar_thrifts/BUILD (68%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/bare_jar_thrifts/BareJar.thrift (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/bare_jar_thrifts/bare-thrift.jar (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/bare_jar_thrifts/bare_jar_1/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/bare_jar_thrifts/bare_jar_1/bare-thrift-1.jar (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/bare_jar_thrifts/bare_jar_2/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/bare_jar_thrifts/bare_jar_2/bare-thrift-2.jar (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/thrift2/BUILD (60%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/thrift2/Thrift2_A.thrift (56%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/thrift2/Thrift2_B.thrift (77%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/thrift2/thrift3/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/thrift2/thrift3/Thrift3.thrift (52%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/thrift2/thrift4/BUILD (100%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/thrift2/thrift4/Thrift4.thrift (53%) rename test/src/main/scala/{scala => scalarules}/test/twitter_scrooge/thrift/thrift2/thrift4/Thrift4a.thrift (100%) rename test/src/main/scala/{scala => scalarules}/test/utf8/JavaClassWithUtf8.java (71%) rename test/src/main/scala/{scala => scalarules}/test/utf8/ScalaClassWithUtf8.scala (68%) diff --git a/test/A.scala b/test/A.scala index de5e15dd7..4954dd4e7 100644 --- a/test/A.scala +++ b/test/A.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test object A { def main(args: Array[String]) { diff --git a/test/BUILD b/test/BUILD index 4a759faa6..e7bc55f5d 100644 --- a/test/BUILD +++ b/test/BUILD @@ -23,7 +23,7 @@ load( java_binary( name = "JavaBinary", srcs = ["JavaBinary.java"], - main_class = "scala.test.JavaBinary", + main_class = "scalarules.test.JavaBinary", runtime_deps = [ ":OtherJavaLib", "@scala//:scala-library", @@ -39,7 +39,7 @@ java_binary( java_binary( name = "JavaBinary2", srcs = ["JavaBinary.java"], - main_class = "scala.test.JavaBinary", + main_class = "scalarules.test.JavaBinary", deps = [ ":Exported", ":HelloLib", @@ -51,7 +51,7 @@ java_binary( scala_binary( name = "ScalaBinary", srcs = ["ScalaBinary.scala"], - main_class = "scala.test.ScalaBinary", + main_class = "scalarules.test.ScalaBinary", print_compile_time = True, deps = [ ":HelloLib", @@ -159,38 +159,38 @@ java_library( scala_library( name = "ScalaLibResources", - srcs = ["src/main/scala/scala/test/ScalaLibResources.scala"], + srcs = ["src/main/scala/scalarules/test/ScalaLibResources.scala"], resources = [ "//test/data:some.txt", - "//test/src/main/resources/scala/test:byes", - "//test/src/main/resources/scala/test:hellos", + "//test/src/main/resources/scalarules/test:byes", + "//test/src/main/resources/scalarules/test:hellos", ], ) scala_library( name = "ResourcesStripScalaLib", - srcs = ["src/main/scala/scala/test/ResourcesStripScalaLib.scala"], + srcs = ["src/main/scala/scalarules/test/ResourcesStripScalaLib.scala"], resource_strip_prefix = "test/", resources = [ "//test/data:foo.txt", "//test/data:more.txt", - "//test/src/main/resources/scala/test:generated-hello", - "//test/src/main/resources/scala/test:more-byes", - "//test/src/main/resources/scala/test:more-hellos", + "//test/src/main/resources/scalarules/test:generated-hello", + "//test/src/main/resources/scalarules/test:more-byes", + "//test/src/main/resources/scalarules/test:more-hellos", ], ) scala_binary( name = "ScalaLibBinary", - srcs = ["src/main/scala/scala/test/ScalaLibBinary.scala"], - main_class = "scala.test.ScalaLibBinary", + srcs = ["src/main/scala/scalarules/test/ScalaLibBinary.scala"], + main_class = "scalarules.test.ScalaLibBinary", deps = ["ScalaLibResources"], ) scala_binary( name = "ResourcesStripScalaBinary", - srcs = ["src/main/scala/scala/test/ResourcesStripScalaBinary.scala"], - main_class = "scala.test.ResourcesStripScalaBinary", + srcs = ["src/main/scala/scalarules/test/ResourcesStripScalaBinary.scala"], + main_class = "scalarules.test.ResourcesStripScalaBinary", deps = ["ResourcesStripScalaLib"], ) @@ -224,8 +224,8 @@ scala_library( #Mix java scala scala_library( name = "MixJavaScalaLib", - srcs = glob(["src/main/scala/scala/test/mix_java_scala/*.scala"]) + glob([ - "src/main/scala/scala/test/mix_java_scala/*.java", + srcs = glob(["src/main/scala/scalarules/test/mix_java_scala/*.scala"]) + glob([ + "src/main/scala/scalarules/test/mix_java_scala/*.java", ]), jvm_flags = [ "-Xms1G", @@ -236,8 +236,8 @@ scala_library( #needed to test java sources are compiled scala_binary( name = "MixJavaScalaLibBinary", - srcs = ["src/main/scala/scala/test/MixJavaScalaLibBinary.scala"], - main_class = "scala.test.MixJavaScalaLibBinary", + srcs = ["src/main/scala/scalarules/test/MixJavaScalaLibBinary.scala"], + main_class = "scalarules.test.MixJavaScalaLibBinary", deps = ["MixJavaScalaLib"], ) @@ -245,9 +245,9 @@ scala_binary( scala_library( name = "MixJavaScalaSrcjarLib", srcs = glob([ - "src/main/scala/scala/test/mix_java_scala/*.scala", + "src/main/scala/scalarules/test/mix_java_scala/*.scala", # srcjar created with `jar -cfM Baz.srcjar Baz.java` - "src/main/scala/scala/test/mix_java_scala/*.srcjar", + "src/main/scala/scalarules/test/mix_java_scala/*.srcjar", ]), jvm_flags = [ "-Xms1G", @@ -258,31 +258,31 @@ scala_library( #needed to test java sources are compiled scala_binary( name = "MixJavaScalaSrcjarLibBinary", - srcs = ["src/main/scala/scala/test/MixJavaScalaLibBinary.scala"], - main_class = "scala.test.MixJavaScalaLibBinary", + srcs = ["src/main/scala/scalarules/test/MixJavaScalaLibBinary.scala"], + main_class = "scalarules.test.MixJavaScalaLibBinary", deps = ["MixJavaScalaSrcjarLib"], ) scala_binary( name = "JavaOnlySources", - srcs = ["src/main/scala/scala/test/only_java/Alpha.java"], - main_class = "scala.test.Alpha", + srcs = ["src/main/scala/scalarules/test/only_java/Alpha.java"], + main_class = "scalarules.test.Alpha", ) scala_library( name = "JUnitCompileTimeDep", - srcs = ["src/main/scala/scala/test/junit/support/JUnitCompileTimeDep.scala"], + srcs = ["src/main/scala/scalarules/test/junit/support/JUnitCompileTimeDep.scala"], ) scala_library( name = "JUnitRuntimeDep", - srcs = ["src/main/scala/scala/test/junit/support/JUnitRuntimeDep.scala"], + srcs = ["src/main/scala/scalarules/test/junit/support/JUnitRuntimeDep.scala"], ) scala_junit_test( name = "JunitTestWithDeps", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitTests.scala"], + srcs = ["src/main/scala/scalarules/test/junit/JunitTests.scala"], jvm_flags = ["-XX:HeapDumpPath=/some/custom/path"], suffixes = ["Test"], runtime_deps = [":JUnitRuntimeDep"], @@ -292,7 +292,7 @@ scala_junit_test( scala_junit_test( name = "JunitMultipleSuffixes", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitMultipleSuffixes.scala"], + srcs = ["src/main/scala/scalarules/test/junit/JunitMultipleSuffixes.scala"], print_discovered_classes = True, suffixes = [ "E2E", @@ -303,7 +303,7 @@ scala_junit_test( scala_junit_test( name = "JunitMultiplePrefixes", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitMultiplePrefixes.scala"], + srcs = ["src/main/scala/scalarules/test/junit/JunitMultiplePrefixes.scala"], prefixes = [ "Test", "OtherCustomPrefix", @@ -315,8 +315,8 @@ scala_junit_test( name = "JunitPrefixesAndSuffixes", size = "small", srcs = [ - "src/main/scala/scala/test/junit/JunitMultiplePrefixes.scala", - "src/main/scala/scala/test/junit/JunitMultipleSuffixes.scala", + "src/main/scala/scalarules/test/junit/JunitMultiplePrefixes.scala", + "src/main/scala/scalarules/test/junit/JunitMultipleSuffixes.scala", ], prefixes = ["Test"], print_discovered_classes = True, @@ -326,14 +326,14 @@ scala_junit_test( scala_junit_test( name = "JunitJavaTest", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitJavaTest.java"], + srcs = ["src/main/scala/scalarules/test/junit/JunitJavaTest.java"], suffixes = ["Test"], ) scala_specs2_junit_test( name = "Specs2Tests", size = "small", - srcs = ["src/main/scala/scala/test/junit/specs2/Specs2Tests.scala"], + srcs = ["src/main/scala/scalarules/test/junit/specs2/Specs2Tests.scala"], print_discovered_classes = True, suffixes = ["Test"], deps = [":JUnitCompileTimeDep"], @@ -355,7 +355,7 @@ scala_specs2_junit_test( "ScalaLibBinary", "ResourcesStripScalaBinary", "ScalaBinary_dependent_on_binary_with_java", - "//test/src/main/scala/scala/test/classpath_resources:classpath_resource", + "//test/src/main/scala/scalarules/test/classpath_resources:classpath_resource", ]] # Make sure scala_binary works in genrule environment @@ -376,7 +376,7 @@ sh_test( scala_specs2_junit_test( name = "data_location_expansion", size = "small", - srcs = ["src/main/scala/scala/test/location_expansion/LocationExpansionTest.scala"], + srcs = ["src/main/scala/scalarules/test/location_expansion/LocationExpansionTest.scala"], data = ["//src/java/com/google/devtools/build/lib:worker"], jvm_flags = ["-Dlocation.expanded=$(location //src/java/com/google/devtools/build/lib:worker)"], suffixes = ["Test"], @@ -385,7 +385,7 @@ scala_specs2_junit_test( scala_junit_test( name = "JunitFiltersAbstractClassesAndInterfaces", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitAbstractClassAndInterface.scala"], + srcs = ["src/main/scala/scalarules/test/junit/JunitAbstractClassAndInterface.scala"], print_discovered_classes = True, suffixes = ["Test"], ) @@ -393,7 +393,7 @@ scala_junit_test( scala_junit_test( name = "JunitFiltersInnerClasses", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitInnerClass.scala"], + srcs = ["src/main/scala/scalarules/test/junit/JunitInnerClass.scala"], prefixes = ["Test"], print_discovered_classes = True, ) @@ -401,7 +401,7 @@ scala_junit_test( scala_junit_test( name = "JunitFiltersClassesWithoutTests", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitNoTests.scala"], + srcs = ["src/main/scala/scalarules/test/junit/JunitNoTests.scala"], print_discovered_classes = True, suffixes = ["Test"], ) @@ -409,7 +409,7 @@ scala_junit_test( scala_junit_test( name = "JunitIncludesClassesWithTestsFromParent", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitIncludesTestHierarchies.scala"], + srcs = ["src/main/scala/scalarules/test/junit/JunitIncludesTestHierarchies.scala"], print_discovered_classes = True, suffixes = ["Test"], ) @@ -417,7 +417,7 @@ scala_junit_test( scala_junit_test( name = "JunitCustomRunner", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitCustomRunnerTest.scala"], + srcs = ["src/main/scala/scalarules/test/junit/JunitCustomRunnerTest.scala"], suffixes = ["Test"], deps = [":customJunitRunner"], ) @@ -425,7 +425,7 @@ scala_junit_test( scala_junit_test( name = "JunitIncludesClassesWithRunWith", size = "small", - srcs = ["src/main/scala/scala/test/junit/JunitIncludesRunWith.scala"], + srcs = ["src/main/scala/scalarules/test/junit/JunitIncludesRunWith.scala"], print_discovered_classes = True, suffixes = ["Test"], ) @@ -433,7 +433,7 @@ scala_junit_test( scala_junit_test( name = "JunitFilterTest", size = "small", - srcs = ["src/main/scala/scala/test/junit/FilterTest.scala"], + srcs = ["src/main/scala/scalarules/test/junit/FilterTest.scala"], print_discovered_classes = True, suffixes = ["Test"], ) @@ -441,14 +441,14 @@ scala_junit_test( scala_library( name = "filesWithUtf8", srcs = [ - "src/main/scala/scala/test/utf8/JavaClassWithUtf8.java", - "src/main/scala/scala/test/utf8/ScalaClassWithUtf8.scala", + "src/main/scala/scalarules/test/utf8/JavaClassWithUtf8.java", + "src/main/scala/scalarules/test/utf8/ScalaClassWithUtf8.scala", ], ) scala_library( name = "customJunitRunner", - srcs = ["src/main/scala/scala/test/junit/JunitCustomRunner.java"], + srcs = ["src/main/scala/scalarules/test/junit/JunitCustomRunner.java"], deps = ["//external:io_bazel_rules_scala/dependency/junit/junit"], ) @@ -461,7 +461,7 @@ java_import( scala_binary( name = "ScalaBinary_with_fake", srcs = ["ScalaBinary.scala"], - main_class = "scala.test.ScalaBinary", + main_class = "scalarules.test.ScalaBinary", deps = [ ":HelloLib", ":MacroTest", @@ -490,7 +490,7 @@ sh_test( scala_binary( name = "ScalaBinary_with_service_manifest_srcs", srcs = ["A.scala"], - main_class = "scala.test.A", + main_class = "scalarules.test.A", deps = [ "//test/example_jars:example_jar1", "//test/example_jars:example_jar2", @@ -499,8 +499,8 @@ scala_binary( scala_binary( name = "ScalaBinary_dependent_on_binary_with_java", - srcs = ["src/main/scala/scala/test/BinaryDependentOnJava.scala"], - main_class = "scala.test.BinaryDependentOnJava", + srcs = ["src/main/scala/scalarules/test/BinaryDependentOnJava.scala"], + main_class = "scalarules.test.BinaryDependentOnJava", deps = [":JavaOnlySources"], ) diff --git a/test/D.scala b/test/D.scala index 0b758990c..e53d8a220 100644 --- a/test/D.scala +++ b/test/D.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test object D { def main(args: Array[String]) { diff --git a/test/DataRoot1.scala b/test/DataRoot1.scala index b2df2d0ea..275b9ca86 100644 --- a/test/DataRoot1.scala +++ b/test/DataRoot1.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test object TestPointA { diff --git a/test/DataRoot2.scala b/test/DataRoot2.scala index 476dd169a..2152e19f7 100644 --- a/test/DataRoot2.scala +++ b/test/DataRoot2.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test object TestPointB { diff --git a/test/Exported.scala b/test/Exported.scala index 82264ec5d..bc0ae33da 100644 --- a/test/Exported.scala +++ b/test/Exported.scala @@ -1,9 +1,9 @@ -package scala.test +package scalarules.test object Exported { def message: String = { // terrible, don't do this in real code: - val msg = Class.forName("scala.test.Runtime") + val msg = Class.forName("scalarules.test.Runtime") .newInstance .toString "you all, everybody. " + msg diff --git a/test/HelloLib.scala b/test/HelloLib.scala index 5db899b7d..a4c536fa8 100644 --- a/test/HelloLib.scala +++ b/test/HelloLib.scala @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package scala.test +package scalarules.test object HelloLib { // This is to check the linter, which will recommend changing this diff --git a/test/HelloLibTest.scala b/test/HelloLibTest.scala index fcb983546..b7f54fd97 100644 --- a/test/HelloLibTest.scala +++ b/test/HelloLibTest.scala @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package scala.test +package scalarules.test import org.scalatest._ diff --git a/test/HelloLibTest2.scala b/test/HelloLibTest2.scala index 2cea839aa..e69690fa8 100644 --- a/test/HelloLibTest2.scala +++ b/test/HelloLibTest2.scala @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package scala.test +package scalarules.test import org.scalatest._ diff --git a/test/JavaBinary.java b/test/JavaBinary.java index 9233f4a7d..ea316387c 100644 --- a/test/JavaBinary.java +++ b/test/JavaBinary.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package scala.test; +package scalarules.test; /** Example class */ public class JavaBinary { diff --git a/test/LibToBin.scala b/test/LibToBin.scala index bac33d16a..6c1ac1766 100644 --- a/test/LibToBin.scala +++ b/test/LibToBin.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test object LibToBin { def foo = ScalaLibBinary.main(Array("foo")) diff --git a/test/LibToTest.scala b/test/LibToTest.scala index 636ab0373..fadd58f09 100644 --- a/test/LibToTest.scala +++ b/test/LibToTest.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test object LibToTest { def foo = TestUtil.foo diff --git a/test/MacroTest.scala b/test/MacroTest.scala index f48017d19..39155d7fa 100644 --- a/test/MacroTest.scala +++ b/test/MacroTest.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test import language.experimental.macros diff --git a/test/OtherJavaLib.java b/test/OtherJavaLib.java index 53cce195c..c408d7f11 100644 --- a/test/OtherJavaLib.java +++ b/test/OtherJavaLib.java @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package scala.test; +package scalarules.test; /** Example class */ public class OtherJavaLib { diff --git a/test/OtherLib.scala b/test/OtherLib.scala index cf012134c..5cfa1e947 100644 --- a/test/OtherLib.scala +++ b/test/OtherLib.scala @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package scala.test +package scalarules.test // It is just to show how a Scala library can depend on another Scala library. object OtherLib { diff --git a/test/Runtime.scala b/test/Runtime.scala index e64c06d82..96e00be42 100644 --- a/test/Runtime.scala +++ b/test/Runtime.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test class Runtime { override def toString = "I am Runtime" diff --git a/test/ScalaBinary.scala b/test/ScalaBinary.scala index 9f2f46fdd..673abf184 100644 --- a/test/ScalaBinary.scala +++ b/test/ScalaBinary.scala @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package scala.test +package scalarules.test object ScalaBinary { def main(args: Array[String]) { diff --git a/test/SuiteUsage.scala b/test/SuiteUsage.scala index aa1b130e0..c51c66c70 100644 --- a/test/SuiteUsage.scala +++ b/test/SuiteUsage.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test object Usage { diff --git a/test/TestFilterTestA.scala b/test/TestFilterTestA.scala index 9d77dc76c..7eab40784 100644 --- a/test/TestFilterTestA.scala +++ b/test/TestFilterTestA.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test import org.scalatest.FunSpec diff --git a/test/TestFilterTestB.scala b/test/TestFilterTestB.scala index e4b6c5f6e..06e9e798f 100644 --- a/test/TestFilterTestB.scala +++ b/test/TestFilterTestB.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test import org.scalatest.FunSpec diff --git a/test/src/main/resources/scala/test/BUILD b/test/src/main/resources/scalarules/test/BUILD similarity index 100% rename from test/src/main/resources/scala/test/BUILD rename to test/src/main/resources/scalarules/test/BUILD diff --git a/test/src/main/resources/scala/test/byes b/test/src/main/resources/scalarules/test/byes similarity index 100% rename from test/src/main/resources/scala/test/byes rename to test/src/main/resources/scalarules/test/byes diff --git a/test/src/main/resources/scala/test/classpath_resource1/BUILD b/test/src/main/resources/scalarules/test/classpath_resource1/BUILD similarity index 100% rename from test/src/main/resources/scala/test/classpath_resource1/BUILD rename to test/src/main/resources/scalarules/test/classpath_resource1/BUILD diff --git a/test/src/main/resources/scala/test/classpath_resource1/classpath-resource b/test/src/main/resources/scalarules/test/classpath_resource1/classpath-resource similarity index 100% rename from test/src/main/resources/scala/test/classpath_resource1/classpath-resource rename to test/src/main/resources/scalarules/test/classpath_resource1/classpath-resource diff --git a/test/src/main/resources/scala/test/classpath_resource2/BUILD b/test/src/main/resources/scalarules/test/classpath_resource2/BUILD similarity index 100% rename from test/src/main/resources/scala/test/classpath_resource2/BUILD rename to test/src/main/resources/scalarules/test/classpath_resource2/BUILD diff --git a/test/src/main/resources/scala/test/classpath_resource2/classpath-resource b/test/src/main/resources/scalarules/test/classpath_resource2/classpath-resource similarity index 100% rename from test/src/main/resources/scala/test/classpath_resource2/classpath-resource rename to test/src/main/resources/scalarules/test/classpath_resource2/classpath-resource diff --git a/test/src/main/resources/scala/test/hellos b/test/src/main/resources/scalarules/test/hellos similarity index 100% rename from test/src/main/resources/scala/test/hellos rename to test/src/main/resources/scalarules/test/hellos diff --git a/test/src/main/resources/scala/test/hellos-and-byes.jar b/test/src/main/resources/scalarules/test/hellos-and-byes.jar similarity index 100% rename from test/src/main/resources/scala/test/hellos-and-byes.jar rename to test/src/main/resources/scalarules/test/hellos-and-byes.jar diff --git a/test/src/main/resources/scala/test/more-byes b/test/src/main/resources/scalarules/test/more-byes similarity index 100% rename from test/src/main/resources/scala/test/more-byes rename to test/src/main/resources/scalarules/test/more-byes diff --git a/test/src/main/resources/scala/test/more-hellos b/test/src/main/resources/scalarules/test/more-hellos similarity index 100% rename from test/src/main/resources/scala/test/more-hellos rename to test/src/main/resources/scalarules/test/more-hellos diff --git a/test/src/main/scala/scala/test/classpath_resources/BUILD b/test/src/main/scala/scala/test/classpath_resources/BUILD deleted file mode 100644 index 2d1ec6d08..000000000 --- a/test/src/main/scala/scala/test/classpath_resources/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -load("//scala:scala.bzl", "scala_binary") - -scala_binary( - name = "classpath_resource", - srcs = ["ObjectWithClasspathResources.scala"], - classpath_resources = [ - "//test/src/main/resources/scala/test:byes", - "//test/src/main/resources/scala/test:hellos", - "//test/src/main/resources/scala/test:more-byes", - "//test/src/main/resources/scala/test:more-hellos", - ], - main_class = "scala.test.classpathresources.ObjectWithClasspathResources", - visibility = ["//visibility:public"], -) - -scala_binary( - name = "classpath_resource_duplicates", - srcs = ["ObjectWithDuplicateClasspathResources.scala"], - classpath_resources = [ - "//test/src/main/resources/scala/test/classpath_resource1:classpath-resource", - "//test/src/main/resources/scala/test/classpath_resource2:classpath-resource", - ], - main_class = "scala.test.classpathresources.ObjectWithDuplicateClasspathResources", -) diff --git a/test/src/main/scala/scala/test/junit/support/JUnitRuntimeDep.scala b/test/src/main/scala/scala/test/junit/support/JUnitRuntimeDep.scala deleted file mode 100644 index 7d6c324d3..000000000 --- a/test/src/main/scala/scala/test/junit/support/JUnitRuntimeDep.scala +++ /dev/null @@ -1,2 +0,0 @@ -package scala.test.junit.support -class JUnitRuntimeDep \ No newline at end of file diff --git a/test/src/main/scala/scala/test/mix_java_scala/Bar.scala b/test/src/main/scala/scala/test/mix_java_scala/Bar.scala deleted file mode 100644 index e859f26ba..000000000 --- a/test/src/main/scala/scala/test/mix_java_scala/Bar.scala +++ /dev/null @@ -1,3 +0,0 @@ -package scala.test -class Foo -class Bar extends Baz \ No newline at end of file diff --git a/test/src/main/scala/scala/test/mix_java_scala/Baz.srcjar b/test/src/main/scala/scala/test/mix_java_scala/Baz.srcjar deleted file mode 100644 index fc482ff1736ee14fd9081ccde542a3c40bdbc181..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 193 zcmWIWW@Zs#;Nak3Fj=+MivbC6Ft9KLZv^0EAo%9LwIOnOO7gpf4Cdgy0hUZyt&9H*g=fhV#d$fv`A;6oRV`GkEtvS$W lQy>oTW@Hj!Kv;<^2eJ|sAUhzyo0SbD%Ls&4K)MjD6ac}7ELs2n diff --git a/test/src/main/scala/scala/test/srcjars/SourceJar1.srcjar b/test/src/main/scala/scala/test/srcjars/SourceJar1.srcjar deleted file mode 100644 index 10ee8301f23f8b97655641f3accc29b7046a40ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 320 zcmWIWW@Zs#;Nak3_}(zdg8>PcGq5m}q!yRx7Z)Y#=O$+6=@%y_<|IN%m`qk;QL%n- zerZv1s#ju>p&nSxzf%khqGxvVHW=`*9Ni8nXFD^>f&rQtC(=Sd=%t?fhMWs2Z#riPm zti+;X{owr4qU2Ps#3DmIu)=?*7#Kv)Y~*cr;9VIq(x?X+wz*K;B zWkSWS>4w_-=2gmS?|Q)&;LXmVm?ro+7U<|yAP(?mWD;ROcm`Px test_expect_failure/disappearing_class/ClassProvider.scala + echo -e "package scalarules.test\n\nobject BackgroundNoise{}" > test_expect_failure/disappearing_class/ClassProvider.scala set +e bazel build test_expect_failure/disappearing_class:uses_class RET=$? @@ -217,11 +217,11 @@ test_scala_junit_test_can_fail() { } test_repl() { - echo "import scala.test._; HelloLib.printMessage(\"foo\")" | bazel-bin/test/HelloLibRepl | grep "foo java" && - echo "import scala.test._; TestUtil.foo" | bazel-bin/test/HelloLibTestRepl | grep "bar" && - echo "import scala.test._; ScalaLibBinary.main(Array())" | bazel-bin/test/ScalaLibBinaryRepl | grep "A hui hou" && - echo "import scala.test._; ResourcesStripScalaBinary.main(Array())" | bazel-bin/test/ResourcesStripScalaBinaryRepl | grep "More Hello" - echo "import scala.test._; A.main(Array())" | bazel-bin/test/ReplWithSources | grep "4 8 15" + echo "import scalarules.test._; HelloLib.printMessage(\"foo\")" | bazel-bin/test/HelloLibRepl | grep "foo java" && + echo "import scalarules.test._; TestUtil.foo" | bazel-bin/test/HelloLibTestRepl | grep "bar" && + echo "import scalarules.test._; ScalaLibBinary.main(Array())" | bazel-bin/test/ScalaLibBinaryRepl | grep "A hui hou" && + echo "import scalarules.test._; ResourcesStripScalaBinary.main(Array())" | bazel-bin/test/ResourcesStripScalaBinaryRepl | grep "More Hello" + echo "import scalarules.test._; A.main(Array())" | bazel-bin/test/ReplWithSources | grep "4 8 15" } test_benchmark_jmh() { @@ -286,7 +286,7 @@ xmllint_test() { multiple_junit_suffixes() { bazel test //test:JunitMultipleSuffixes - matches=$(grep -c -e 'Discovered classes' -e 'scala.test.junit.JunitSuffixIT' -e 'scala.test.junit.JunitSuffixE2E' ./bazel-testlogs/test/JunitMultipleSuffixes/test.log) + matches=$(grep -c -e 'Discovered classes' -e 'scalarules.test.junit.JunitSuffixIT' -e 'scalarules.test.junit.JunitSuffixE2E' ./bazel-testlogs/test/JunitMultipleSuffixes/test.log) if [ $matches -eq 3 ]; then return 0 else @@ -297,7 +297,7 @@ multiple_junit_suffixes() { multiple_junit_prefixes() { bazel test //test:JunitMultiplePrefixes - matches=$(grep -c -e 'Discovered classes' -e 'scala.test.junit.TestJunitCustomPrefix' -e 'scala.test.junit.OtherCustomPrefixJunit' ./bazel-testlogs/test/JunitMultiplePrefixes/test.log) + matches=$(grep -c -e 'Discovered classes' -e 'scalarules.test.junit.TestJunitCustomPrefix' -e 'scalarules.test.junit.OtherCustomPrefixJunit' ./bazel-testlogs/test/JunitMultiplePrefixes/test.log) if [ $matches -eq 3 ]; then return 0 else @@ -307,7 +307,7 @@ multiple_junit_prefixes() { multiple_junit_patterns() { bazel test //test:JunitPrefixesAndSuffixes - matches=$(grep -c -e 'Discovered classes' -e 'scala.test.junit.TestJunitCustomPrefix' -e 'scala.test.junit.JunitSuffixE2E' ./bazel-testlogs/test/JunitPrefixesAndSuffixes/test.log) + matches=$(grep -c -e 'Discovered classes' -e 'scalarules.test.junit.TestJunitCustomPrefix' -e 'scalarules.test.junit.JunitSuffixE2E' ./bazel-testlogs/test/JunitPrefixesAndSuffixes/test.log) if [ $matches -eq 3 ]; then return 0 else @@ -337,8 +337,8 @@ test_junit_test_errors_when_no_tests_found() { test_resources() { RESOURCE_NAME="resource.txt" TARGET=$1 - OUTPUT_JAR="bazel-bin/test/src/main/scala/scala/test/resources/$TARGET.jar" - FULL_TARGET="test/src/main/scala/scala/test/resources/$TARGET.jar" + OUTPUT_JAR="bazel-bin/test/src/main/scala/scalarules/test/resources/$TARGET.jar" + FULL_TARGET="test/src/main/scala/scalarules/test/resources/$TARGET.jar" bazel build $FULL_TARGET jar tf $OUTPUT_JAR | grep $RESOURCE_NAME } @@ -360,7 +360,7 @@ scala_test_test_filters() { local output=$(bazel test \ --cache_test_results=no \ --test_output streamed \ - --test_filter scala.test.* \ + --test_filter scalarules.test.* \ test:TestFilterTests) if [[ $output != *"tests a"* || $output != *"tests b"* ]]; then echo "Should have contained test output from both test filter test a and b" @@ -370,7 +370,7 @@ scala_test_test_filters() { local output=$(bazel test \ --cache_test_results=no \ --test_output streamed \ - --test_filter scala.test.TestFilterTestA \ + --test_filter scalarules.test.TestFilterTestA \ test:TestFilterTests) if [[ $output != *"tests a"* || $output == *"tests b"* ]]; then echo "Should have only contained test output from test filter test a" @@ -382,19 +382,19 @@ scala_junit_test_test_filter(){ local output=$(bazel test \ --nocache_test_results \ --test_output=streamed \ - '--test_filter=scala.test.junit.FirstFilterTest#(method1|method2)$|scala.test.junit.SecondFilterTest#(method2|method3)$' \ + '--test_filter=scalarules.test.junit.FirstFilterTest#(method1|method2)$|scalarules.test.junit.SecondFilterTest#(method2|method3)$' \ test:JunitFilterTest) local expected=( - "scala.test.junit.FirstFilterTest#method1" - "scala.test.junit.FirstFilterTest#method2" - "scala.test.junit.SecondFilterTest#method2" - "scala.test.junit.SecondFilterTest#method3") + "scalarules.test.junit.FirstFilterTest#method1" + "scalarules.test.junit.FirstFilterTest#method2" + "scalarules.test.junit.SecondFilterTest#method2" + "scalarules.test.junit.SecondFilterTest#method3") local unexpected=( - "scala.test.junit.FirstFilterTest#method3" - "scala.test.junit.SecondFilterTest#method1" - "scala.test.junit.ThirdFilterTest#method1" - "scala.test.junit.ThirdFilterTest#method2" - "scala.test.junit.ThirdFilterTest#method3") + "scalarules.test.junit.FirstFilterTest#method3" + "scalarules.test.junit.SecondFilterTest#method1" + "scalarules.test.junit.ThirdFilterTest#method1" + "scalarules.test.junit.ThirdFilterTest#method2" + "scalarules.test.junit.ThirdFilterTest#method3") for method in "${expected[@]}"; do if ! grep "$method" <<<$output; then echo "output:" @@ -417,7 +417,7 @@ scala_junit_test_test_filter_custom_runner(){ bazel test \ --nocache_test_results \ --test_output=streamed \ - '--test_filter=scala.test.junit.JunitCustomRunnerTest#' \ + '--test_filter=scalarules.test.junit.JunitCustomRunnerTest#' \ test:JunitCustomRunner } @@ -455,7 +455,7 @@ scala_specs2_junit_test_test_filter_whole_spec(){ local output=$(bazel test \ --nocache_test_results \ --test_output=streamed \ - '--test_filter=scala.test.junit.specs2.JunitSpecs2Test#' \ + '--test_filter=scalarules.test.junit.specs2.JunitSpecs2Test#' \ test:Specs2Tests) local expected=( "+ run smoothly in bazel" @@ -484,7 +484,7 @@ scala_specs2_junit_test_test_filter_one_test(){ local output=$(bazel test \ --nocache_test_results \ --test_output=streamed \ - '--test_filter=scala.test.junit.specs2.JunitSpecs2Test#specs2 tests should::run smoothly in bazel$' \ + '--test_filter=scalarules.test.junit.specs2.JunitSpecs2Test#specs2 tests should::run smoothly in bazel$' \ test:Specs2Tests) local expected="+ run smoothly in bazel" local unexpected="+ not run smoothly in bazel" @@ -506,7 +506,7 @@ scala_specs2_junit_test_test_filter_exact_match(){ local output=$(bazel test \ --nocache_test_results \ --test_output=streamed \ - '--test_filter=scala.test.junit.specs2.JunitSpecs2AnotherTest#other specs2 tests should::run from another test$' \ + '--test_filter=scalarules.test.junit.specs2.JunitSpecs2AnotherTest#other specs2 tests should::run from another test$' \ test:Specs2Tests) local expected="+ run from another test" local unexpected="+ run from another test 2" @@ -528,7 +528,7 @@ scala_specs2_junit_test_test_filter_exact_match_unsafe_characters(){ local output=$(bazel test \ --nocache_test_results \ --test_output=streamed \ - '--test_filter=scala.test.junit.specs2.JunitSpec2RegexTest#\Qtests with unsafe characters should::2 + 2 != 5\E$' \ + '--test_filter=scalarules.test.junit.specs2.JunitSpec2RegexTest#\Qtests with unsafe characters should::2 + 2 != 5\E$' \ test:Specs2Tests) local expected="+ 2 + 2 != 5" local unexpected="+ work escaped (with regex)" @@ -550,7 +550,7 @@ scala_specs2_junit_test_test_filter_exact_match_escaped_and_sanitized(){ local output=$(bazel test \ --nocache_test_results \ --test_output=streamed \ - '--test_filter=scala.test.junit.specs2.JunitSpec2RegexTest#\Qtests with unsafe characters should::work escaped [with regex]\E$' \ + '--test_filter=scalarules.test.junit.specs2.JunitSpec2RegexTest#\Qtests with unsafe characters should::work escaped [with regex]\E$' \ test:Specs2Tests) local expected="+ work escaped (with regex)" local unexpected="+ 2 + 2 != 5" @@ -572,7 +572,7 @@ scala_specs2_junit_test_test_filter_match_multiple_methods(){ local output=$(bazel test \ --nocache_test_results \ --test_output=streamed \ - '--test_filter=scala.test.junit.specs2.JunitSpecs2AnotherTest#other specs2 tests should::(\Qrun from another test\E|\Qrun from another test 2\E)$' \ + '--test_filter=scalarules.test.junit.specs2.JunitSpecs2AnotherTest#other specs2 tests should::(\Qrun from another test\E|\Qrun from another test 2\E)$' \ test:Specs2Tests) local expected=( "+ run from another test" @@ -599,7 +599,7 @@ scala_specs2_junit_test_test_filter_match_multiple_methods(){ scala_specs2_exception_in_initializer_without_filter(){ - expected_message="org.specs2.control.UserException: cannot create an instance for class scala.test.junit.specs2.FailingTest" + expected_message="org.specs2.control.UserException: cannot create an instance for class scalarules.test.junit.specs2.FailingTest" test_command="test_expect_failure/scala_junit_test:specs2_failing_test" test_expect_failure_with_message "$expected_message" $test_filter $test_command @@ -649,7 +649,7 @@ revert_internal_change() { test_scala_library_expect_no_recompilation_on_internal_change_of_transitive_dependency() { set +e - no_recompilation_path="test/src/main/scala/scala/test/strict_deps/no_recompilation" + no_recompilation_path="test/src/main/scala/scalarules/test/strict_deps/no_recompilation" build_command="bazel build //$no_recompilation_path/... --subcommands --strict_java_deps=error" echo "running initial build" @@ -695,7 +695,7 @@ test_scala_library_expect_no_recompilation_on_internal_change() { dependency=$3 dependency_description=$4 set +e - no_recompilation_path="test/src/main/scala/scala/test/ijar" + no_recompilation_path="test/src/main/scala/scalarules/test/ijar" build_command="bazel build //$no_recompilation_path/... --subcommands" echo "running initial build" @@ -748,7 +748,7 @@ test_scala_import_library_passes_labels_of_direct_deps() { test_scala_classpath_resources_expect_warning_on_namespace_conflict() { local output=$(bazel build \ --verbose_failures \ - //test/src/main/scala/scala/test/classpath_resources:classpath_resource_duplicates + //test/src/main/scala/scalarules/test/classpath_resources:classpath_resource_duplicates ) local expected="Classpath resource file classpath-resourcehas a namespace conflict with another file: classpath-resource" @@ -801,7 +801,7 @@ $runner bazel test third_party/... $runner bazel build "test/... --strict_java_deps=ERROR" $runner bazel build "test/... --strict_java_deps=ERROR --all_incompatible_changes" $runner bazel test "test/... --strict_java_deps=ERROR" -$runner bazel run test/src/main/scala/scala/test/twitter_scrooge:justscrooges +$runner bazel run test/src/main/scala/scalarules/test/twitter_scrooge:justscrooges $runner bazel run test:JavaBinary $runner bazel run test:JavaBinary2 $runner bazel run test:JavaOnlySources @@ -826,7 +826,7 @@ $runner test_junit_test_must_have_prefix_or_suffix $runner test_junit_test_errors_when_no_tests_found $runner scala_library_jar_without_srcs_must_include_direct_file_resources $runner scala_library_jar_without_srcs_must_include_filegroup_resources -$runner bazel run test/src/main/scala/scala/test/large_classpath:largeClasspath +$runner bazel run test/src/main/scala/scalarules/test/large_classpath:largeClasspath $runner scala_test_test_filters $runner scala_junit_test_test_filter $runner scala_junit_test_test_filter_custom_runner @@ -866,9 +866,9 @@ $runner bazel build "test_expect_failure/missing_direct_deps/internal_deps/... - $runner test_scalaopts_from_scala_toolchain $runner test_scala_import_library_passes_labels_of_direct_deps $runner java_toolchain_javacopts_are_used -$runner bazel run test/src/main/scala/scala/test/classpath_resources:classpath_resource +$runner bazel run test/src/main/scala/scalarules/test/classpath_resources:classpath_resource $runner test_scala_classpath_resources_expect_warning_on_namespace_conflict $runner bazel build //test_expect_failure/proto_source_root/... --strict_proto_deps=off $runner scala_binary_jar_is_exposed_in_build_event_protocol $runner scala_test_jar_is_exposed_in_build_event_protocol -$runner scala_junit_test_jar_is_exposed_in_build_event_protocol \ No newline at end of file +$runner scala_junit_test_jar_is_exposed_in_build_event_protocol From 39c576c471f682f3e0912e3cbcb1deba97f0deb8 Mon Sep 17 00:00:00 2001 From: softprops Date: Wed, 20 Jun 2018 10:00:07 -0400 Subject: [PATCH 2/2] few more package renames --- test_expect_failure/disappearing_class/ClassProvider.scala | 2 +- test_expect_failure/disappearing_class/UsesClass.scala | 2 +- test_expect_failure/scala_junit_test/specs2/FailingTest.scala | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test_expect_failure/disappearing_class/ClassProvider.scala b/test_expect_failure/disappearing_class/ClassProvider.scala index 53a8d45b8..374bbca7b 100644 --- a/test_expect_failure/disappearing_class/ClassProvider.scala +++ b/test_expect_failure/disappearing_class/ClassProvider.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test object ClassProvider { def dissappearingClassMethod: String = "testContents" diff --git a/test_expect_failure/disappearing_class/UsesClass.scala b/test_expect_failure/disappearing_class/UsesClass.scala index fd4750d78..1697b517b 100644 --- a/test_expect_failure/disappearing_class/UsesClass.scala +++ b/test_expect_failure/disappearing_class/UsesClass.scala @@ -1,4 +1,4 @@ -package scala.test +package scalarules.test object UsesClass { val x = ClassProvider.dissappearingClassMethod diff --git a/test_expect_failure/scala_junit_test/specs2/FailingTest.scala b/test_expect_failure/scala_junit_test/specs2/FailingTest.scala index 6999e0016..35cbe0593 100644 --- a/test_expect_failure/scala_junit_test/specs2/FailingTest.scala +++ b/test_expect_failure/scala_junit_test/specs2/FailingTest.scala @@ -1,4 +1,4 @@ -package scala.test.junit.specs2 +package scalarules.test.junit.specs2 import org.specs2.mutable.SpecWithJUnit @@ -7,4 +7,4 @@ class FailingTest extends SpecWithJUnit { val boom: String = { throw new Exception("Boom") } "some test" >> { boom must beEmpty } -} \ No newline at end of file +}