[libcxx-commits] [libcxx] [libcxx][lit] Fix dsl.sh.py test failure on Windows (PR #195230)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 1 00:15:26 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD libcxx/test/selftest/dsl/dsl.sh.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- dsl.sh.py 2026-05-01 07:01:30.000000 +0000
+++ dsl.sh.py 2026-05-01 07:14:51.798143 +0000
@@ -140,10 +140,11 @@
def test_link_error_fails(self):
source = """extern void this_isnt_defined_anywhere();
int main(int, char**) { this_isnt_defined_anywhere(); return 0; }"""
self.assertFalse(dsl.sourceBuilds(self.config, source))
+
def line_breaks_conversion(origin):
if os.linesep == "\r\n":
return origin.replace("\r\n", "\n")
class TestProgramOutput(SetupConfigs):
@@ -227,11 +228,11 @@
self.config.substitutions[compileFlagsIndex] = (
"%{compile_flags}",
compileFlags + " -DMACRO=1",
)
- output1 =line_breaks_conversion(dsl.programOutput(self.config, source))
+ output1 = line_breaks_conversion(dsl.programOutput(self.config, source))
self.assertEqual(output1, "MACRO=1\n")
self.config.substitutions[compileFlagsIndex] = (
"%{compile_flags}",
compileFlags + " -DMACRO=2",
``````````
</details>
https://github.com/llvm/llvm-project/pull/195230
More information about the libcxx-commits
mailing list