Skip to content

Commit

Permalink
FDS vv: check for dirty source files before running validation cases
Browse files Browse the repository at this point in the history
  • Loading branch information
gforney committed Aug 20, 2020
1 parent 848249e commit d169448
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Validation/Common_Run_All.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +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 ""
echo "***error: One or more input files are dirty."
echo " Use the -g option to run anyway."
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 d169448

Please # to comment.