Skip to content

Commit 77cab9d

Browse files
committed
Kotlin: tweak plugin test
Put less emphasis on plugin build isolation, to get a better DevEx out of it. The crux of the test is the database extraction part, not the plugin build.
1 parent b43a0e7 commit 77cab9d

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-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: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,14 @@ 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,
2418
)
2519
shutil.copy(
26-
"bazel-bin/java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/plugin.jar",
20+
f"{semmle_code_dir}/bazel-bin/external/ql+/java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/plugin.jar",
2721
"plugin.jar",
2822
)
2923
codeql.database.create(

0 commit comments

Comments
 (0)