Skip to content

Commit

Permalink
test_package fix
Browse files Browse the repository at this point in the history
contributes to CURA-10951
  • Loading branch information
jellespijker committed Aug 29, 2023
1 parent 5e1e44e commit ee977f3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,33 @@
from conan.tools.build import can_run
from conan.tools.env import VirtualRunEnv
from conan.errors import ConanException
from conan.tools.files import copy


class ArcusTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "VirtualRunEnv"
generators = "VirtualRunEnv"
test_type = "explicit"

def requirements(self):
self.requires(self.tested_reference_str)

def generate(self):
venv = VirtualRunEnv(self)
venv.generate()

cpp_info = self.dependencies[self.tested_reference_str].cpp_info
copy(self, "*.pyd", src = cpp_info.libdirs[0], dst =self.build_folder)

for dep in self.dependencies.values():
copy(self, "*.dll", src = dep.cpp_info.bindirs[0], dst = self.build_folder)

def build(self):
if can_run(self):
shutil.copy(Path(self.source_folder).joinpath("test.py"), Path(self.build_folder).joinpath("test.py"))
shutil.copy(Path(self.source_folder).joinpath("test.proto"), Path(self.build_folder).joinpath("test.proto"))


def test(self):
if can_run(self):
test_buf = StringIO()
Expand Down

0 comments on commit ee977f3

Please sign in to comment.