Skip to content

Commit

Permalink
Cleanup the .bazelrc (SeleniumHQ#8281)
Browse files Browse the repository at this point in the history
Note that all build options are inherited to the test command, and that all
test-specific options are also available on the build command. By using
"build" instead of "test", we ensure that the configuration options are the
same so that Bazel can cache the analysis (and execution) phases (otherwise
it can't and switching back and forth can be very slow).
  • Loading branch information
ulfjack authored May 7, 2020
1 parent c9aaf9b commit db60ce7
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ try-import .bazelrc.local

# Set the default java toolchain
build --java_toolchain=@bazel_tools//tools/jdk:toolchain_java11
test --java_toolchain=@bazel_tools//tools/jdk:toolchain_java11

# We target java 8 by default
build --javacopt "-source 8"
build --javacopt "-target 8"
build --javacopt="-source 8"
build --javacopt="-target 8"

# Require java dependencies to be used and first-order
build --strict_java_deps strict
build --strict_java_deps=strict

build --workspace_status_command scripts/build-info.py
build --workspace_status_command=scripts/build-info.py

# Make sure we get something helpful when tests fail
test --verbose_failures
test --test_output=errors
build --verbose_failures
build --test_output=errors

# Need to be able to open sockets on localhost
test --noexperimental_sandbox_default_allow_network
# Tests need to be able to open sockets on localhost
build --noexperimental_sandbox_default_allow_network

# Turn on the "Managed Directories" feature.
# This allows Bazel to share the same node_modules directory with other tools
Expand All @@ -27,8 +26,8 @@ test --noexperimental_sandbox_default_allow_network
common --experimental_allow_incremental_repository_updates

# pass environment variables to the test environment
test --test_env=TRAVIS
test --test_env=DISPLAY
test --test_env=MOZ_HEADLESS
test --test_env=DASHBOARD_URL
test --test_env=LOCALAPPDATA
build --test_env=TRAVIS
build --test_env=DISPLAY
build --test_env=MOZ_HEADLESS
build --test_env=DASHBOARD_URL
build --test_env=LOCALAPPDATA

0 comments on commit db60ce7

Please sign in to comment.