Skip to content

Commit

Permalink
Fix run-tests.sh script
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Chiraffollo committed Jul 19, 2024
1 parent 744d54c commit 888a502
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ NoColour='\033[0m'

ParseGitBranch()
{
git rev-parse --abbrev-ref HEAD
git rev-parse --abbrev-ref HEAD
}

SetConfigurationName()
Expand All @@ -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
Expand All @@ -54,10 +54,10 @@ PrintHelp()
{
echo "$HelpColour"
echo "----------------------------------------------------------------------------------"
echo " Syntax : ./runtests.sh <C++ Standard> <Threads> <Optimisation> <Sanitizer> "
echo " Syntax : ./runtests.sh <C++ Standard> <Optimisation> <Threads> <Sanitizer> "
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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -142,7 +142,7 @@ fi
#******************************************************************************
# Set the number of concurrent processes to use.
#******************************************************************************
if [ $# -eq 2 ]; then
if [ $# -le 3 ]; then
export CMAKE_BUILD_PARALLEL_LEVEL=4
else
export CMAKE_BUILD_PARALLEL_LEVEL=$3
Expand Down

0 comments on commit 888a502

Please sign in to comment.