[PATCH] D78245: [LIT] Make `%T` unique for every test

Eric Fiselier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 14:55:23 PDT 2020


EricWF created this revision.
EricWF added a reviewer: ldionne.
Herald added subscribers: broadwaylamb, dexonsmith, delcypher.
Herald added projects: libc++, libc++abi.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.
EricWF marked 2 inline comments as done.
EricWF added inline comments.


================
Comment at: llvm/utils/lit/lit/TestRunner.py:1062
     execdir,execbase = os.path.split(execpath)
-    tmpDir = os.path.join(execdir, 'Output')
+    tmpDir = os.path.join(execdir, 'Output', execbase + '.dir')
     tmpBase = os.path.join(tmpDir, execbase)
----------------
@ldionne Here's the relevant LIT change.


================
Comment at: llvm/utils/lit/lit/TestRunner.py:1500
+    tmpDir = os.path.dirname(tmpBase)
+    if os.path.isdir(tmpDir):
+        shutil.rmtree(tmpDir)
----------------
This change probably isn't needed.


This allows libc++ to use the same temp directory created by LIT's sh test, because that path is now hermetic to the test.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78245

Files:
  libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp
  libcxx/test/libcxx/double_include.sh.cpp
  libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
  libcxx/test/libcxx/selftest/exec.sh.cpp
  libcxx/test/libcxx/selftest/newformat/sh.cpp/remote-substitutions.sh.cpp
  libcxx/test/libcxx/selftest/newformat/sh.cpp/substitutions.sh.cpp
  libcxx/test/libcxx/selftest/test.sh.cpp
  libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp
  libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp
  libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
  libcxx/utils/libcxx/test/config.py
  libcxx/utils/libcxx/test/newformat.py
  libcxx/utils/run.py
  libcxxabi/test/incomplete_type.sh.cpp
  llvm/utils/lit/lit/TestRunner.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78245.257857.patch
Type: text/x-patch
Size: 9158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200415/d59fc84f/attachment.bin>


More information about the llvm-commits mailing list