2016-07-04 11:45:15 +00:00
|
|
|
#!/bin/bash
|
2016-06-22 12:07:46 +00:00
|
|
|
# a shell with test environment set up, logged commands and output
|
|
|
|
|
|
|
|
LANG=C
|
2016-11-11 09:12:05 +00:00
|
|
|
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
|
|
|
|
TOP=$(readlink -f "$SCRIPT_DIR/../")
|
2021-03-09 13:47:11 +00:00
|
|
|
TEST_TOP="$TOP/tests"
|
|
|
|
INTERNAL_BIN="$TOP"
|
2016-06-22 12:07:46 +00:00
|
|
|
TEST_DEV=${TEST_DEV:-}
|
|
|
|
RESULTS="$TOP/tests/test-console.txt"
|
|
|
|
IMAGE="$TOP/tests/test.img"
|
|
|
|
|
|
|
|
source common
|
|
|
|
source common.convert
|
|
|
|
|
|
|
|
setup_root_helper
|
|
|
|
|
|
|
|
echo "Eval loop in test environment (log: $RESULTS)"
|
|
|
|
echo -e " ---------------------\nStarting session, `date`" >> "$RESULTS"
|
|
|
|
echo -n "`pwd`> "
|
|
|
|
while read x; do
|
|
|
|
echo "COMMAND: $x" >> "$RESULTS"
|
|
|
|
{ eval $x; } 2>&1 | tee -a "$RESULTS"
|
|
|
|
echo -n "`pwd`> "
|
|
|
|
done
|