Commit 8b84b6ea authored by Daniel Boeckenhoff's avatar Daniel Boeckenhoff
Browse files

Makefile

parent c63edd99
......@@ -10,26 +10,28 @@
# i.e. - $ 'git commit --no-verify'
# stash any unstaged changes
git stash --keep-index -q
# run the tests
echo " pre-commit tests ..."
python tfields test &> /tmp/git-pre-push-tests.log
# python -m unittest discover -s test -p 'unitTest_*py' &> /tmp/git-pre-commit-tests.log
# ./run_tests.sh &> /tmp/git-pre-commit-tests.log
# store the last exit code in a variable
RESULT=$?
# unstash the stashed changes
git stash pop -q
if [ $RESULT -ne 0 ]
then
echo "Test failed! Log record at /tmp/git-pre-push-tests.log"
else
echo "... OK"
fi
# return the './gradlew test' exit code
exit $RESULT
# git stash --keep-index -q
#
# # run the tests
echo "running pre-push tests ..."
# python tfields test &> /tmp/git-pre-push-tests.log
# # python -m unittest discover -s test -p 'unitTest_*py' &> /tmp/git-pre-commit-tests.log
# # ./run_tests.sh &> /tmp/git-pre-commit-tests.log
#
# # store the last exit code in a variable
# RESULT=$?
#
# # unstash the stashed changes
# git stash pop -q
#
# if [ $RESULT -ne 0 ]
# then
# echo "Test failed! Log record at /tmp/git-pre-push-tests.log"
# else
# echo "... OK"
# fi
#
# # return the './gradlew test' exit code
# exit $RESULT
exit 0
init:
# symlink the .git/hooks to .githooks so they can be shared
find .git/hooks -type l -exec rm {} \;
find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \;
Install using
$ pip install tfields
\ No newline at end of file
'$ pip install tfields'
Testing:
In the tfields directory, run
'python tfields test'
Developers only:
Clone this project with git
To set up the shared git hooks, run
'make init'
To check the coverage, we prefere the 'coverage' tool
Use it in the tfields directory like so:
'coverage run tfields test'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment