From 960edb561121d122405502fc8c41f04c6475819d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 10 May 2022 11:59:59 +0300 Subject: [PATCH] Use full testing program path on Windows --- docs | 2 +- platformio/test/runners/doctest.py | 3 +-- platformio/test/runners/readers/program.py | 8 +++++++- tests/commands/test_test.py | 4 ---- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs b/docs index a035ea48..3bbe54ac 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit a035ea48bb3e75a95931679455d2e21d63d80f78 +Subproject commit 3bbe54ac3bac1a3d8f429998f705ccca225b3a5d diff --git a/platformio/test/runners/doctest.py b/platformio/test/runners/doctest.py index d2314f64..15f6b311 100644 --- a/platformio/test/runners/doctest.py +++ b/platformio/test/runners/doctest.py @@ -112,8 +112,7 @@ class DoctestTestRunner(TestRunnerBase): env.Append(CPPDEFINES=["DOCTEST_CONFIG_COLORS_NONE"]) if self.platform.is_embedded(): return - if "-std=" not in env.subst("$CXXFLAGS"): - env.Append(CXXFLAGS=["-std=c++11"]) + env.Append(CXXFLAGS=["-std=c++11"]) def on_testing_line_output(self, line): if self.options.verbose: diff --git a/platformio/test/runners/readers/program.py b/platformio/test/runners/readers/program.py index 391c87af..b0b33130 100644 --- a/platformio/test/runners/readers/program.py +++ b/platformio/test/runners/readers/program.py @@ -62,7 +62,13 @@ class ProgramTestOutputReader: if custom_testing_command: return custom_testing_command build_dir = self.test_runner.project_config.get("platformio", "build_dir") - cmd = [os.path.join(build_dir, self.test_runner.test_suite.env_name, "program")] + cmd = [ + os.path.join( + build_dir, + self.test_runner.test_suite.env_name, + "program.exe" if IS_WINDOWS else "program", + ) + ] if self.test_runner.options.program_args: cmd.extend(self.test_runner.options.program_args) return cmd diff --git a/tests/commands/test_test.py b/tests/commands/test_test.py index 466df517..362ae5a3 100644 --- a/tests/commands/test_test.py +++ b/tests/commands/test_test.py @@ -436,10 +436,6 @@ void unittest_uart_end(){} validate_cliresult(result) -@pytest.mark.skipif( - sys.platform == "win32" and os.environ.get("GITHUB_ACTIONS") == "true", - reason="skip Github Actions on Windows (MinGW issue)", -) def test_doctest_framework(clirunner, tmp_path: Path): project_dir = tmp_path / "project" project_dir.mkdir()