-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing scripts and travis invocation
- Loading branch information
1 parent
2f344d4
commit 92ea5a8
Showing
3 changed files
with
37 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -8,4 +8,5 @@ before_script: | |
|
||
script: | ||
- make | ||
|
||
- cd ../../../tests | ||
- ./test_networks.sh |
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,5 @@ | ||
import sys | ||
print "running fake python script..." | ||
print "Comparing: ", str(sys.argv[1:]) | ||
print "no idea if these are the same. i have no brains. it's probably fine." | ||
sys.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#! /bin/bash | ||
test_networks() | ||
{ | ||
returnValue=0 | ||
for d in network_tests/*/ ; do | ||
for netfile in `ls $d*.inp`; do | ||
officialBinFile=${netfile%.*}.enb | ||
candidateBinFile=${netfile%.*}-candidate.enb | ||
echo "testing $netfile with known good binary output $officialBinFile" | ||
if true ## path/to/runepanet $netfile ${netfile%.*}-candidate.rpt $candidateBinFile | ||
then | ||
echo "epanet run for $netfile SUCCESS" | ||
else | ||
echo "epanet run for $netfile FAILED" | ||
returnValue=1 | ||
fi | ||
if python compare_enb.py $officialBinFile $candidateBinFile | ||
then | ||
echo "binary output for $netfile PASSED" | ||
else | ||
echo "binary output for $netfile FAILED" | ||
returnValue=1 | ||
fi | ||
echo "+++++" | ||
done | ||
done | ||
return $returnValue | ||
} | ||
|
||
test_networks |