#!/bin/sh

# Run testsuite which use dejagnu
cd ./testsuite
for tool in pmap slabtop hugetop sysctl kill w free lib pgrep pkill ps pwdx uptime vmstat; do
    runtest -a --tool $tool --outdir ../log
done
cd -

# Run test programs not used by dejagnu but run directly
for p in  test_escape test_pids test_uptime test_sysinfo test_version test_namespace test_fileutils test_strtod_nol; do
    ./src/tests/"$p" > ./log/"$p".log 2>&1
    case "$?" in
        0)
            echo "PASS: $p"
            ;;
        77)
            echo "SKIP: $p"
            ;;
        *)
            echo "FAIL: $p"
            ;;
    esac
done
