unit.test 369 B

123456789101112131415
  1. #!/bin/sh
  2. # for makefile use PWD as it is safe to assume location of execution
  3. if [ "$MAKELEVEL" != "" ]; then
  4. DIRNAME=$PWD;
  5. else
  6. DIRNAME="$(dirname "$0")/..";
  7. fi
  8. bwrap_path="$(command -v bwrap)"
  9. if [ -n "$bwrap_path" ]; then
  10. exec "$bwrap_path" --unshare-net --dev-bind / / "$DIRNAME/tests/unit.test" "$@"
  11. else
  12. exec "$DIRNAME/tests/unit.test" "$@"
  13. fi