mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-28 22:54:12 +08:00
52fda816e8
Since we use 'source' in scripts, let's use bash everywhere. Signed-off-by: David Sterba <dsterba@suse.com>
24 lines
566 B
Bash
Executable File
24 lines
566 B
Bash
Executable File
#!/bin/bash
|
|
# 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
|