Skip to content

Commit

Permalink
Merge pull request #8691 from gforney/master
Browse files Browse the repository at this point in the history
check for dirty source files or dirty input files before running validation cases - use the -g option to override
  • Loading branch information
gforney authored Aug 20, 2020
2 parents 560ef6c + d169448 commit 71f0256
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Validation/Common_Run_All.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,26 @@ fi
# abort if repo is dirty

if [ ! $STOPFDS ] ; then
ABORT=
if [ "$CHECK_DIRTY" != "" ]; then
ndiffs=`git diff --shortstat FDS_Input_Files/*.fds | wc -l`
nsourcediffs=`git diff --shortstat ../../Source/*.f90 | wc -l`
if [ $ndiffs -gt 0 ]; then
echo "***error: One or more input files are dirty"
echo ""
echo "***error: One or more input files are dirty."
git status -uno | grep FDS_Input_Files | grep -v \/FDS_Input_Files
ABORT=1
fi
if [ $nsourcediffs -gt 0 ]; then
echo ""
echo "***error: One or more source files are dirty."
cd ../..
git status -uno | grep Source
ABORT=1
fi
if [ "$ABORT" == "1" ]; then
echo ""
echo "Use the -g option to run anyway."
echo "Exiting."
exit 1
fi
Expand Down

0 comments on commit 71f0256

Please sign in to comment.