diff options
author | 2017-11-29 01:31:47 -0800 | |
---|---|---|
committer | 2017-11-29 01:33:24 -0800 | |
commit | 9c78a79c02d38a98a38d852e10b16d8cb7a59c91 (patch) | |
tree | a9af77a8a9c2dc588705351d64941596bfc8b89f /src/test/shell | |
parent | ff62e1d0edf65d5103dde914db780f9c10371b92 (diff) |
Various Shell Script Fixes and Improvements - Part One
see #4023
Closes #4051.
PiperOrigin-RevId: 177279457
Diffstat (limited to 'src/test/shell')
-rwxr-xr-x | src/test/shell/bazel/workspace_test.sh | 2 | ||||
-rwxr-xr-x | src/test/shell/integration/java_integration_test.sh | 2 | ||||
-rwxr-xr-x | src/test/shell/integration/loading_phase_tests.sh | 2 | ||||
-rwxr-xr-x | src/test/shell/integration/progress_reporting_test.sh | 2 | ||||
-rwxr-xr-x | src/test/shell/integration_test_setup.sh | 2 | ||||
-rwxr-xr-x | src/test/shell/testenv.sh | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/src/test/shell/bazel/workspace_test.sh b/src/test/shell/bazel/workspace_test.sh index bd436effa6..d09e37ae4b 100755 --- a/src/test/shell/bazel/workspace_test.sh +++ b/src/test/shell/bazel/workspace_test.sh @@ -104,7 +104,7 @@ genrule( EOF bazel fetch //:test || fail "Fetch failed" bazel build //:test || echo "Expected build to succeed" - check_eq "12" "$(cat bazel-genfiles/test.out | tr -d '[[:space:]]')" + check_eq "12" "$(cat bazel-genfiles/test.out | tr -d '[:space:]')" } # Regression test for issue #724: NullPointerException in WorkspaceFile diff --git a/src/test/shell/integration/java_integration_test.sh b/src/test/shell/integration/java_integration_test.sh index 984eca739d..f2f69332ff 100755 --- a/src/test/shell/integration/java_integration_test.sh +++ b/src/test/shell/integration/java_integration_test.sh @@ -270,7 +270,7 @@ EOF cp ${PRODUCT_NAME}-bin/$pkg/java/hello/hello_deploy.jar $pkg/ugly/ $pkg/ugly/hello build.target build.time build.timestamp \ - main.class=hello.Hello "$expected_build_data" 2>&1 >>$TEST_log + main.class=hello.Hello "$expected_build_data" >> $TEST_log 2>&1 expect_log 'Hello, World!' } diff --git a/src/test/shell/integration/loading_phase_tests.sh b/src/test/shell/integration/loading_phase_tests.sh index 94bbd04d75..4227fe19e6 100755 --- a/src/test/shell/integration/loading_phase_tests.sh +++ b/src/test/shell/integration/loading_phase_tests.sh @@ -131,7 +131,7 @@ function test_all_help_topics_succeed() { awk '{print $1}') \ startup_options \ target-syntax) - for topic in ${topics[@]}; do + for topic in "${topics[@]}"; do bazel help $topic >$TEST_log 2>&1 || { fail "help $topic failed" expect_not_log . # print the log diff --git a/src/test/shell/integration/progress_reporting_test.sh b/src/test/shell/integration/progress_reporting_test.sh index 6027b5a406..f01199423f 100755 --- a/src/test/shell/integration/progress_reporting_test.sh +++ b/src/test/shell/integration/progress_reporting_test.sh @@ -25,7 +25,7 @@ set -eu # TODO(b/37617303): make tests UI-independent add_to_bazelrc "build --noexperimental_ui" -add_to_bazelrc "build --workspace_status_command="$(which true)" --nostamp" +add_to_bazelrc "build --workspace_status_command=$(which true) --nostamp" add_to_bazelrc "build --show_progress_rate_limit=-1" add_to_bazelrc "build --genrule_strategy=local" diff --git a/src/test/shell/integration_test_setup.sh b/src/test/shell/integration_test_setup.sh index 73f7c925e8..ba051d4b62 100755 --- a/src/test/shell/integration_test_setup.sh +++ b/src/test/shell/integration_test_setup.sh @@ -22,7 +22,7 @@ function print_message_and_exit() { CURRENT_SCRIPT=${BASH_SOURCE[0]} # Go to the directory where the script is running cd "$(dirname ${CURRENT_SCRIPT})" \ - || print_message_and_exit "Unable to access "$(dirname ${CURRENT_SCRIPT})"" + || print_message_and_exit "Unable to access $(dirname ${CURRENT_SCRIPT})" DIR=$(pwd) # Load the unit test framework diff --git a/src/test/shell/testenv.sh b/src/test/shell/testenv.sh index e9eee3355d..20f50948c9 100755 --- a/src/test/shell/testenv.sh +++ b/src/test/shell/testenv.sh @@ -472,7 +472,7 @@ function cleanup_workspace() { cd ${WORKSPACE_DIR} bazel clean >> $TEST_log 2>&1 # Clean up the output base - for i in $(ls); do + for i in *; do if ! is_tools_directory "$i"; then rm -fr "$i" fi |