mirror of
https://github.com/troglobit/finit.git
synced 2026-10-26 12:14:37 +00:00
test: namespace cleanup, common -> src, tenv -> lib, etc.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
49cd3a441d
commit
9c727ed08d
38 files changed
+61
-66
No files matched your search
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
cmd=""
|
||||
if [ "$#" -lt 1 ]; then
|
||||
cmd="/bin/sh"
|
||||
else
|
||||
cmd=$1
|
||||
shift
|
||||
fi
|
||||
|
||||
TEST_DIR=$(dirname "$0")/..
|
||||
SYSROOT="${SYSROOT:-$(pwd)/${TEST_DIR}/sysroot}"
|
||||
PID_FILE="$SYSROOT/running_test.pid"
|
||||
|
||||
if [ -f "$PID_FILE" ] ; then
|
||||
target=$(cat "$PID_FILE")
|
||||
target=$(pgrep -P "$target")
|
||||
else
|
||||
echo "No test running!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. "$TEST_DIR/test.env"
|
||||
|
||||
"$(dirname "$0")"/exec.sh "$target" "$cmd" "$@"
|
||||
Reference in new issue
Block a user