Make fuzz/run use shorthand for fuzz tests
now you can say:
fuzz/run --host hci_layer
to implicitly run bluetooth_gd_hci_layer_fuzz_test
Test: fuzz/run --host hci_layer
Change-Id: I8be5ecc14027b72195975d674ae1dfd9eb9f320d
diff --git a/system/gd/fuzz/run b/system/gd/fuzz/run
index 9468ed2..add645c 100755
--- a/system/gd/fuzz/run
+++ b/system/gd/fuzz/run
@@ -26,7 +26,9 @@
done
set -- "${POSITIONAL[@]}" # restore positional parameters
+TEST_NAME=bluetooth_gd_${1}_fuzz_test
+
if [ "$HOST" == true ] ; then
HOST_ARCH=$($ANDROID_BUILD_TOP/build/soong/soong_ui.bash --dumpvar-mode HOST_ARCH)
- SANITIZE_HOST=address $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --build-mode --"all-modules" --dir="$(pwd)" $1 && ${ANDROID_HOST_OUT}/fuzz/$HOST_ARCH/$1/$1 $2
+ SANITIZE_HOST=address $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --build-mode --"all-modules" --dir="$(pwd)" $TEST_NAME && ${ANDROID_HOST_OUT}/fuzz/$HOST_ARCH/$TEST_NAME/$TEST_NAME $2
fi