File: run-tests.sh

package info (click to toggle)
sanoid 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 648 kB
  • sloc: perl: 3,166; sh: 590; makefile: 25
file content (30 lines) | stat: -rwxr-xr-x 544 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# run's all the available tests

for test in */; do
    if [ ! -x "${test}/run.sh" ]; then
        continue
    fi

    testName="${test%/}"

    LOGFILE=/tmp/sanoid_test_run_"${testName}".log

    pushd . > /dev/null

    echo -n "Running test ${testName} ... "
    cd "${test}"
    echo -n y | bash run.sh > "${LOGFILE}" 2>&1

    ret=$?
    if [ $ret -eq 0 ]; then
        echo "[PASS]"
    elif [ $ret -eq 130 ]; then
        echo "[SKIPPED]"
    else
        echo "[FAILED] (see ${LOGFILE})"
    fi

    popd > /dev/null
done