Squelch output for a failure case in mixed_mode_test

Currently, the expected output shows as the main text for
unrelated presubmit failures.
Bug: 278748024
Test: build/soong/tests/mixed_mode_test.sh

Change-Id: I553a82597c7c7791a822e330eb9b2663f35567a1
This commit is contained in:
MarkDacek
2023-04-18 19:33:11 +00:00
committed by Mark Dacek
parent fdef3506c7
commit 53506361da

View File

@@ -1,4 +1,4 @@
#!/bin/bash -eu
#!/bin/bash
set -o pipefail
@@ -88,12 +88,12 @@ EOF
fail "Bazel actions not found for force-enabled module"
fi
local exit_code=`run_soong --bazel-force-enabled-modules=unenabled-touch-file nothing`
unused=`run_soong --bazel-force-enabled-modules=unenabled-touch-file nothing >/dev/null`
if [[ $exit_code -ne 1 ]]; then
if [[ $? -ne 1 ]]; then
fail "Expected failure due to force-enabling an unenabled module "
fi
}
scan_and_run_tests
scan_and_run_tests