fix: save the build log when running tests

...and direct the user there if something goes wrong
This commit is contained in:
Dylan MacKenzie 2023-11-06 16:10:52 -08:00
parent 34c8b3f1e3
commit ed58642a80

View file

@ -26,9 +26,11 @@ fi
testcase="$path"
echo "Running $testcase:"
west build -d build/$testcase -b native_posix_64 -- -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1
mkdir -p build/$testcase
west build -d build/$testcase -b native_posix_64 -- -DZMK_CONFIG="$(pwd)/$testcase" >build/$testcase/build.log 2>&1
if [ $? -gt 0 ]; then
echo "FAILED: $testcase did not build" | tee -a ./build/tests/pass-fail.log
echo $'\t' "see ./build/$testcase/build.log"
exit 1
fi