#!/bin/sh
#
#This script is used to run qemu test suites
#

ptestdir=$(dirname "$(readlink -f "$0")")
export SRC_PATH=$ptestdir

cd $ptestdir/tests
tests=$(find . -name "test-*" ! -name "*.p")
for f in $tests; do
    # Test hangs intermittently on qemurisc64 on autobuilder
    if [ "$f" = "./unit/test-nested-aio-poll" -a `uname -m` = "riscv64" ]; then
        continue
    fi
    echo "Running $f"
    $f  | sed '/^ok/ s/ok/PASS:/g'
done
