Skip to content

Commit 7558ac5

Browse files
Fix valid_csv tests
Tests were accidentally searching for the wrong string in the regex check
1 parent aaad9fe commit 7558ac5

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/drhook/drhook_papi/CMakeLists.txt

+5-8
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,13 @@ ecbuild_add_test( TARGET fiat_test_drhook_papi_basic_valid_csv
3232
TYPE SCRIPT
3333
# Just making sure it's not an empty file
3434
COMMAND "find"
35-
ARGS "." "-name" "drhook.prof.0.csv" "-type" "f" "-size" "+100c"
36-
ENVIRONMENT DR_HOOK=1 DR_HOOK_OPT=COUNTERS
35+
ARGS "." "-name" "drhook.prof.1.csv" "-type" "f" "-size" "+100c"
3736
CONDITION HAVE_DR_HOOK_PAPI )
3837

3938
if (TEST fiat_test_drhook_papi_basic_valid_csv)
4039
set_tests_properties(fiat_test_drhook_papi_basic_valid_csv
4140
PROPERTIES DEPENDS fiat_test_drhook_papi_basic
42-
FAIL_REGULAR_EXPRESSION "no matches found" )
41+
PASS_REGULAR_EXPRESSION "drhook.prof.1.csv" )
4342
endif()
4443

4544
# Test MPI implementation
@@ -54,7 +53,7 @@ ecbuild_add_executable( TARGET drhook_papi_mpi
5453
ecbuild_add_test( TARGET fiat_test_drhook_papi_mpi
5554
COMMAND drhook_papi_mpi
5655
MPI 5
57-
ENVIRONMENT DR_HOOK=1 DR_HOOK_OPT=COUNTERS
56+
ENVIRONMENT DR_HOOK=1 DR_HOOK_OPT=COUNTERS DR_HOOK_PROFILE=fiat_test_drhook_papi_mpi
5857
CONDITION HAVE_DR_HOOK_PAPI AND HAVE_MPI )
5958

6059

@@ -64,8 +63,7 @@ ecbuild_add_test( TARGET fiat_test_drhook_papi_mpi_valid_csv
6463
# We have to do this weird thing with bash so that we can
6564
# use a redirect. CMake tests are really basic...
6665
COMMAND "bash"
67-
ARGS "-c" "find . -name 'drhook.prof.[1-5].csv' -type f -size +100c | wc -l"
68-
ENVIRONMENT DR_HOOK=1 DR_HOOK_OPT=COUNTERS
66+
ARGS "-c" "find . -name 'fiat_test_drhook_papi_mpi.[1-5].csv' -type f -size +100c | wc -l"
6967
CONDITION HAVE_DR_HOOK_PAPI AND HAVE_MPI )
7068

7169
if (TEST fiat_test_drhook_papi_mpi_valid_csv)
@@ -93,13 +91,12 @@ ecbuild_add_test( TARGET fiat_test_drhook_papi_user_filename_valid_csv
9391
# Just making sure it's not an empty file
9492
COMMAND "find"
9593
ARGS "." "-name" "fiat_test_drhook_papi_user_filename.1.csv" "-type" "f"
96-
ENVIRONMENT DR_HOOK=1 DR_HOOK_OPT=COUNTERS
9794
CONDITION HAVE_DR_HOOK_PAPI )
9895

9996
if (TEST fiat_test_drhook_papi_user_filename_valid_csv)
10097
set_tests_properties(fiat_test_drhook_papi_user_filename_valid_csv
10198
PROPERTIES DEPENDS fiat_test_drhook_papi_user_filename
102-
FAIL_REGULAR_EXPRESSION "no matches found" )
99+
PASS_REGULAR_EXPRESSION "fiat_test_drhook_papi_user_filename.1.csv" )
103100
endif()
104101

105102
# Test user specified counters

0 commit comments

Comments
 (0)