-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15627 from github/criemen/java-test
Move the JS java tests to be a proper `java_test` target.
- Loading branch information
Showing
3 changed files
with
54 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 12 additions & 24 deletions
36
javascript/extractor/test/com/semmle/js/extractor/test/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,21 @@ | ||
java_test( | ||
name = "test_jar", | ||
srcs = glob(["**/*.java"]), | ||
test_class = "com.semmle.js.extractor.test.AllTests", | ||
deps = [ | ||
"//javascript/extractor", | ||
"//javascript/extractor:deps", | ||
"@//resources/lib/java/DO_NOT_DISTRIBUTE:junit", | ||
], | ||
) | ||
|
||
# We need to unzip the typescript wrapper, and provide node on the path. | ||
# Therefore, we're wrapping the java_test inside a sh_test. | ||
sh_test( | ||
name = "test", | ||
size = "small", | ||
srcs = ["run_tests.sh"], | ||
args = [ | ||
"$(execpath @nodejs//:node_bin)", | ||
"$(JAVABASE)/bin/java", | ||
"$(rootpath //javascript/extractor/lib/typescript)", | ||
"$(rootpath test_jar_deploy.jar)", | ||
], | ||
srcs = glob(["**/*.java"]), | ||
data = [ | ||
":test_jar_deploy.jar", | ||
"//javascript/extractor/lib/typescript", | ||
"//javascript/extractor/parser-tests", | ||
"//javascript/extractor/tests", | ||
"@bazel_tools//tools/jdk:current_java_runtime", | ||
"@nodejs//:node_bin", | ||
], | ||
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"], | ||
test_class = "com.semmle.js.extractor.test.AllTests", | ||
deps = [ | ||
"//javascript/extractor", | ||
"//javascript/extractor:deps", | ||
"@//resources/lib/java/DO_NOT_DISTRIBUTE:junit", | ||
"@bazel_tools//tools/java/runfiles", | ||
], | ||
env = { | ||
"NODE_BIN": "$(rlocationpath @nodejs//:node_bin)", | ||
"TS_WRAPPER_ZIP": "$(rlocationpath //javascript/extractor/lib/typescript)", | ||
}, | ||
) |
31 changes: 0 additions & 31 deletions
31
javascript/extractor/test/com/semmle/js/extractor/test/run_tests.sh
This file was deleted.
Oops, something went wrong.