aboutsummaryrefslogtreecommitdiffstats
path: root/git_hooks
diff options
context:
space:
mode:
Diffstat (limited to 'git_hooks')
-rwxr-xr-xgit_hooks/pre-commit12
1 files changed, 10 insertions, 2 deletions
diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit
index 4c618746..f8dacac2 100755
--- a/git_hooks/pre-commit
+++ b/git_hooks/pre-commit
@@ -1,5 +1,7 @@
#!/bin/sh
+echo "Preparing to run tests..."
+
TDIR=`mktemp -d -t vimium`
if [ $? -ne 0 ]
@@ -8,10 +10,16 @@ then
fi
git checkout-index --prefix=$TDIR/ -af
+# because submodules don't get picked up by checkout-index
+cp -r ./tests/shoulda.js/ $TDIR/tests/shoulda.js/
-cake test
+pushd $TDIR > /dev/null
+ cake build
+ cake test
+ TEST_RESULT=$?
+popd
-TEST_RESULT=$?
+echo "Tests completed."
rm -rf $TDIR