Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions samples/libtorch/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ def layout(self):
cmake_layout(self)

def test(self):
if can_run(self):
cmd = os.path.join(self.cpp.build.bindir, "test_package")
self.run(cmd, env="conanrun")
if not can_run(self):
return
if self.settings.os in ("Linux", "FreeBSD"):
if self.dependencies["libtorch"].options.get_safe("with_cuda"):
self.output.warning("Skipping the test run: the NVIDIA driver (libcuda.so.1) not available in CI")
return
cmd = os.path.join(self.cpp.build.bindir, "test_package")
self.run(cmd, env="conanrun")
11 changes: 8 additions & 3 deletions samples/llama-cpp/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def build(self):
cmake.build()

def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
self.run(bin_path, env="conanrun")
if not can_run(self):
return
if self.settings.os in ("Linux", "FreeBSD"):
if self.dependencies["llama-cpp"].options.get_safe("with_cuda"):
self.output.warning("Skipping the test run: the NVIDIA driver (libcuda.so.1) not available in CI")
return
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
self.run(bin_path, env="conanrun")
Loading