diff options
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-x | scripts/TestUtil.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py index 3db18b88143..a2bd9d21cd5 100755 --- a/scripts/TestUtil.py +++ b/scripts/TestUtil.py @@ -283,9 +283,10 @@ toplevel = None path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../..", "../../../../../..", "../../../../../../..", "../../../../../../../..", "../../../../../../../../.." ] head = os.path.dirname(sys.argv[0]) -if len(head) > 0: - # Try to find scripts/TestUtil.py or ice/scripts/TestUtil.py in parent directories - path = [os.path.join(head, p) for p in path] + [os.path.join(head, p, "ice") for p in path] +if len(head) == 0: + head = "." +# Try to find scripts/TestUtil.py or ice/scripts/TestUtil.py in parent directories +path = [os.path.join(head, p) for p in path] + [os.path.join(head, p, "ice") for p in path] path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ] if len(path) == 0: raise RuntimeError("can't find toplevel directory!") |