From ab661252978b598eea67c7f32e7be252fbd411e8 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 18 Jan 2017 11:30:45 +0100 Subject: [PATCH] make sure working tree is clean before execution --- tests/build-simulators.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/build-simulators.sh b/tests/build-simulators.sh index 1bbbc9bbe..977503d5a 100755 --- a/tests/build-simulators.sh +++ b/tests/build-simulators.sh @@ -44,6 +44,17 @@ SCRIPT_PATH=`getAbsPath "$SCRIPT_PATH"` OPM_DATA= WORKSPACE="$SCRIPT_PATH/.." +# Make sure the working tree is clean +pushd . > /dev/null +cd $WORKSPACE +if [[ -n $(git diff-files) ]] +then + echo "Cannot run with working tree changes. Commit, drop or stash them." + exit 1 +fi +popd > /dev/null + + if [ "$OSTYPE" == "linux-gnu" ] then if which nproc > /dev/null