Skip to content

Commit

Permalink
Fix for win32.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhale committed Apr 30, 2024
1 parent bfb06e7 commit f1390de
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion demo/cpp/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
from subprocess import run
import sys

import pytest

Expand All @@ -25,6 +26,13 @@ def test_demo(demo, cmake_args):
"""Test demos."""
demo_source = os.path.join(path, demo)
demo_build = os.path.join(path, demo, "_build")

run(f"cmake {cmake_args} -B {demo_build} -S {demo_source}", check=True, shell=True)
run(f"cmake --build {demo_build}", check=True, shell=True)
run(os.path.join(demo_build, demo), check=True, shell=True)

if sys.platform.startswith("win32"):
demo_executable = demo + ".exe"
else:
demo_executable = demo

run(os.path.join(demo_build, demo_executable), check=True, shell=True)

0 comments on commit f1390de

Please sign in to comment.