From 1f83f007e8f2a063b326176c3b34b02d8e04181f Mon Sep 17 00:00:00 2001 From: clayg Date: Mon, 26 Nov 2012 09:58:09 -0600 Subject: [PATCH] Allow dot test runners from any dir Currently the .*test files in the source tree root seem to assume you're in that directory when you run them. This change should work exactly the same except for removing that restriction. Change-Id: I9b037016490dd6d5b515cb2c3cad2f99ee40bb6d --- .functests | 6 ++++-- .probetests | 2 +- .unittests | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.functests b/.functests index 56898294eb..9797f58a1e 100755 --- a/.functests +++ b/.functests @@ -1,11 +1,13 @@ #!/bin/bash -cd test/functional +SRC_DIR=$(dirname $0) + +cd ${SRC_DIR}/test/functional nosetests --exe $@ func1=$? cd - -cd test/functionalnosetests +cd ${SRC_DIR}/test/functionalnosetests nosetests --exe $@ func2=$? cd - diff --git a/.probetests b/.probetests index 67d25aae8d..5d9f69915e 100755 --- a/.probetests +++ b/.probetests @@ -1,6 +1,6 @@ #!/bin/bash -cd test/probe +cd $(dirname $0)/test/probe nosetests --exe rvalue=$? cd - diff --git a/.unittests b/.unittests index 773c2cb836..6fc2eb1ed9 100755 --- a/.unittests +++ b/.unittests @@ -1,8 +1,8 @@ #!/bin/bash -cd test/unit +cd $(dirname $0)/test/unit nosetests --exe --with-coverage --cover-package swift --cover-erase $@ rvalue=$? rm -f .coverage cd - -exit $rvalue \ No newline at end of file +exit $rvalue