Created
March 3, 2015 22:03
-
-
Save juxtin/ced3f7eb5d5684a201f9 to your computer and use it in GitHub Desktop.
lt: wrapper around "lein test"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#### lt -- a wrapper around "lein test" | |
# The purpose of this script is to provide some conveniences around | |
# running Leiningen tests. Specifically, it does the following: | |
# 1) fails if there any unsaved Emacs buffers | |
# 2) prints out any lines containing "DEBUG" or Spyscope statements | |
# 3) runs the test with the supplied arguments | |
# | |
# unofficial strict mode | |
set -euo pipefail | |
IFS=$'\n\t' | |
# First, see if there are any unsaved Emacs buffers | |
test "$(find . -name '#*#')" && (echo there are unsaved files: $(find . -name '#*#')) && exit 1 | |
# Next, grep for debug symbols | |
ag 'DEBUG|#spy/[tdp]' src/ || : | |
# Ok, now run the test with whatever arguments were supplied | |
lein test $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment