Skip to content

Commit

Permalink
add integ test
Browse files Browse the repository at this point in the history
  • Loading branch information
wisechengyi committed Mar 9, 2021
1 parent 23cdaf7 commit 2e2670c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/shell/integration/startup_options_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,16 @@ function test_multiple_bazelrc_set_different_options() {
expect_log "Inherited 'common' options: --test_output=all"
}

function test_bazelrc_after_devnull_ignored() {
echo "common --verbose_failures" > 1.rc
echo "common --test_output=all" > 2.rc
echo "common --definitely_invalid_config" > 3.rc

bazel "--${PRODUCT_NAME}rc=1.rc" "--${PRODUCT_NAME}rc=2.rc" "--${PRODUCT_NAME}rc=/dev/null" \
"--${PRODUCT_NAME}rc=3.rc" build --announce_rc &> $TEST_log || fail "Should pass"
expect_log "Inherited 'common' options: --verbose_failures"
expect_log "Inherited 'common' options: --test_output=all"
expect_not_log "--definitely_invalid_config"
}

run_suite "${PRODUCT_NAME} startup options test"

0 comments on commit 2e2670c

Please sign in to comment.