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)
|
sleep(0.5)
|
||||||
child.setwinsize(1, 300)
|
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:
|
if not args.wait_for_echo:
|
||||||
child.send(F.read())
|
child.send(F.read())
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -28,11 +28,13 @@ check_screen_log() {
|
||||||
TEST_TYPE="$1"
|
TEST_TYPE="$1"
|
||||||
TEST_CLIENT="$2"
|
TEST_CLIENT="$2"
|
||||||
SH="$3"
|
SH="$3"
|
||||||
if test -e "$ROOT/tests/test_shells/${SH}.${TEST_TYPE}.ok" ; then
|
if test -e "$ROOT/tests/test_shells/outputs/${SH}.${TEST_TYPE}.ok" ; then
|
||||||
diff -a -u "$ROOT/tests/test_shells/${SH}.${TEST_TYPE}.ok" "$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
diff -a -u "$ROOT/tests/test_shells/outputs/${SH}.${TEST_TYPE}.ok" \
|
||||||
|
"$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
||||||
return $?
|
return $?
|
||||||
elif test -e "$ROOT/tests/test_shells/${SH}.ok" ; then
|
elif test -e "$ROOT/tests/test_shells/outputs/${SH}.ok" ; then
|
||||||
diff -a -u "$ROOT/tests/test_shells/${SH}.ok" "$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
diff -a -u "$ROOT/tests/test_shells/outputs/${SH}.ok" \
|
||||||
|
"$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
||||||
return $?
|
return $?
|
||||||
else
|
else
|
||||||
cat "$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
cat "$TEST_ROOT/${SH}.${TEST_TYPE}.${TEST_CLIENT}.log"
|
||||||
|
|
Loading…
Reference in New Issue