Skip to content

Commit

Permalink
Fix test_add_subdirectory running on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jcar87 committed Nov 8, 2023
1 parent 0a1b099 commit a4882aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,11 @@ def test_add_subdirectory(self, capfd):
run(f"cmake -S {self.source_dir} -B {self.binary_dir} -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES={conan_provider} -DCMAKE_BUILD_TYPE=Release")
out, _ = capfd.readouterr()
assert all(expected in out for expected in expected_conan_install_outputs)
run("cmake --build .")
if platform.system == "Windows":
run("cmake --build . --config Release")
if platform.system() == "Windows":
app_executable = self.binary_dir / "subdir" / "Release" / "appSubdir.exe"
else:
app_executable = self.binary_dir / "subdir" / "appSubdir"
"appSubdir.exe" if platform.system() == "Windows" else "appSubdir"
run(app_executable.as_posix())
out, _ = capfd.readouterr()
assert "subdir/0.1: Hello World Release!" in out
Expand Down

0 comments on commit a4882aa

Please sign in to comment.