Skip to content

Commit

Permalink
Using more bazelish way to pass "default" options to bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Sep 5, 2019
1 parent 4d9d6cd commit 4a72cc8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ test --noexperimental_sandbox_default_allow_network
# NB: this option was introduced in Bazel 0.26
# See https://docs.bazel.build/versions/master/command-line-reference.html#flag--experimental_allow_incremental_repository_updates
common --experimental_allow_incremental_repository_updates

# pass environment variables to the test environment
test --test_env=TRAVIS
test --test_env=DISPLAY
test --test_env=DASHBOARD_URL
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cache:

matrix:
exclude:
- env: BZL_TEST="--test_tag_filters=htmlunit //java/..."
- env: BZL="test --test_tag_filters=htmlunit //java/..."
<<: *java
- env: TOXENV=flake8
<<: *python
Expand Down Expand Up @@ -85,18 +85,18 @@ matrix:
<<: *firefox-latest
- env: BZL="build //java/..."
<<: *java
- env: BZL_TEST="--test_size_filters=small //java/..."
- env: BZL="test --test_size_filters=small //java/..."
<<: *java
- env: MARIONETTE=1 BZL_TEST="--test_tag_filters=firefox //java/..."
- env: MARIONETTE=1 BZL="test --test_tag_filters=firefox //java/..."
<<: *java
<<: *firefox-nightly
- env: CHROME=1 BZL_TEST="--test_tag_filters=chrome //java/..."
- env: CHROME=1 BZL="test --test_tag_filters=chrome //java/..."
<<: *java
<<: *chrome
- env: MARIONETTE=1 MOZ_HEADLESS=1 TASK="calcdeps" BZL_TEST="//javascript/atoms:test-firefox //javascript/selenium-atoms:test-firefox //javascript/webdriver:test-firefox"
- env: MARIONETTE=1 MOZ_HEADLESS=1 TASK="calcdeps" BZL="test //javascript/atoms:test-firefox //javascript/selenium-atoms:test-firefox //javascript/webdriver:test-firefox"
<<: *java
<<: *firefox-latest
- env: CHROME=1 TASK="calcdeps" BZL_TEST="//javascript/atoms:test-chrome //javascript/selenium-atoms:test-chrome //javascript/webdriver:test-chrome"
- env: CHROME=1 TASK="calcdeps" BZL="test //javascript/atoms:test-chrome //javascript/selenium-atoms:test-chrome //javascript/webdriver:test-chrome"
<<: *java
<<: *chrome
- env: TASK=javadocs
Expand Down
14 changes: 0 additions & 14 deletions scripts/travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,6 @@ if [[ ! -z "$BZL" ]]; then
fi
fi

if [[ ! -z "$BZL_TEST" ]]; then
if [[ $BZL_TEST == test\ //javascript/* ]]; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^javascript/' >/dev/null; then
bazel test --test_env=TRAVIS --test_env=DISPLAY --test_env=DASHBOARD_URL $BZL_TEST
fi
elif [[ $BZL_TEST == test\ * ]]; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^java/' >/dev/null; then
bazel test --test_env=TRAVIS --test_env=DISPLAY --test_env=DASHBOARD_URL $BZL_TEST
fi
else
bazel test --test_env=TRAVIS --test_env=DISPLAY --test_env=DASHBOARD_URL $BZL_TEST
fi
fi

if [[ ! -z "$NPM" ]]; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^javascript/' >/dev/null; then
./go node:atoms
Expand Down

0 comments on commit 4a72cc8

Please sign in to comment.