forked from renode/renode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrenode-test
More file actions
executable file
·26 lines (21 loc) · 906 Bytes
/
renode-test
File metadata and controls
executable file
·26 lines (21 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
set -e
set -u
# this is to support running renode-test from an external directory and via a symlink
ROOT_PATH="$(cd $(dirname $(readlink -f $0 2>/dev/null || echo $0)); echo $PWD)"
TESTS_FILE="$ROOT_PATH/tests/tests.yaml"
TESTS_RESULTS="$ROOT_PATH/output/tests"
. "${ROOT_PATH}/tools/common.sh"
set +e
STTY_CONFIG=`stty -g 2>/dev/null`
$PYTHON_RUNNER -u "`get_path "$ROOT_PATH/tests/run_tests.py"`" --exclude "skip_${DETECTED_OS}" --exclude "skip_host_${DETECTED_ARCH}" --properties-file "`get_path "$ROOT_PATH/output/properties.csproj"`" -r "`get_path "$TESTS_RESULTS"`" -t "`get_path "$TESTS_FILE"`" "$@"
RESULT_CODE=$?
set -e
if [ -n "${STTY_CONFIG:-}" ]
then
# SIGTTOU might be sent when trying to change the terminal settings when "renode-test" runs in the background so trap the signal.
trap "" SIGTTOU
stty "$STTY_CONFIG"
trap - SIGTTOU
fi
exit $RESULT_CODE