Skip to content

Commit

Permalink
verilator: fix v1 in test_package
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 5, 2023
1 parent 0879a22 commit e300e39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recipes/verilator/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from conan.tools.apple import is_apple_os
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain
from conan.tools.files import save, load
from conan.tools.scm import Version


Expand Down Expand Up @@ -37,6 +38,8 @@ def generate(self):
tc = CMakeToolchain(self)
tc.variables["BUILD_SYSTEMC"] = self._with_systemc_example
tc.generate()
save(self, os.path.join(self.build_folder, "verilator_path"),
os.path.join(self.dependencies["verilator"].package_folder, "bin", "verilator"))

def build(self):
if can_run(self):
Expand All @@ -46,7 +49,7 @@ def build(self):

def test(self):
if can_run(self):
verilator_path = os.path.join(self.dependencies["verilator"].package_folder, "bin", "verilator")
verilator_path = load(self, os.path.join(self.build_folder, "verilator_path"))
self.run(f"perl {verilator_path} --version")
bin_path = os.path.join(self.cpp.build.bindir, "blinky")
self.run(bin_path, env="conanrun")
Expand Down

0 comments on commit e300e39

Please sign in to comment.