diff --git a/integration_tests/aspect/common.bats b/integration_tests/aspect/common.bats index 6439f3701..fe0708692 100644 --- a/integration_tests/aspect/common.bats +++ b/integration_tests/aspect/common.bats @@ -6,11 +6,16 @@ aspect() { # but the configured path is only writable by specific users which we can't run as within the sandbox. # these system wide flag affect the output path of the bazel-in-bazel that is run inside the tests leading to errors. # NOTE: the output files left by bazel-in-bazel should be discarded as they are not part of the action. - "$TEST_SRCDIR/build_aspect_cli/cmd/aspect/aspect_/aspect" --nosystem_rc --nohome_rc $@ + "$TEST_SRCDIR/build_aspect_cli/cmd/aspect/aspect_/aspect" --nosystem_rc --nohome_rc "$@" +} + +aspect_bare() { + "$TEST_SRCDIR/build_aspect_cli/cmd/aspect/aspect_/aspect" "$@" } setup_file() { - export USE_BAZEL_VERSION=$(realpath $BAZEL_BINARY) + USE_BAZEL_VERSION="$(realpath "$BAZEL_BINARY")" + export USE_BAZEL_VERSION export HOME="$TEST_TMPDIR" mkdir -p "$HOME/.aspect/cli" touch "$HOME/.aspect/cli/config.yaml" @@ -19,4 +24,4 @@ setup_file() { teardown_file() { aspect shutdown rm -f "$HOME/.aspect/cli/config.yaml" -} \ No newline at end of file +} diff --git a/integration_tests/aspect/version_test.bats b/integration_tests/aspect/version_test.bats index 6959bbb58..371ea5851 100644 --- a/integration_tests/aspect/version_test.bats +++ b/integration_tests/aspect/version_test.bats @@ -14,6 +14,8 @@ setup() { } @test '--version flag should work' { - run aspect --version + # Use aspect_bare so we don't also set additional flags such as --nosystem_rc and --nohome_rc; + # --version flag has special handling and should be the only flag passed + run aspect_bare --version assert_output --partial "aspect unknown [not built with --stamp]" }