[benchmarking] Change vulkan_is_supported output to stdout
Motivated by the recent benchmarking "run" failures, change the
vulkan_is_supported output to stdout rather than exit status, so that
graphics tests don't silently get removed when running
vulkan_is_supported fails.
PT-71 #comment patch
Test: CQ
Change-Id: I400d558474b8bc9b71ec4809e3c807466524687b
diff --git a/tests/benchmarks/topaz_benchmarks.sh b/tests/benchmarks/topaz_benchmarks.sh
index cc87fb6..4522fd5 100644
--- a/tests/benchmarks/topaz_benchmarks.sh
+++ b/tests/benchmarks/topaz_benchmarks.sh
@@ -14,13 +14,17 @@
runbench_read_arguments "$@"
# Run benchmarks
-if `/pkgfs/packages/run/0/bin/run vulkan_is_supported`; then
- # Run these benchmarks in the current shell environment, because they write
+vulkan_is_supported_result="$(/pkgfs/packages/run/0/bin/run vulkan_is_supported || echo '')"
+if [ "${vulkan_is_supported_result}" = '1' ]; then
+ # Run the gfx benchmarks in the current shell environment, because they write
# to (hidden) global state used by runbench_finish.
. /pkgfs/packages/startup_benchmarks/0/bin/startup_benchmarks.sh "$@"
. /pkgfs/packages/topaz_benchmarks/0/bin/gfx_benchmarks.sh "$@"
+elif [ "${vulkan_is_supported_result}" = '0' ]; then
+ echo 'Vulkan not supported; graphics tests skipped.'
else
- echo "Vulkan not supported; graphics tests skipped."
+ echo 'Error: Failed to run vulkan_is_supported'
+ exit 1
fi
# Exit with a code indicating whether any errors occurred.