Skip to content

Commit 85d1e06

Browse files
authored
Merge pull request #20039 from github/redsun82/kotlin-plugin-test
Kotlin: tweak plugin test
2 parents 87a8dcc + 31d0897 commit 85d1e06

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ kt_jvm_library(
1717
srcs = ["Plugin.kt"],
1818
kotlinc_opts = ":kotlinc-options",
1919
module_name = "test",
20-
resource_strip_prefix = "%s/resources" % package_name(),
20+
resource_strip_prefix = "../%s/%s/resources" % (
21+
repo_name(),
22+
package_name(),
23+
),
2124
resources = glob(["resources/**"]),
2225
deps = [
2326
"@kotlin-compiler-%s" % _version,

java/ql/integration-tests/kotlin/linux/custom_plugin/test.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,15 @@ def test(codeql, java_full, cwd, semmle_code_dir, test_dir):
1010
commands.run(
1111
[
1212
f"{semmle_code_dir}/tools/bazel",
13-
f"--output_user_root={build_dir}",
1413
"--max_idle_secs=1",
1514
"build",
16-
"//java/ql/integration-tests/kotlin/linux/custom_plugin/plugin",
17-
"--spawn_strategy=local",
18-
"--nouse_action_cache",
19-
"--noremote_accept_cached",
20-
"--noremote_upload_local_results",
21-
f'--symlink_prefix={cwd / "bazel-"}',
15+
"@codeql//java/ql/integration-tests/kotlin/linux/custom_plugin/plugin",
2216
],
23-
_cwd=test_dir,
17+
_cwd=semmle_code_dir,
18+
_env={"CODEQL_BAZEL_REMOTE_CACHE": "false"},
2419
)
2520
shutil.copy(
26-
"bazel-bin/java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/plugin.jar",
21+
f"{semmle_code_dir}/bazel-bin/external/ql+/java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/plugin.jar",
2722
"plugin.jar",
2823
)
2924
codeql.database.create(

0 commit comments

Comments
 (0)