Use full testing program path on Windows

This commit is contained in:
Ivan Kravets
2022-05-10 11:59:59 +03:00
parent cda7a97e67
commit 960edb5611
4 changed files with 9 additions and 8 deletions

2
docs

Submodule docs updated: a035ea48bb...3bbe54ac3b

View File

@ -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:

View File

@ -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

View File

@ -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()