summaryrefslogtreecommitdiffstats
path: root/runtests.sh
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-10-09 14:38:10 -0400
committerMike Frysinger <vapier@gentoo.org>2011-10-09 16:40:43 -0400
commit949b30548b21630b1423f5ead8335bc5eb0bbc92 (patch)
tree36247a4bc9d1e61621841d5238eda8155e1dcd3f /runtests.sh
parent80a9cd59ed8df549ff0991705040d5270c8d0d03 (diff)
downloadportage-949b30548b21630b1423f5ead8335bc5eb0bbc92.tar.gz
portage-949b30548b21630b1423f5ead8335bc5eb0bbc92.tar.bz2
portage-949b30548b21630b1423f5ead8335bc5eb0bbc92.zip
runtests: make sure we are in the right dir
The code assumes we're in the top of the tree (when it tries to run with the full path "pym/portage/tests/runTests"), so try to make sure we are in the right place to allow things like `../runtests.sh` to "just work". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'runtests.sh')
-rwxr-xr-xruntests.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtests.sh b/runtests.sh
index 981fa1ec2..d55860af0 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -4,6 +4,9 @@
PYTHON_VERSIONS="2.6 2.7 3.1 3.2 3.3"
+# has to be run from portage root dir
+cd "${0%/*}" || exit 1
+
case "${NOCOLOR:-false}" in
yes|true)
GOOD=