Skip to content

Instantly share code, notes, and snippets.

@snormore
Last active December 16, 2015 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snormore/5384710 to your computer and use it in GitHub Desktop.
Save snormore/5384710 to your computer and use it in GitHub Desktop.
Run go tests for every sub-package of the Go project.
#!/bin/bash
CONFIG_PATH="`pwd`/config"
CODE_DIR="`pwd`/gonode/src/go.io"
cd $CODE_DIR
for pkg in $(find ./*/ -type d)
do
echo "Running '${pkg:2}' tests..."
cd "$CODE_DIR/$pkg"
export CONFIG_PATH=$CONFIG_PATH
export GO_ENV="test"
go test -i
go test
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment