Modify makefile to support running PAL tests
Bug: 157906549
Test: ./run_pal_impl_tests.sh
Change-Id: I45274f9467fd4ffde2dceac213358cd386d796f9
diff --git a/run_pal_impl_tests.sh b/run_pal_impl_tests.sh
new file mode 100755
index 0000000..4b0daed
--- /dev/null
+++ b/run_pal_impl_tests.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# Quit if any command produces an error.
+set -e
+
+# Build and run the CHRE unit test binary.
+JOB_COUNT=$((`grep -c ^processor /proc/cpuinfo`))
+
+# Export the variant Makefile.
+export CHRE_VARIANT_MK_INCLUDES="$CHRE_VARIANT_MK_INCLUDES \
+ variant/googletest/variant.mk"
+
+export RUN_PAL_IMPL_TESTS=true
+
+make clean
+make google_x86_googletest_debug -j$JOB_COUNT
+./out/google_x86_googletest_debug/libchre $1