blob: cb28a0d13e229321df7cb79e55c7787e07bb0da9 [file] [log] [blame]
#!/bin/bash
# Note: this assumes that the images have all been built and the current working
# directory is the root of the repo.
# Fail on any error.
set -e
# Display commands being run.
set -x
TIMEOUT="timeout --foreground"
OUT="out/aarch64/qemu"
HFTEST="$TIMEOUT 30s ./test/vm/hftest.py --out $OUT/clang_aarch64 --initrd"
# Run the host unit tests
mkdir -p $OUT/clang_mock_arch/test_log/unit_tests
$TIMEOUT 30s $OUT/clang_mock_arch/unit_tests \
--gtest_output="xml:$OUT/clang_mock_arch/test_log/unit_tests/sponge_log.xml" \
| tee $OUT/clang_mock_arch/test_log/unit_tests/sponge_log.log
# Run the tests with a timeout so they can't loop forever.
$HFTEST primary_only_test
$HFTEST primary_with_secondary_test