mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-26 20:02:22 +01:00
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
16 lines
369 B
Bash
Executable File
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
|