Files
wolfssl/scripts/unit.test
Elms 93ea355217 build: fix make distcheck
Need to check if `unit.test` was run from make process and set
different path to run unit test executable.

Writing files in the dist is not allowed during distcheck so write
files to subdirectory used build during distmake
2021-02-05 07:25:07 -08:00

16 lines
369 B
Bash
Executable File

#!/bin/sh
# for makefile use PWD as it is safe to assume location of execution
if [ "$MAKELEVEL" != "" ]; then
DIRNAME=$PWD;
else
DIRNAME="$(dirname "$0")/..";
fi
bwrap_path="$(command -v bwrap)"
if [ -n "$bwrap_path" ]; then
exec "$bwrap_path" --unshare-net --dev-bind / / "$DIRNAME/tests/unit.test" "$@"
else
exec "$DIRNAME/tests/unit.test" "$@"
fi