diff --git a/llvm/utils/lit/lit/cl_arguments.py b/llvm/utils/lit/lit/cl_arguments.py --- a/llvm/utils/lit/lit/cl_arguments.py +++ b/llvm/utils/lit/lit/cl_arguments.py @@ -92,7 +92,8 @@ execution_group.add_argument("--path", help="Additional paths to add to testing environment", action="append", - default=[]) + default=[], + type=os.path.abspath) execution_group.add_argument("--vg", dest="useValgrind", help="Run tests under valgrind", diff --git a/llvm/utils/lit/lit/util.py b/llvm/utils/lit/lit/util.py --- a/llvm/utils/lit/lit/util.py +++ b/llvm/utils/lit/lit/util.py @@ -232,7 +232,7 @@ for ext in pathext: p = os.path.join(path, command + ext) if os.path.exists(p) and not os.path.isdir(p): - return os.path.normcase(os.path.normpath(p)) + return os.path.normcase(os.path.abspath(p)) return None