summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xtests/test-console.sh23
2 files changed, 24 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index aaf97022..1e2a4631 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,7 @@ library-test
library-test-static
/tests/*-tests-results.txt
+/tests/test-console.txt
/tests/test.img
aclocal.m4
diff --git a/tests/test-console.sh b/tests/test-console.sh
new file mode 100755
index 00000000..cc1cdf3c
--- /dev/null
+++ b/tests/test-console.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# a shell with test environment set up, logged commands and output
+
+LANG=C
+SCRIPT_DIR=$(dirname $(readlink -f $0))
+TOP=$(readlink -f $SCRIPT_DIR/../)
+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