Skip to content

Instantly share code, notes, and snippets.

@michaelkirk michaelkirk/test-runner.sh
Last active Nov 29, 2015

Embed
What would you like to do?
e.g.> test-runner.sh tests/src/python/plugins/processing/ParametersTest.py
#!/usr/bin/env bash
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#Assuming this file is stored in your root directory...
SOURCE_ROOT=$BIN_DIR
# And that you've built your app in the `build` subdir
BUILD_DIR=$SOURCE_ROOT/build
PYTHONPATH=$BUILD_DIR/output/python/
PYTHONPATH=$PYTHONPATH:$SOURCE_ROOT/python/plugins
PYTHONPATH=$PYTHONPATH:$SOURCE_ROOT/python
PYTHONPATH=$PYTHONPATH:$SOURCE_ROOT/tests/src/python
PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
echo $PYTHONPATH
export PYTHONPATH
python $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.