Skip to content

Instantly share code, notes, and snippets.

@haus
Created August 9, 2016 22:46
Show Gist options
  • Save haus/dec8165073aec399fb82e039771e7626 to your computer and use it in GitHub Desktop.
Save haus/dec8165073aec399fb82e039771e7626 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ -z "$1" ]; then
echo "Need a test file as an argument."
exit 1
fi
tests=$(grep -e '(deftest' $1 | awk '{print $NF}')
ns=$(grep -e '(ns' $1 | awk '{print $NF}')
for test in $tests; do
echo "Running $test now..."
time lein test :only ${ns}/${test}
echo "Test $test complete."
echo
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment