From 735bfa582c630e55fae68a865d703b3c06209b14 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Wed, 12 Feb 2020 11:14:17 +0100 Subject: [PATCH 1/5] Stop creating test files in source dir --- tests/integration/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index 9c9f59d96..038b1b24e 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -45,14 +45,14 @@ foreach(data_dir "ring" "ring_gap") file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/${data_dir}/out.dat.ref" DESTINATION - "${CMAKE_CURRENT_SOURCE_DIR}/${data_dir}_${test_suffix}/") + "${CMAKE_CURRENT_BINARY_DIR}/${data_dir}_${test_suffix}/") endforeach() endforeach() file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/ring/out.dat.ref" DESTINATION - "${CMAKE_CURRENT_SOURCE_DIR}/ring_spike_buffer/") + "${CMAKE_CURRENT_BINARY_DIR}/ring_spike_buffer/") file(GLOB INPUT_FILES "${CMAKE_CURRENT_SOURCE_DIR}/ring/*.dat") From 9b9ea918b1438b8e4f9678c67d3f2cd29bcfa624 Mon Sep 17 00:00:00 2001 From: pramodk Date: Thu, 20 Feb 2020 19:35:05 +0100 Subject: [PATCH 2/5] Re-add tests : fix variable renaming --- tests/integration/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index 038b1b24e..196645b61 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -14,8 +14,8 @@ if(CORENRN_ENABLE_GPU) set(GPU_ARGS "--nwarp 8 --gpu") endif() -# List of tests with arguments -set(TEST_CASE_ARGS +# List of tests with their arguments +set(TEST_CASES "ring!${RING_COMMON_ARGS} ${GPU_ARGS} --outpath ${CMAKE_CURRENT_BINARY_DIR}/ring" "ring_binqueue!${RING_COMMON_ARGS} ${GPU_ARGS} --outpath ${CMAKE_CURRENT_BINARY_DIR}/ring_binqueue --binqueue" "ring_multisend!${RING_COMMON_ARGS} ${GPU_ARGS} --outpath ${CMAKE_CURRENT_BINARY_DIR}/ring_multisend --multisend" @@ -30,7 +30,7 @@ set(TEST_CASE_ARGS "ring_gap_permute2!${RING_GAP_COMMON_ARGS} ${GPU_ARGS} --outpath ${CMAKE_CURRENT_BINARY_DIR}/ring_gap_permute2 ${PERMUTE2_ARGS}" ) -set(NEGATIVE_TEST_CASE_ARGS "ring_different_seed!${RING_COMMON_ARGS} ${GPU_ARGS} --outpath ${CMAKE_CURRENT_BINARY_DIR}/ring_different_seed --seed 123456") +set(NEGATIVE_TEST_CASES "ring_different_seed!${RING_COMMON_ARGS} ${GPU_ARGS} --outpath ${CMAKE_CURRENT_BINARY_DIR}/ring_different_seed --seed 123456") # There are no directories for permute and multisend related tests, create them and copy ref spikes foreach(data_dir "ring" "ring_gap") @@ -57,7 +57,7 @@ file(COPY file(GLOB INPUT_FILES "${CMAKE_CURRENT_SOURCE_DIR}/ring/*.dat") # Configure test scripts -foreach(args_line ${TEST_CASES_WITH_ARGS}) +foreach(args_line ${TEST_CASES}) string(REPLACE "!" ";" string_line @@ -77,7 +77,7 @@ foreach(args_line ${TEST_CASES_WITH_ARGS}) WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}") endforeach() -foreach(args_line ${NEGATIVE_TEST_CASES_WITH_ARGS}) +foreach(args_line ${NEGATIVE_TEST_CASES}) string(REPLACE "!" ";" string_line From a049037147c5c414add72b399d8c4e21f1e576c2 Mon Sep 17 00:00:00 2001 From: pramodk Date: Fri, 21 Feb 2020 00:14:42 +0100 Subject: [PATCH 3/5] Copy integration tests input/reference output under build directory and use that for test validation --- tests/integration/CMakeLists.txt | 14 +++++++++++--- tests/integration/integration_test.sh.in | 2 +- tests/integration/negative_integration_test.sh.in | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index 196645b61..da3fbcade 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -32,7 +32,8 @@ set(TEST_CASES set(NEGATIVE_TEST_CASES "ring_different_seed!${RING_COMMON_ARGS} ${GPU_ARGS} --outpath ${CMAKE_CURRENT_BINARY_DIR}/ring_different_seed --seed 123456") -# There are no directories for permute and multisend related tests, create them and copy ref spikes +# There are no directories for permute and multisend related tests, +# create them and copy ref spikes foreach(data_dir "ring" "ring_gap") foreach(test_suffix "multisend" @@ -49,13 +50,20 @@ foreach(data_dir "ring" "ring_gap") endforeach() endforeach() +# base tests : ring, ring with gap and ring duplication +foreach(data_dir "ring" "ring_gap" "ring_duplicate") + file(COPY + "${CMAKE_CURRENT_SOURCE_DIR}/${data_dir}/out.dat.ref" + DESTINATION + "${CMAKE_CURRENT_BINARY_DIR}/${data_dir}/") +endforeach() + +# test for small spike buffer file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/ring/out.dat.ref" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/ring_spike_buffer/") -file(GLOB INPUT_FILES "${CMAKE_CURRENT_SOURCE_DIR}/ring/*.dat") - # Configure test scripts foreach(args_line ${TEST_CASES}) string(REPLACE "!" diff --git a/tests/integration/integration_test.sh.in b/tests/integration/integration_test.sh.in index ca71f3dff..dc7cd2e54 100644 --- a/tests/integration/integration_test.sh.in +++ b/tests/integration/integration_test.sh.in @@ -28,7 +28,7 @@ then exit 1 fi -diff -w out.dat @CMAKE_CURRENT_SOURCE_DIR@/@SIM_NAME@/out.dat.ref > diff.dat 2>&1 +diff -w out.dat @CMAKE_BINARY_DIR@/tests/integration/@SIM_NAME@/out.dat.ref > diff.dat 2>&1 if [ -s diff.dat ] then diff --git a/tests/integration/negative_integration_test.sh.in b/tests/integration/negative_integration_test.sh.in index f73b3ef82..4c8af0ae6 100644 --- a/tests/integration/negative_integration_test.sh.in +++ b/tests/integration/negative_integration_test.sh.in @@ -31,7 +31,7 @@ then fi sort -k 1n,1n -k 2n,2n out.dat > sort_out.dat -diff -w sort_out.dat @CMAKE_CURRENT_SOURCE_DIR@/@SIM_NAME@/out.dat.ref > diff.dat 2>&1 +diff -w sort_out.dat @CMAKE_BINARY_DIR@/tests/integration/@SIM_NAME@/out.dat.ref > diff.dat 2>&1 if [ -s diff.dat ] then From 35459db5305da0ec09c65d5e036c21cbdb2c52b5 Mon Sep 17 00:00:00 2001 From: pramodk Date: Fri, 21 Feb 2020 00:42:35 +0100 Subject: [PATCH 4/5] Remove duplciate --nwarp arg --- tests/integration/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index da3fbcade..4f1ca5cda 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -11,7 +11,7 @@ set(RING_GAP_COMMON_ARGS "--datpath ${CMAKE_CURRENT_SOURCE_DIR}/ring_gap ${COMMO set(PERMUTE1_ARGS "--cell-permute 1 --nwarp 8") set(PERMUTE2_ARGS "--cell-permute 2 --nwarp 16") if(CORENRN_ENABLE_GPU) - set(GPU_ARGS "--nwarp 8 --gpu") + set(GPU_ARGS "--gpu") endif() # List of tests with their arguments From d28d28ff27a6a665f0ad81e27307162fa05c9f2e Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Fri, 21 Feb 2020 09:50:47 +0100 Subject: [PATCH 5/5] Work around brew bug for osx travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 205563ae3..27963ad79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,6 +99,7 @@ addons: - flex - openmpi - boost + update: true # https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/10 #============================================================================= # Set up environments