Skip to content

Instantly share code, notes, and snippets.

@greggdonovan
Last active October 15, 2017 01:18
Show Gist options
  • Select an option

  • Save greggdonovan/cd9596ac2bd74b6d6d597991a6f7d437 to your computer and use it in GitHub Desktop.

Select an option

Save greggdonovan/cd9596ac2bd74b6d6d597991a6f7d437 to your computer and use it in GitHub Desktop.
diff --git a/test_run.sh b/test_run.sh
index e5bc24f..06cafa6 100755
--- a/test_run.sh
+++ b/test_run.sh
@@ -525,12 +525,34 @@ revert_change() {
mv $1/$2.bak $1/$2
}
+test_intellij_aspect() {
+ # Verify that any changes to rules_scala work with the IntelliJ aspect
+ # TODO(???) - test intellij at master and latest release
+ rules_scala_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+
+ if [[ "$runner" == "run_test_ci" ]]; then
+ # ci: checkout to a temporary directory as artifacts are transient.
+ cd $(mktemp -d)
+ git clone git@github.com:bazelbuild/intellij.git
+ cd intellij
+ else
+ # local: update or checkout a sibling dir. Should we use a submodule?
+ intellij_checkout_dir="${rules_scala_dir}/../"
+ test -d "intellij/.git" || git clone git@github.com:bazelbuild/intellij.git
+ cd intellij
+ git fetch && git pull && checkout origin/master
+ fi
+ bazel test --test_output=errors --incompatible_disallow_set_constructor=false --override_repository io_bazel_rules_scala=${rules_scala_dir} //aspect/testing/tests/src/com/google/idea/blaze/aspect/scala/...
+}
+
if [ "$1" != "ci" ]; then
runner="run_test_local"
else
runner="run_test_ci"
fi
+$runner test_intellij_aspect
$runner bazel build test/...
$runner bazel test test/...
$runner bazel test third_party/...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment