diff --git a/tests/compile/srcjar/test b/tests/compile/srcjar/test index 00d1c74f..a2831c52 100755 --- a/tests/compile/srcjar/test +++ b/tests/compile/srcjar/test @@ -1,20 +1,22 @@ #!/bin/bash -e . "$(dirname "$0")"/../../common.sh +package_output_directory='../../bazel-bin/compile/srcjar' + zip -FSr example.srcjar Example.scala META-INF/MANIFEST.MF bazel build :lib-srcjar diff <( sort expected) <( - zipinfo -m -T --h-t "$(bazel info bazel-bin)/compile/srcjar/lib-srcjar.jar" | sort + zipinfo -m -T --h-t "$package_output_directory/lib-srcjar.jar" | sort ) zip -FSr example-sources.jar Example.scala META-INF/MANIFEST.MF bazel build :lib-sources-jar diff <( sort expected) <( - zipinfo -m -T --h-t "$(bazel info bazel-bin)/compile/srcjar/lib-sources-jar.jar" | sort + zipinfo -m -T --h-t "$package_output_directory/lib-sources-jar.jar" | sort ) zip -FSr example-src.jar Example.scala META-INF/MANIFEST.MF bazel build :lib-src-jar diff <( sort expected) <( - zipinfo -m -T --h-t "$(bazel info bazel-bin)/compile/srcjar/lib-src-jar.jar" | sort + zipinfo -m -T --h-t "$package_output_directory/lib-src-jar.jar" | sort ) diff --git a/tests/plugins/semanticdb/test b/tests/plugins/semanticdb/test index fbcf104f..d93bae1a 100755 --- a/tests/plugins/semanticdb/test +++ b/tests/plugins/semanticdb/test @@ -18,10 +18,11 @@ check_semanticdb_info() { bazel build ":semanticdb-$1-semanticdb-info" output_path="$bazel_bin/plugins/semanticdb/semanticdb-$1-semanticdb-info.txt" - semanticdb_file_directory="bazel-out/k8-fastbuild/bin/plugins/semanticdb/semanticdb-$1/semanticdb/META-INF/semanticdb/plugins/semanticdb" + reported_semanticdb_files="$(jq -r '.semanticDbFiles[]' "$output_path" | sed -E 's_^bazel-out/[^\n/]+/bin/__g')" + semanticdb_file_directory="plugins/semanticdb/semanticdb-$1/semanticdb/META-INF/semanticdb/plugins/semanticdb" - [ "$(jq ".targetRoot" "$output_path")" = "\"plugins/semanticdb/semanticdb-$1/semanticdb\"" ] - [ "$(jq -c ".semanticDbFiles" "$output_path")" = "[\"$semanticdb_file_directory/A.scala.semanticdb\",\"$semanticdb_file_directory/B.scala.semanticdb\"]" ] + [ "$(jq '.targetRoot' "$output_path")" = "\"plugins/semanticdb/semanticdb-$1/semanticdb\"" ] + [ "$reported_semanticdb_files" = "$semanticdb_file_directory/A.scala.semanticdb"$'\n'"$semanticdb_file_directory/B.scala.semanticdb" ] } bazel build :semanticdb-2_13 diff --git a/tests/resources/maven/test b/tests/resources/maven/test index 7b10ed91..0c9f426b 100755 --- a/tests/resources/maven/test +++ b/tests/resources/maven/test @@ -3,5 +3,5 @@ bazel build :maven diff <(sort expected) <( - zipinfo -m -T --h-t "$(bazel info bazel-bin)/resources/maven/maven.jar" | sort + zipinfo -m -T --h-t "../../bazel-bin/resources/maven/maven.jar" | sort ) diff --git a/tests/resources/plain/test b/tests/resources/plain/test index 073e488f..91ac2a16 100755 --- a/tests/resources/plain/test +++ b/tests/resources/plain/test @@ -1,12 +1,14 @@ #!/bin/bash -e . "$(dirname "$0")"/../../common.sh +package_output_directory='../../bazel-bin/resources/plain' + bazel build :plain diff <(sort expected_plain) <( - zipinfo -m -T --h-t "$(bazel info bazel-bin)/resources/plain/plain.jar" | sort + zipinfo -m -T --h-t "$package_output_directory/plain.jar" | sort ) bazel build :merged diff <(sort expected_merged) <( - zipinfo -m -T --h-t "$(bazel info bazel-bin)/resources/plain/merged.jar" | sort + zipinfo -m -T --h-t "$package_output_directory/merged.jar" | sort ) diff --git a/tests/resources/prefix/test b/tests/resources/prefix/test index ccff72be..6b13b485 100755 --- a/tests/resources/prefix/test +++ b/tests/resources/prefix/test @@ -3,7 +3,7 @@ bazel build :prefix diff <(sort expected) <( - zipinfo -m -T --h-t "$(bazel info bazel-bin)/resources/prefix/prefix.jar" | sort + zipinfo -m -T --h-t "../../bazel-bin/resources/prefix/prefix.jar" | sort ) ! bazel build :outside diff --git a/tests/resources/reference_conf/test b/tests/resources/reference_conf/test index 3f9169f6..922eb73b 100755 --- a/tests/resources/reference_conf/test +++ b/tests/resources/reference_conf/test @@ -1,12 +1,14 @@ #!/bin/bash -e . "$(dirname "$0")"/../../common.sh +package_output_directory='../../bazel-bin/resources/reference_conf' + bazel build :plain_java diff <(sort expected_plain) <( - zipinfo -m -T --h-t "$(bazel info bazel-bin)/resources/reference_conf/libplain_java.jar" | sort + zipinfo -m -T --h-t "$package_output_directory/libplain_java.jar" | sort ) bazel build :plain diff <(sort expected_plain) <( - zipinfo -m -T --h-t "$(bazel info bazel-bin)/resources/reference_conf/plain.jar" | sort + zipinfo -m -T --h-t "$package_output_directory/plain.jar" | sort ) diff --git a/tests/scaladoc/test b/tests/scaladoc/test index ef3acd7a..94fe1ccf 100755 --- a/tests/scaladoc/test +++ b/tests/scaladoc/test @@ -2,4 +2,4 @@ . "$(dirname "$0")"/../common.sh bazel build :a_doc -grep -q '