Skip to content

stl-lit refuses to run tests using small drive letter in test path #4393

@AlexGuteniev

Description

@AlexGuteniev

Describe the bug

stl-lit refuses to run tests using small drive letter in test path.
The drive letter is used from current directory for relative paths without drive letter, or if it is resent in the path from the path iself.

Command-line test case

Absolute path


C:\Project\STL\out\x64>"C:\Program Files\Python312\python" tests\utils\stl-lit\stl-lit.py c:\Project\STL\tests\std\tests\VSO_0157762_feature_test_macros
stl-lit.py: C:\Project\STL\llvm-project\llvm\utils\lit\lit\discovery.py:276: warning: input 'c:\\Project\\STL\\tests\\std\\tests\\VSO_0157762_feature_test_macros' contained no tests
error: did not discover any tests for provided path(s)

C:\Project\STL\out\x64>"C:\Program Files\Python312\python" tests\utils\stl-lit\stl-lit.py C:\Project\STL\tests\std\tests\VSO_0157762_feature_test_macros
-- Testing: 35 tests, 12 workers --
PASS: std :: tests/VSO_0157762_feature_test_macros:00 (1 of 35)

.
.
.
PASS: std :: tests/VSO_0157762_feature_test_macros:16 (35 of 35)

Testing Time: 1.65s

Total Discovered Tests: 35
  Unsupported:  4 (11.43%)
  Passed     : 31 (88.57%)

C:\Project\STL\out\x64>

Relative path

C:\Project\STL\out\x64>cd \

C:\>cd/d c:\Project\STL\out\x64

c:\Project\STL\out\x64>"C:\Program Files\Python312\python" tests\utils\stl-lit\stl-lit.py ..\..\tests\std\tests\VSO_0157762_feature_test_macros
stl-lit.py: C:\Project\STL\llvm-project\llvm\utils\lit\lit\discovery.py:276: warning: input '..\\..\\tests\\std\\tests\\VSO_0157762_feature_test_macros' contained no tests
error: did not discover any tests for provided path(s)

c:\Project\STL\out\x64>cd \

c:\>cd/d C:\Project\STL\out\x64

C:\Project\STL\out\x64>"C:\Program Files\Python312\python" tests\utils\stl-lit\stl-lit.py ..\..\tests\std\tests\VSO_0157762_feature_test_macros
-- Testing: 35 tests, 12 workers --
PASS: std :: tests/VSO_0157762_feature_test_macros:00 (1 of 35)
.
.
.
PASS: std :: tests/VSO_0157762_feature_test_macros:16 (35 of 35)

Testing Time: 1.57s

Total Discovered Tests: 35
  Unsupported:  4 (11.43%)
  Passed     : 31 (88.57%)

C:\Project\STL\out\x64>

Expected behavior

Either any drive letter is accepted, or this problem is explained in readme.md

STL version

bd3d740

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!testRelated to test code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions