commit:     98c6189981760df1b7077cdf1c74de9d427a8af9
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun May 15 00:21:33 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun May 15 00:21:33 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=98c61899

repoman: Fix the repoman/runtests script to run from it's current location

This allows it to be called from the base portage directory or anywhere else.

 repoman/runtests | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/repoman/runtests b/repoman/runtests
index bad83dc..599edda 100755
--- a/repoman/runtests
+++ b/repoman/runtests
@@ -121,6 +121,8 @@ def main(argv):
                        else:
                                pyversions.extend(ver.split())
 
+       here = os.path.dirname(__file__)
+       run_path = os.path.join(here, 'pym/repoman/tests/runTests.py')
        tempdir = None
        try:
                # Set up a single tempdir for all the tests to use.
@@ -132,7 +134,7 @@ def main(argv):
                statuses = []
                for ver in pyversions:
                        prog = get_python_executable(ver)
-                       cmd = [prog, '-b', '-Wd', 
'pym/repoman/tests/runTests.py'] + args
+                       cmd = [prog, '-b', '-Wd', run_path] + args
                        if os.access(prog, os.X_OK):
                                print('%sTesting with Python %s...%s' %
                                        (colors.GOOD, ver, colors.NORMAL))

Reply via email to