Move shell tests inputs and outputs to separate directories
This commit is contained in:
parent
65c6ed1cff
commit
2d877c9240
|
@ -89,7 +89,7 @@ def main():
|
|||
sleep(0.5)
|
||||
child.setwinsize(1, 300)
|
||||
|
||||
with open(os.path.join('tests', 'test_shells', 'input.{0}'.format(shell)), 'rb') as F:
|
||||
with open(os.path.join('tests', 'test_shells', 'inputs', shell), 'rb') as F:
|
||||
if not args.wait_for_echo:
|
||||
child.send(F.read())
|
||||
else:
|
||||
|
|
|
@ -28,11 +28,13 @@ check_screen_log() {
|
|||
TEST_TYPE="$1"
|
||||
TEST_CLIENT="$2"
|
||||
SH="$3"
|
||||
if test -e "$ROOT/tests/test_shells/${SH}.${TEST_TYPE}.ok" ; then
|
||||
diff -a -u "$ROOT/tests/test_shells/${SH}.${TEST_TYPE}.ok" "$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
||||
if test -e "$ROOT/tests/test_shells/outputs/${SH}.${TEST_TYPE}.ok" ; then
|
||||
diff -a -u "$ROOT/tests/test_shells/outputs/${SH}.${TEST_TYPE}.ok" \
|
||||
"$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
||||
return $?
|
||||
elif test -e "$ROOT/tests/test_shells/${SH}.ok" ; then
|
||||
diff -a -u "$ROOT/tests/test_shells/${SH}.ok" "$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
||||
elif test -e "$ROOT/tests/test_shells/outputs/${SH}.ok" ; then
|
||||
diff -a -u "$ROOT/tests/test_shells/outputs/${SH}.ok" \
|
||||
"$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
||||
return $?
|
||||
else
|
||||
cat "$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
||||
|
|
Loading…
Reference in New Issue