Skip to content

Instantly share code, notes, and snippets.

@friedmud
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save friedmud/9199350 to your computer and use it in GitHub Desktop.
Save friedmud/9199350 to your computer and use it in GitHub Desktop.
moose_test recipe
# Go to where the MOOSE repo was cloned
cd $REPO_DIR
git reset HEAD --hard
# Check out the devel branch (note, we might already be there, that's ok)
git co devel
# clean it
git clean -xfd
# Update the devel branch
git pull --rebase origin devel
# Create a branch to work with (we'll delete this later)
# We're replacing the '/'es in the repo name with dashes
# to create the branch name
branch_name=${repo//\//-}
git co -b $branch_name
# Merge the branch in the pull request into this one:
git pull $ssh_url $ref
# Now build and test
cd $REPO_DIR/test
make -j16
./run_tests -c -j16
# Save off the return code from ./run_tests
return_code=$?
# Clean up in the case of bad merge
git reset HEAD --hard
# Go back to the devel branch then delete this one
git co devel
git branch -D $branch_name
# Return the return code
exit $return_code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment