You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by km...@apache.org on 2019/02/08 08:06:40 UTC
[incubator-milagro-crypto] 10/15: fixed typo in run_test.sh
This is an automated email from the ASF dual-hosted git repository.
kmccusker pushed a commit to branch update-code
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-crypto.git
commit 36de7c07a34a780c6cdf3a46f4f8435abdaeb498
Author: Kealan McCusker <ke...@certivox.com>
AuthorDate: Thu Nov 24 19:51:05 2016 +0000
fixed typo in run_test.sh
---
js/tests/run_test.sh | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/js/tests/run_test.sh b/js/tests/run_test.sh
index 5e6c2e8..c6415f1 100755
--- a/js/tests/run_test.sh
+++ b/js/tests/run_test.sh
@@ -4,10 +4,14 @@
# This script runs tests that compares the js
# with the expected output from the c code
#
-# usage: ./run_js_tests.sh
+# usage: ./run_test.sh
output_file="log.txt"
-rm $output_file
+if [[ -f "$output_file" ]]
+then
+ echo "rm $output_file"
+ rm $output_file
+fi
ln -s BNCX.json testVectors.json
ln -s BNCXOnePass.json testVectorsOnePass.json
@@ -45,6 +49,12 @@ echo "TEST 7: node test_onepass.js"
echo "TEST 7: node test_onepass.js" >> $output_file
node test_onepass.js >> $output_file 2>&1
+error=$(grep -i error "${output_file}" )
+if [[ -n "$error" ]]; then
+ echo "ERROR. Please review ${output_file}"
+ exit 1
+fi
+
failed=$(grep FAILED "${output_file}" )
if [[ -n "$failed" ]]; then
echo "A TEST HAS FAILED. Please review ${output_file}"
@@ -54,10 +64,5 @@ else
echo "ALL TESTS PASSED" >> $output_file
fi
-error=$(grep -i error "${output_file}" )
-if [[ -n "$error" ]]; then
- echo "ERROR. Please review ${output_file}"
-fi
-
rm testVectors.json
rm testVectorsOnePass.json