Skip to content

Commit bb453ac

Browse files
authored
test.py: remove use of lit.util.mkdir_p (#292)
The helper function `lit.util.mkdir_p` has been removed in llvm/llvm-project#163948 . Instead of that, call `pathlib` functions directly.
1 parent b339aa8 commit bb453ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

litsupport/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"""
55
import lit
66
import lit.TestRunner
7-
import lit.util
87
import lit.formats
98
import litsupport.modules
109
import litsupport.modules.hash
1110
import litsupport.testfile
1211
import litsupport.testplan
1312
import os
13+
import pathlib
1414

1515

1616
# The ResultCode constructor has been changed recently in lit. An additional parameter has ben added, which
@@ -38,7 +38,7 @@ def execute(self, test, litConfig):
3838

3939
# Parse .test file and initialize context
4040
tmpDir, tmpBase = lit.TestRunner.getTempPaths(test)
41-
lit.util.mkdir_p(os.path.dirname(tmpBase))
41+
pathlib.Path(tmpBase).parent.mkdir(parents=True, exist_ok=True)
4242
context = litsupport.testplan.TestContext(test, litConfig, tmpDir, tmpBase)
4343
litsupport.testfile.parse(context, test.getSourcePath())
4444
plan = litsupport.testplan.TestPlan()

0 commit comments

Comments
 (0)