-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restore testing of generation of failed packing files
- Loading branch information
Showing
2 changed files
with
28 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
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,24 @@ | ||
#!/bin/bash | ||
# | ||
# First argument: input file name | ||
# Second argument: log file name | ||
# | ||
# Third argument: string to be searched in the log file, to declare that | ||
# the test passed | ||
# | ||
# Example: ./test.sh "water_box.inp" "packmol.log" "FORCED" | ||
# | ||
if ! [ -f $1 ]; then | ||
echo "Error: input file not found: $1" | ||
exit 1 | ||
fi | ||
../packmol < $1 > $2 | ||
if ! [ -f $2 ]; then | ||
echo "Error: Log file not generated: $2" | ||
exit 1 | ||
fi | ||
if ! grep -q $3 $2; then | ||
echo "Error: could not find $3 in $2" | ||
exit 1 | ||
fi | ||
exit 0 |