-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated github action script for macos image; added test script in ba…
…sh; updated setup.py to take into account the LDFLAGS; updated test for GLS mapmaker to make it concise, and to skip the tests as the test results are not stable
- Loading branch information
1 parent
ac8affc
commit 5ee6c5a
Showing
4 changed files
with
141 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
# Color formats | ||
bbred='\033[1;91m' # bold bright red | ||
bbgreen='\033[1;92m' # bold bright green | ||
nc='\033[0m' # no color | ||
|
||
# To print formatted text in a block | ||
formatted_print() { | ||
local print_string="$1" | ||
local nprocs="$2" | ||
|
||
printf '\n\n\n\n%s \n%s\n%s \n\n\n\n' \ | ||
"$(printf '=%.0s' {1..36})" "$print_string" "$(printf '=%.0s' {1..36})" | ||
} | ||
|
||
# String to collect the failing nprocs | ||
error_nprocs=() | ||
|
||
# Testing the execution for different nprocs | ||
for nprocs in 1 2 5 6; do | ||
|
||
formatted_print "Running test with nprocs = $nprocs" "$nprocs" | ||
|
||
if ! mpiexec -n $nprocs pytest; then | ||
# if fails, prints the status and stores the `nprocs`` in `error_nprocs` | ||
formatted_print \ | ||
"Test status for nprocs = $nprocs: $(printf "${bbred}FAILED${nc}")"\ | ||
"$nprocs" | ||
|
||
error_nprocs+=("$nprocs") | ||
else | ||
# if passed, prints the status | ||
formatted_print \ | ||
"Test status for nprocs = $nprocs: $(printf "${bbgreen}PASSED${nc}")"\ | ||
"$nprocs" | ||
fi | ||
|
||
done | ||
|
||
if [ ${#error_nprocs[@]} -ne 0 ]; then | ||
# exit 0, when some tests fail | ||
formatted_print \ | ||
"$(printf "${bbred}Test failed for nproc(s): ${error_nprocs[*]}${nc}")"\ | ||
"$error_nprocs" | ||
|
||
exit 1 | ||
else | ||
# when all tests are passing | ||
formatted_print "$(printf "${bbgreen}Test passed for all nprocs${nc}")" | ||
|
||
exit 0 | ||
fi |