From d1faef05c71fe24d378ce80e1bcad23c9d291e01 Mon Sep 17 00:00:00 2001 From: Alvaro Tolosa Delgado Date: Mon, 30 Oct 2023 18:26:03 +0100 Subject: [PATCH 1/9] script that compares all the files named the same within a given path (as argument). The dfiference between two files the with same name is printed out. If the files are identical, nothing is printed. --- lcgeoTests/compareIdenticalFiles.sh | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 lcgeoTests/compareIdenticalFiles.sh diff --git a/lcgeoTests/compareIdenticalFiles.sh b/lcgeoTests/compareIdenticalFiles.sh new file mode 100755 index 000000000..bf93881e8 --- /dev/null +++ b/lcgeoTests/compareIdenticalFiles.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# This script compares all the files named the same within a given path (as argument) +# The dfiference between two files the with same name is printed out +# If the files are identical, nothing is printed +# README files are excluded + +search_dir="$1" + +files_to_ignore="README.md materials.xml elements.xml" + +# Create an associative array to store file paths with the same names +declare -A file_names + +# Iterate through files in the directory +find "$search_dir" -not -path '*/.*' -type f | while read -r file; do + + # Get the base name of the file (without the path) + file_name=$(basename "$file") + + # Ignore README files + if [[ $files_to_ignore == *"$file_name"* ]]; then + continue + fi + + # Check if there is already a file with the same name + if [[ -n "${file_names[$file_name]}" ]]; then + # Compare the contents of the files + # use flag -q instead of -c to print just the filenames + diff -c "$file" "${file_names[$file_name]}" + else + # Store the file path in the array + file_names["$file_name"]="$file" + fi + +done + From 4b65f12f0f1c6d076f032c2c4f595d1a28732cca Mon Sep 17 00:00:00 2001 From: Alvaro Tolosa Delgado Date: Tue, 31 Oct 2023 05:39:55 +0100 Subject: [PATCH 2/9] skip CMakeLists.txt when comparing files --- lcgeoTests/compareIdenticalFiles.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcgeoTests/compareIdenticalFiles.sh b/lcgeoTests/compareIdenticalFiles.sh index bf93881e8..4ef543cd1 100755 --- a/lcgeoTests/compareIdenticalFiles.sh +++ b/lcgeoTests/compareIdenticalFiles.sh @@ -7,7 +7,7 @@ search_dir="$1" -files_to_ignore="README.md materials.xml elements.xml" +files_to_ignore="README.md materials.xml elements.xml CMakeLists.txt" # Create an associative array to store file paths with the same names declare -A file_names From 317a6f0d142447128833ff4a417ae985d3339925 Mon Sep 17 00:00:00 2001 From: Alvaro Tolosa Delgado Date: Wed, 31 Jul 2024 16:52:25 +0200 Subject: [PATCH 3/9] move bash script to utils --- {lcgeoTests => utils}/compareIdenticalFiles.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {lcgeoTests => utils}/compareIdenticalFiles.sh (100%) diff --git a/lcgeoTests/compareIdenticalFiles.sh b/utils/compareIdenticalFiles.sh similarity index 100% rename from lcgeoTests/compareIdenticalFiles.sh rename to utils/compareIdenticalFiles.sh From 81303b94da5ba0820faeb8b1e28d8229df5d6220 Mon Sep 17 00:00:00 2001 From: Alvaro Tolosa Delgado Date: Wed, 31 Jul 2024 17:31:31 +0200 Subject: [PATCH 4/9] upgraded script --- test/CMakeLists.txt | 23 +++++++++++++++++++++++ utils/compareIdenticalFiles.sh | 23 ++++++++++++++--------- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3d4876777..491303dac 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -149,3 +149,26 @@ ADD_TEST( t_SensThickness_Clic_o2_v4 "${CMAKE_INSTALL_PREFIX}/bin/run_test_${Pac ${CMAKE_INSTALL_PREFIX}/bin/TestSensThickness ${CMAKE_CURRENT_SOURCE_DIR}/../CLIC/compact/CLIC_o2_v04/CLIC_o2_v04.xml 300 50 ) ADD_TEST( t_SensThickness_CLIC_o3_v15 "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" ${CMAKE_INSTALL_PREFIX}/bin/TestSensThickness ${CMAKE_CURRENT_SOURCE_DIR}/../CLIC/compact/CLIC_o3_v15/CLIC_o3_v15.xml 100 50 ) + +#-------------------------------------------------- +# check if files named the same contain the same +SET( test_name "test_files_versions_FCCee_CLD" ) +ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" + sh +x ${CMAKE_CURRENT_SOURCE_DIR}/../utils/compareIdenticalFiles.sh ${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/CLD ) +SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "File" ) + +SET( test_name "test_files_versions_FCCee_IDEA" ) +ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" + sh +x ${CMAKE_CURRENT_SOURCE_DIR}/../utils/compareIdenticalFiles.sh ${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/IDEA ) +SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "File" ) + +SET( test_name "test_files_versions_FCCee_ALLEGRO" ) +ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" + sh +x ${CMAKE_CURRENT_SOURCE_DIR}/../utils/compareIdenticalFiles.sh ${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/ALLEGRO ) +SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "File" ) + +SET( test_name "test_files_versions_FCCee" ) +ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" + sh +x ${CMAKE_CURRENT_SOURCE_DIR}/../utils/compareIdenticalFiles.sh ${CMAKE_CURRENT_SOURCE_DIR}/../FCCee ) +SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "File" ) + diff --git a/utils/compareIdenticalFiles.sh b/utils/compareIdenticalFiles.sh index 4ef543cd1..4eb07b9f5 100755 --- a/utils/compareIdenticalFiles.sh +++ b/utils/compareIdenticalFiles.sh @@ -1,7 +1,7 @@ #!/bin/bash # This script compares all the files named the same within a given path (as argument) -# The dfiference between two files the with same name is printed out +# If files with the same name have different contents, it prints the paths of those files # If the files are identical, nothing is printed # README files are excluded @@ -13,21 +13,26 @@ files_to_ignore="README.md materials.xml elements.xml CMakeLists.txt" declare -A file_names # Iterate through files in the directory -find "$search_dir" -not -path '*/.*' -type f | while read -r file; do - +find "$search_dir" -not -path '*/.*' -type f | while read -r file; do + # Get the base name of the file (without the path) file_name=$(basename "$file") - - # Ignore README files - if [[ $files_to_ignore == *"$file_name"* ]]; then - continue + + # Ignore README files + if [[ $files_to_ignore == *"$file_name"* ]]; then + continue fi # Check if there is already a file with the same name if [[ -n "${file_names[$file_name]}" ]]; then # Compare the contents of the files - # use flag -q instead of -c to print just the filenames - diff -c "$file" "${file_names[$file_name]}" + if ! cmp -s "$file" "${file_names[$file_name]}"; then + # Print the paths of the files if they differ + echo "Error: files with the same name but different contents:" + echo "$file" + echo "${file_names[$file_name]}" + echo + fi else # Store the file path in the array file_names["$file_name"]="$file" From 042ebd89223edf545c64e669365662b94e41ac89 Mon Sep 17 00:00:00 2001 From: Alvaro Tolosa Delgado Date: Wed, 31 Jul 2024 18:12:50 +0200 Subject: [PATCH 5/9] upgrade bash script for file content comparison --- test/CMakeLists.txt | 26 ++++++++++----------- utils/IdenticalFiles_ToBeIgnored.txt | 35 ++++++++++++++++++++++++++++ utils/compareIdenticalFiles.sh | 15 +++++++----- 3 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 utils/IdenticalFiles_ToBeIgnored.txt diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 491303dac..32af1e2e9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -151,24 +151,22 @@ ADD_TEST( t_SensThickness_CLIC_o3_v15 "${CMAKE_INSTALL_PREFIX}/bin/run_test_${Pa ${CMAKE_INSTALL_PREFIX}/bin/TestSensThickness ${CMAKE_CURRENT_SOURCE_DIR}/../CLIC/compact/CLIC_o3_v15/CLIC_o3_v15.xml 100 50 ) #-------------------------------------------------- -# check if files named the same contain the same +# check if files named the same contain the same in FCCee/CLD SET( test_name "test_files_versions_FCCee_CLD" ) -ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" - sh +x ${CMAKE_CURRENT_SOURCE_DIR}/../utils/compareIdenticalFiles.sh ${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/CLD ) -SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "File" ) +ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh ${CMAKE_SOURCE_DIR}/FCCee/CLD ${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) +SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Error. Files with the same name but different contents" ) +# check if files named the same contain the same in FCCee/IDEA SET( test_name "test_files_versions_FCCee_IDEA" ) -ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" - sh +x ${CMAKE_CURRENT_SOURCE_DIR}/../utils/compareIdenticalFiles.sh ${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/IDEA ) -SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "File" ) +ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh ${CMAKE_SOURCE_DIR}/FCCee/IDEA ${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) +SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Error. Files with the same name but different contents" ) +# check if files named the same contain the same in FCCee/ALLEGRO SET( test_name "test_files_versions_FCCee_ALLEGRO" ) -ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" - sh +x ${CMAKE_CURRENT_SOURCE_DIR}/../utils/compareIdenticalFiles.sh ${CMAKE_CURRENT_SOURCE_DIR}/../FCCee/ALLEGRO ) -SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "File" ) +ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh ${CMAKE_SOURCE_DIR}/FCCee/ALLEGRO ${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) +SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Error. Files with the same name but different contents" ) +# check if files named the same contain the same in FCCee SET( test_name "test_files_versions_FCCee" ) -ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" - sh +x ${CMAKE_CURRENT_SOURCE_DIR}/../utils/compareIdenticalFiles.sh ${CMAKE_CURRENT_SOURCE_DIR}/../FCCee ) -SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "File" ) - +ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh ${CMAKE_SOURCE_DIR}/FCCee ${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) +SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Error. Files with the same name but different contents" ) diff --git a/utils/IdenticalFiles_ToBeIgnored.txt b/utils/IdenticalFiles_ToBeIgnored.txt new file mode 100644 index 000000000..9e760a722 --- /dev/null +++ b/utils/IdenticalFiles_ToBeIgnored.txt @@ -0,0 +1,35 @@ +README.md +CMakeLists.txt +DectDimensions.xml +materials.xml +#__CLD_ill_named_files__ +additional_materials.xml +BeamInstrumentation_o3_v01_overlap.xml +BeamInstrumentation_o3_v02_fitShield.xml +Beampipe_o4_v03_noNotch_Ta_cone.xml +Beampipe_o4_v04_noNotch_W_n02_smallBP.xml +Beampipe_o4_v04_noNotch_W_n02.xml +Beampipe_o4_v05.xml +ECalBarrel_o2_v01_03.xml +ECalEndcap_o2_v01_03.xml +elements.xml +FCCee_DectDimensions.xml +FCCee_o2_v02.xml +HCalBarrel_o1_v01_01.xml +HCalEndcap_o1_v01_01.xml +HOMAbsorber_v00.xml +InnerTracker_o2_v06_02.xml +LumiCal_o3_v02_02.xml +LumiCal_o3_v02_03.xml +OuterTracker_o2_v06_02.xml +Solenoid_o1_v01_02.xml +Vertex_o4_v05_smallBP.xml +Vertex_o4_v05.xml +YokeBarrel_o1_v01_02.xml +YokeEndcap_o1_v01_02.xml +#__ALLEGRO_ill_named_files__ +ECalBarrel_thetamodulemerged.xml +ECalBarrel_thetamodulemerged_calibration.xml +ECalBarrel_thetamodulemerged_upstream.xml +#__FCCee_ill_named_files__ +FCCee_DectEmptyMaster.xml diff --git a/utils/compareIdenticalFiles.sh b/utils/compareIdenticalFiles.sh index 4eb07b9f5..c4f3366f4 100755 --- a/utils/compareIdenticalFiles.sh +++ b/utils/compareIdenticalFiles.sh @@ -3,11 +3,15 @@ # This script compares all the files named the same within a given path (as argument) # If files with the same name have different contents, it prints the paths of those files # If the files are identical, nothing is printed -# README files are excluded +# Files listed in an ignore file are excluded + +# Usage: ./script.sh search_dir="$1" +ignore_file="$2" -files_to_ignore="README.md materials.xml elements.xml CMakeLists.txt" +# Read filenames to ignore from the ignore file +files_to_ignore=$(<"$ignore_file") # Create an associative array to store file paths with the same names declare -A file_names @@ -18,8 +22,8 @@ find "$search_dir" -not -path '*/.*' -type f | while read -r file; do # Get the base name of the file (without the path) file_name=$(basename "$file") - # Ignore README files - if [[ $files_to_ignore == *"$file_name"* ]]; then + # Ignore files listed in the ignore file + if grep -qx "$file_name" <<< "$files_to_ignore"; then continue fi @@ -28,7 +32,7 @@ find "$search_dir" -not -path '*/.*' -type f | while read -r file; do # Compare the contents of the files if ! cmp -s "$file" "${file_names[$file_name]}"; then # Print the paths of the files if they differ - echo "Error: files with the same name but different contents:" + echo "Error. Files with the same name but different contents:" echo "$file" echo "${file_names[$file_name]}" echo @@ -39,4 +43,3 @@ find "$search_dir" -not -path '*/.*' -type f | while read -r file; do fi done - From fef4f37c121c6227fd3670e8fa2da43065e9b58d Mon Sep 17 00:00:00 2001 From: Alvaro Tolosa Delgado Date: Wed, 31 Jul 2024 18:16:26 +0200 Subject: [PATCH 6/9] keep only test for whole FCCee --- test/CMakeLists.txt | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 32af1e2e9..365a4c6ef 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -151,21 +151,6 @@ ADD_TEST( t_SensThickness_CLIC_o3_v15 "${CMAKE_INSTALL_PREFIX}/bin/run_test_${Pa ${CMAKE_INSTALL_PREFIX}/bin/TestSensThickness ${CMAKE_CURRENT_SOURCE_DIR}/../CLIC/compact/CLIC_o3_v15/CLIC_o3_v15.xml 100 50 ) #-------------------------------------------------- -# check if files named the same contain the same in FCCee/CLD -SET( test_name "test_files_versions_FCCee_CLD" ) -ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh ${CMAKE_SOURCE_DIR}/FCCee/CLD ${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) -SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Error. Files with the same name but different contents" ) - -# check if files named the same contain the same in FCCee/IDEA -SET( test_name "test_files_versions_FCCee_IDEA" ) -ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh ${CMAKE_SOURCE_DIR}/FCCee/IDEA ${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) -SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Error. Files with the same name but different contents" ) - -# check if files named the same contain the same in FCCee/ALLEGRO -SET( test_name "test_files_versions_FCCee_ALLEGRO" ) -ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh ${CMAKE_SOURCE_DIR}/FCCee/ALLEGRO ${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) -SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Error. Files with the same name but different contents" ) - # check if files named the same contain the same in FCCee SET( test_name "test_files_versions_FCCee" ) ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh ${CMAKE_SOURCE_DIR}/FCCee ${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) From 3ca87ff77a1c2b4d0ad07639d127af2c606068f0 Mon Sep 17 00:00:00 2001 From: Alvaro Tolosa Delgado Date: Thu, 1 Aug 2024 10:11:51 +0200 Subject: [PATCH 7/9] ctest now relies on exit code instead of regex --- test/CMakeLists.txt | 9 +++++++-- utils/compareIdenticalFiles.sh | 10 +++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 365a4c6ef..045baa9ff 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -153,5 +153,10 @@ ADD_TEST( t_SensThickness_CLIC_o3_v15 "${CMAKE_INSTALL_PREFIX}/bin/run_test_${Pa #-------------------------------------------------- # check if files named the same contain the same in FCCee SET( test_name "test_files_versions_FCCee" ) -ADD_TEST( t_${test_name} "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh ${CMAKE_SOURCE_DIR}/FCCee ${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) -SET_TESTS_PROPERTIES( t_${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "Error. Files with the same name but different contents" ) +ADD_TEST( + NAME t_${test_name} + COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" + "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh" + "${CMAKE_SOURCE_DIR}/FCCee" + "${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" +) diff --git a/utils/compareIdenticalFiles.sh b/utils/compareIdenticalFiles.sh index c4f3366f4..e22c658c0 100755 --- a/utils/compareIdenticalFiles.sh +++ b/utils/compareIdenticalFiles.sh @@ -16,9 +16,11 @@ files_to_ignore=$(<"$ignore_file") # Create an associative array to store file paths with the same names declare -A file_names -# Iterate through files in the directory -find "$search_dir" -not -path '*/.*' -type f | while read -r file; do +# Initialize status code variable +status_code=0 +# Iterate through files in the directory +while IFS= read -r -d '' file; do # Get the base name of the file (without the path) file_name=$(basename "$file") @@ -36,10 +38,12 @@ find "$search_dir" -not -path '*/.*' -type f | while read -r file; do echo "$file" echo "${file_names[$file_name]}" echo + status_code=1 fi else # Store the file path in the array file_names["$file_name"]="$file" fi +done < <(find "$search_dir" -not -path '*/.*' -type f -print0) -done +exit $status_code From 9bf76e820b73540f7f642cf656a931f86d1cd6e8 Mon Sep 17 00:00:00 2001 From: Alvaro Tolosa Delgado Date: Thu, 1 Aug 2024 10:13:24 +0200 Subject: [PATCH 8/9] replace cmake source dir by project source dir --- test/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 045baa9ff..140839b7c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -156,7 +156,7 @@ SET( test_name "test_files_versions_FCCee" ) ADD_TEST( NAME t_${test_name} COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" - "${CMAKE_SOURCE_DIR}/utils/compareIdenticalFiles.sh" - "${CMAKE_SOURCE_DIR}/FCCee" - "${CMAKE_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" + "${PROJECT_SOURCE_DIR}/utils/compareIdenticalFiles.sh" + "${PROJECT_SOURCE_DIR}/FCCee" + "${PROJECT_SOURCE_DIR}/utils/IdenticalFiles_ToBeIgnored.txt" ) From ad3a20c1ad2cf03dd57a08907a97030400fe573e Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Fri, 2 Aug 2024 14:03:11 +0200 Subject: [PATCH 9/9] Remove unnecessary test_name variable from CMakeLists.txt --- test/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 140839b7c..8817a1991 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -152,9 +152,8 @@ ADD_TEST( t_SensThickness_CLIC_o3_v15 "${CMAKE_INSTALL_PREFIX}/bin/run_test_${Pa #-------------------------------------------------- # check if files named the same contain the same in FCCee -SET( test_name "test_files_versions_FCCee" ) ADD_TEST( - NAME t_${test_name} + NAME t_test_files_versions_FCCee COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_${PackageName}.sh" "${PROJECT_SOURCE_DIR}/utils/compareIdenticalFiles.sh" "${PROJECT_SOURCE_DIR}/FCCee"