From 3d404b4763c396c59b3c8fe05b0aa47a79445ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 8 Jul 2015 21:59:16 +0100 Subject: [PATCH] Simplify some scripts ssl-opt.sh and compat.sh can now be run from root too --- .travis.yml | 4 ++-- CMakeLists.txt | 4 ++-- Makefile | 4 ++-- tests/scripts/all.sh | 32 ++++++++----------------------- tests/scripts/test-ref-configs.pl | 2 +- 5 files changed, 15 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index 24c7667b1..a7b9a32ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ script: - cmake -D CMAKE_BUILD_TYPE:String="Check" . - make - make test -- ( cd tests && ./compat.sh ) -- ( cd tests && ./ssl-opt.sh ) +- tests/compat.sh +- tests/ssl-opt.sh - tests/scripts/test-ref-configs.pl env: global: diff --git a/CMakeLists.txt b/CMakeLists.txt index c0d03f6c7..610f07924 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,8 +84,8 @@ if(ENABLE_TESTING) ADD_CUSTOM_TARGET(covtest COMMAND make test COMMAND programs/test/selftest - COMMAND cd tests && ./compat.sh - COMMAND cd tests && ./ssl-opt.sh + COMMAND tests/compat.sh + COMMAND tests/ssl-opt.sh ) ADD_CUSTOM_TARGET(lcov diff --git a/Makefile b/Makefile index 2f05e1273..0c489f891 100644 --- a/Makefile +++ b/Makefile @@ -70,8 +70,8 @@ ifndef WINDOWS covtest: $(MAKE) check programs/test/selftest - ( cd tests && ./compat.sh ) - ( cd tests && ./ssl-opt.sh ) + tests/compat.sh + tests/ssl-opt.sh lcov: rm -rf Coverage diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 0562c755c..7faeb1137 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -93,9 +93,7 @@ make test programs/test/selftest msg "test: ssl-opt.sh (ASan build)" # ~ 1 min -cd tests -./ssl-opt.sh -cd .. +tests/ssl-opt.sh msg "test/build: ref-configs (ASan build)" # ~ 6 min 20s tests/scripts/test-ref-configs.pl @@ -106,9 +104,7 @@ msg "build: with ASan (rebuild after ref-configs)" # ~ 1 min make msg "test: compat.sh (ASan build)" # ~ 6 min -cd tests -./compat.sh -cd .. +tests/compat.sh msg "build: cmake, full config, clang" # ~ 50s cleanup @@ -122,14 +118,10 @@ msg "test: main suites (full config)" # ~ 5s make test msg "test: ssl-opt.sh default (full config)" # ~ 1s -cd tests -./ssl-opt.sh -f Default -cd .. +tests/ssl-opt.sh -f Default msg "test: compat.sh RC4, DES & NULL (full config)" # ~ 2 min -cd tests -./compat.sh -e '3DES\|DES-CBC3' -f 'NULL\|DES\|RC4\|ARCFOUR' -cd .. +tests/compat.sh -e '3DES\|DES-CBC3' -f 'NULL\|DES\|RC4\|ARCFOUR' msg "test/build: curves.pl (gcc)" # ~ 5 min (?) cleanup @@ -261,17 +253,13 @@ msg "test: main suites (MSan)" # ~ 10s make test msg "test: ssl-opt.sh (MSan)" # ~ 1 min -cd tests -./ssl-opt.sh -cd .. +tests/ssl-opt.sh # Optional part(s) if [ "$MEMORY" -gt 0 ]; then msg "test: compat.sh (MSan)" # ~ 6 min 20s - cd tests - ./compat.sh - cd .. + tests/compat.sh fi else # no MemSan @@ -290,16 +278,12 @@ make test if [ "$MEMORY" -gt 0 ]; then msg "test: ssl-opt.sh --memcheck (Release)" - cd tests - ./ssl-opt.sh --memcheck - cd .. + tests/ssl-opt.sh --memcheck fi if [ "$MEMORY" -gt 1 ]; then msg "test: compat.sh --memcheck (Release)" - cd tests - ./compat.sh --memcheck - cd .. + tests/compat.sh --memcheck fi fi # MemSan diff --git a/tests/scripts/test-ref-configs.pl b/tests/scripts/test-ref-configs.pl index 2343965ee..1c973eb10 100755 --- a/tests/scripts/test-ref-configs.pl +++ b/tests/scripts/test-ref-configs.pl @@ -65,7 +65,7 @@ while( my ($conf, $args) = each %configs ) { if( $args ) { print "\nrunning compat.sh $args\n"; - system( "cd tests && ./compat.sh $args" ) + system( "tests/compat.sh $args" ) and abort "Failed compat.sh: $conf\n"; } else