From fc11e6ae8ac5ea457279eecba75b131afd4c00fe Mon Sep 17 00:00:00 2001 From: Roger Shimizu Date: Thu, 16 Nov 2017 00:32:16 +0900 Subject: [PATCH] tests: run tests binary either in src/ folder or system --- tests/test.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/test.sh b/tests/test.sh index 684e9d4b..1dcd15fc 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -24,13 +24,16 @@ function run_test { return 0 } -run_test python tests/test.py -c tests/aes.json -run_test python tests/test.py -c tests/aes-gcm.json -run_test python tests/test.py -c tests/aes-ctr.json -run_test python tests/test.py -c tests/rc4-md5.json -run_test python tests/test.py -c tests/salsa20.json -run_test python tests/test.py -c tests/chacha20.json -run_test python tests/test.py -c tests/chacha20-ietf.json -run_test python tests/test.py -c tests/chacha20-ietf-poly1305.json +[ -d src -a -x src/ss-local ] && + BIN="--bin src/" + +run_test python tests/test.py $BIN -c tests/aes.json +run_test python tests/test.py $BIN -c tests/aes-gcm.json +run_test python tests/test.py $BIN -c tests/aes-ctr.json +run_test python tests/test.py $BIN -c tests/rc4-md5.json +run_test python tests/test.py $BIN -c tests/salsa20.json +run_test python tests/test.py $BIN -c tests/chacha20.json +run_test python tests/test.py $BIN -c tests/chacha20-ietf.json +run_test python tests/test.py $BIN -c tests/chacha20-ietf-poly1305.json exit $result