[script] use real time when run expect tests (#5130)

This commit is contained in:
Yakun Xu
2020-07-15 10:47:29 -07:00
committed by GitHub
parent 5ce29eb89c
commit bd3332810a
+13 -2
View File
@@ -44,7 +44,6 @@ readonly NODE_TYPE="${NODE_TYPE:-sim}"
readonly OT_NATIVE_IP="${OT_NATIVE_IP:-0}"
readonly THREAD_VERSION="${THREAD_VERSION:-1.1}"
readonly VERBOSE="${VERBOSE:-0}"
readonly VIRTUAL_TIME="${VIRTUAL_TIME:-1}"
build_simulation()
{
@@ -347,6 +346,18 @@ envsetup()
fi
fi
if [[ ! ${VIRTUAL_TIME+x} ]]; then
# All expect tests only works in real time mode.
VIRTUAL_TIME=1
for arg in "$@"; do
if [[ $arg == expect ]]; then
VIRTUAL_TIME=0
break
fi
done
fi
readonly VIRTUAL_TIME
export NODE_TYPE VIRTUAL_TIME
# CMake always works in verbose mode if VERBOSE exists in environments.
@@ -365,7 +376,7 @@ envsetup()
main()
{
envsetup
envsetup "$@"
if [[ -z $1 ]]; then
print_usage 1