summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Gohad <tushar.gohad@intel.com>2015-02-24 23:08:45 -0700
committerTushar Gohad <tushar.gohad@intel.com>2015-02-24 23:08:45 -0700
commite611b03b524005200256ffa537b775fd0b2b3abb (patch)
treeab7a7a045869820882e471983bfb95cb8f6cd8c0
parentff1d34fdff50c0e006b383e90b78eea1e95897b5 (diff)
downloadpyeclib-e611b03b524005200256ffa537b775fd0b2b3abb.tar.gz
Add .unittests script to standardize nosetests invocation
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
-rwxr-xr-x.unittests10
1 files changed, 10 insertions, 0 deletions
diff --git a/.unittests b/.unittests
new file mode 100755
index 0000000..0265036
--- /dev/null
+++ b/.unittests
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+TOP_DIR=$(python -c "import os; print os.path.dirname(os.path.realpath('$0'))")
+
+python -c 'from distutils.version import LooseVersion as Ver; import nose, sys; sys.exit(0 if Ver(nose.__version__) >= Ver("1.2.0") else 1)'
+cd $TOP_DIR/test
+nosetests $@
+rvalue=$?
+cd -
+exit $rvalue