-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding first test * adding files * adding files * fixed test * fixed first test
- Loading branch information
1 parent
66cbd68
commit e3faa1c
Showing
4 changed files
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,3 +84,4 @@ jobs: | |
cd b | ||
cmake .. | ||
make VERBOSE=1 | ||
make test |
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,17 @@ | ||
# This is the CMake file for the test directory in the wgrib2 | ||
# project. | ||
# | ||
# Ed Hartnett 3/27/24 | ||
|
||
# Run each shell test. | ||
function(shell_test name) | ||
# Copy the test scripts. | ||
file(COPY "${CMAKE_SOURCE_DIR}/tests/${name}.sh" | ||
DESTINATION ${CMAKE_BINARY_DIR}/tests | ||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) | ||
# Add the shell script as a test. | ||
add_test(NAME ${name}.sh COMMAND bash ${name}.sh) | ||
endfunction() | ||
|
||
# Run these shell tests. | ||
shell_test(run_wgrib2_tests) |
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,16 @@ | ||
#!/bin/sh | ||
# This is a test script for the wgrib2 project. | ||
# | ||
# Ed Hartnett, 3/27/24 | ||
|
||
set -e | ||
echo "" | ||
echo "*** Running wgrib2 test" | ||
|
||
# Just run executable. For some reason it returns 8. | ||
ls -l ../wgrib2 | ||
../wgrib2/wgrib2 > out.txt && exit 1 | ||
[ $? -ne 8 ] && exit 2 | ||
|
||
echo "*** SUCCESS!" | ||
exit 0 |