unos-repository

APK repository for unos
git clone git://git.finwo.net/misc/unos-repository
Log | Files | Refs | README

run.sh (763B)


      1 #!/bin/sh
      2 # tests/run.sh - run the package-repository test suite.
      3 #
      4 #   ./tests/run.sh            everything
      5 #   ./tests/run.sh --unit     same (only unit tests exist here)
      6 #
      7 # These tests validate the dependency graph, the generated pipeline, applet
      8 # policy and packaging layout. None of them boots a machine: anything that
      9 # needs a running system lives in the unos OS-assembly repo.
     10 set -eu
     11 HERE=$(cd "$(dirname "$0")" && pwd)
     12 
     13 fail=0
     14 run_one() {
     15   echo
     16   echo "=== $1 ==="
     17   if sh "$1"; then
     18     echo "--- PASS $1"
     19   else
     20     echo "--- FAIL $1" >&2
     21     fail=1
     22   fi
     23 }
     24 
     25 for t in "${HERE}"/unit/*.sh; do
     26   [ -e "$t" ] || continue
     27   run_one "$t"
     28 done
     29 
     30 echo
     31 if [ "$fail" = "0" ]; then
     32   echo "ALL TESTS PASSED"
     33 else
     34   echo "SOME TESTS FAILED" >&2
     35 fi
     36 exit "$fail"