From ba14f8ffeee37a4a9ccfd3224723d177f02e1271 Mon Sep 17 00:00:00 2001 From: Chiraffollo <5937599+Chiraffollo@users.noreply.github.com> Date: Sat, 20 Jul 2024 11:39:59 +0200 Subject: [PATCH] Fix run-tests.sh script (#929) * Fix run-tests.sh script - Fix ordering of parameters in help info - Change spaces to tabs in indentation of methods (unique usage of indentation) - Fix check for number of parameters to avoid empty string as default parameter value * Fix incorrect comparison --- test/run-tests.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/run-tests.sh b/test/run-tests.sh index 41fd6b293..65262380b 100644 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -21,7 +21,7 @@ NoColour='\033[0m' ParseGitBranch() { - git rev-parse --abbrev-ref HEAD + git rev-parse --abbrev-ref HEAD } SetConfigurationName() @@ -41,7 +41,7 @@ PrintHeader() echo " Configuration : $configuration_name" | tee -a log.txt echo " Compiler : $compiler " | tee -a log.txt echo " Language standard : C++$cxx_standard " | tee -a log.txt - echo " Optimisation : $opt " | tee -a log.txt + echo " Optimisation : $opt " | tee -a log.txt echo " Sanitizer : $sanitize " | tee -a log.txt echo " ETL version : $etl_version " | tee -a log.txt echo " Git branch : $(ParseGitBranch) " | tee -a log.txt @@ -54,10 +54,10 @@ PrintHelp() { echo "$HelpColour" echo "----------------------------------------------------------------------------------" - echo " Syntax : ./runtests.sh " + echo " Syntax : ./runtests.sh " echo " C++ Standard : 11, 14, 17 or 20 " - echo " Threads : Number of threads to use. Default = 4 " echo " Optimisation : 0, 1, 2 or 3. Default = 0 " + echo " Threads : Number of threads to use. Default = 4 " echo " Sanitizer : S enables sanitizer checks. Default disabled " echo "----------------------------------------------------------------------------------" echo "$NoColour" @@ -85,7 +85,7 @@ FailedCompilation() { echo "$FailColour" echo "****************************************************************************" | tee -a log.txt - echo "**** Failed Compilation - $configuration_name" | tee -a log.txt + echo "**** Failed Compilation - $configuration_name" | tee -a log.txt echo "****************************************************************************" | tee -a log.txt echo "$NoColour" Bell @@ -95,7 +95,7 @@ FailedTests() { echo "$FailColour" echo "****************************************************************************" | tee -a log.txt - echo "**** Failed Tests - $configuration_name" | tee -a log.txt + echo "**** Failed Tests - $configuration_name" | tee -a log.txt echo "****************************************************************************" | tee -a log.txt echo "$NoColour" Bell @@ -142,7 +142,7 @@ fi #****************************************************************************** # Set the number of concurrent processes to use. #****************************************************************************** -if [ $# -eq 2 ]; then +if [ $# -le 2 ]; then export CMAKE_BUILD_PARALLEL_LEVEL=4 else export CMAKE_BUILD_PARALLEL_LEVEL=$3