-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Argonne-National-Laboratory/test-cases
Test cases
- Loading branch information
Showing
48 changed files
with
29,626 additions
and
200 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
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,60 @@ | ||
#/bin/bash | ||
|
||
# Test script called by CMake CTest during 'make test'. Can also be used separately. | ||
# Usage: | ||
# pipsipmMultiTestsScript.sh <pipsipmRawDriver> <rootDirRawInput> | ||
# | ||
# | ||
# The script checks the output of the PIPS-S driver for correctness when applied to a | ||
# a couple of small test problems (in 'raw input' format) | ||
|
||
check_output() | ||
{ | ||
pipsscmd="$1 $2 8" | ||
output=$($pipsscmd 2>&1 | grep "$3") | ||
|
||
if [ "$output" == "" ] | ||
then | ||
return 0 #no match, return false | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
echo "$2/20data/problemdata 8" > log.log | ||
|
||
exe=$1 | ||
|
||
check_output $exe "$2/20data/problemdata 8" 'optimal objective: 250917' | ||
if [ "$?" -eq "0" ]; then | ||
echo '20data not ok' | ||
exit 1 | ||
fi | ||
|
||
check_output $exe "$2/LandSdata/problemdata 8" 'optimal objective: 224.01' | ||
if [ "$?" -eq "0" ]; then | ||
echo 'LandSdata not ok' | ||
exit 1 | ||
fi | ||
|
||
check_output $exe "$2/ssndata/problemdata 8" 'optimal objective: 0.00' | ||
if [ "$?" -eq "0" ]; then | ||
echo 'ssndata not ok' | ||
exit 1 | ||
fi | ||
|
||
#this is valid but slow... | ||
#check_output $exe "$2/stormdata/problemdata 8" 'optimal objective: 1.5500' #1.55008e+07 | ||
#if [ "$?" -eq "0" ]; then | ||
# #in case the output is formated differently | ||
# check_output $exe "$2/stormdata/problemdata 8" 'optimal objective: 155007' | ||
# if [ "$?" -eq "0" ]; then | ||
# echo 'stormdata not ok' | ||
# exit 1 | ||
# fi | ||
#fi | ||
|
||
echo 'all tests passed' | ||
exit 0 | ||
|
||
|
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
Oops, something went wrong.