added a pre-push hook. move fips test to pre-push check

pull/110/head
John Safranek 2015-07-30 14:24:45 -07:00
parent 2cbb30745e
commit e1513c30d2
3 changed files with 20 additions and 8 deletions

View File

@ -9,6 +9,7 @@ if test -d .git; then
mkdir .git/hooks
fi
ln -s -f ../../pre-commit.sh .git/hooks/pre-commit
ln -s -f ../../pre-push.sh .git/hooks/pre-push
fi
# Set HAVE_FIPS_SOURCE to 1 in your .profile if you have access to the FIPS

View File

@ -31,12 +31,4 @@ make -j 8 test;
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nFull config make test failed" && exit 1
if [ -n "$HAVE_FIPS_SOURCE" ];
then
echo -e "\n\nTesting with FIPS release code...\n\n"
./fips-check.sh
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nFIPS build test failed" && exit 1
fi
exit 0

19
pre-push.sh 100755
View File

@ -0,0 +1,19 @@
#!/bin/sh
#
#
# Our "pre-push" hook.
RESULT=0
if [ -n "$HAVE_FIPS_SOURCE" ];
then
echo -e "\n\nTesting with FIPS release code...\n\n"
./fips-check.sh --no-keep
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nFIPS build test failed" && exit 1
fi
[ $RESULT -ne 0 ] && echo "\nOops, your push failed\n" && exit 1
echo "\nPush tests passed!\n"
exit 0