[llvm] r312288 - [lit] Fix some issues with short paths in test discovery introduced in r312254
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 31 14:56:14 PDT 2017
Author: rnk
Date: Thu Aug 31 14:56:14 2017
New Revision: 312288
URL: http://llvm.org/viewvc/llvm-project?rev=312288&view=rev
Log:
[lit] Fix some issues with short paths in test discovery introduced in r312254
Modified:
llvm/trunk/utils/lit/lit/discovery.py
llvm/trunk/utils/lit/tests/discovery.py
Modified: llvm/trunk/utils/lit/lit/discovery.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/discovery.py?rev=312288&r1=312287&r2=312288&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/discovery.py (original)
+++ llvm/trunk/utils/lit/lit/discovery.py Thu Aug 31 14:56:14 2017
@@ -59,7 +59,7 @@ def getTestSuite(item, litConfig, cache)
return res
# Canonicalize the path.
- item = os.path.normpath(item)
+ item = os.path.normpath(os.path.join(os.getcwd(), item))
# Skip files and virtual components.
components = []
Modified: llvm/trunk/utils/lit/tests/discovery.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/discovery.py?rev=312288&r1=312287&r2=312288&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/discovery.py (original)
+++ llvm/trunk/utils/lit/tests/discovery.py Thu Aug 31 14:56:14 2017
@@ -90,6 +90,13 @@
# RUN: -j 1 --show-tests --show-suites -v > %t.out
# RUN: FileCheck --check-prefix=CHECK-ASEXEC-INTREE < %t.out %s
#
+# Try it again after cd'ing into the test suite using a short relative path.
+#
+# RUN: cd %{inputs}/exec-discovery-in-tree/obj/
+# RUN: %{lit} . \
+# RUN: -j 1 --show-tests --show-suites -v > %t.out
+# RUN: FileCheck --check-prefix=CHECK-ASEXEC-INTREE < %t.out %s
+#
# CHECK-ASEXEC-INTREE: exec-discovery-in-tree-suite - 1 tests
# CHECK-ASEXEC-INTREE-NEXT: Source Root: {{.*[/\\]exec-discovery-in-tree$}}
# CHECK-ASEXEC-INTREE-NEXT: Exec Root : {{.*[/\\]exec-discovery-in-tree[/\\]obj$}}
More information about the llvm-commits
mailing list