Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Commit

Permalink
Disable running the test executable when cross-compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoMecucci-TomTom committed Nov 1, 2018
1 parent e7a5003 commit cd07b8e
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ def build(self):
cmake.build()

def test(self):
with tools.environment_append(RunEnvironment(self).vars):
bin_path = os.path.join("bin", "test_package")
arguments = "%sw+ Bincrafters" % ("\\" if self.settings.os == "Windows" else "\\\\")
if self.settings.os == "Windows":
self.run("%s %s" % (bin_path, arguments))
elif self.settings.os == "Macos":
self.run("DYLD_LIBRARY_PATH=%s %s %s" % (os.environ.get('DYLD_LIBRARY_PATH', ''), bin_path, arguments))
else:
self.run("LD_LIBRARY_PATH=%s %s %s" % (os.environ.get('LD_LIBRARY_PATH', ''), bin_path, arguments))
if not tools.cross_building(self.settings):
with tools.environment_append(RunEnvironment(self).vars):
bin_path = os.path.join("bin", "test_package")
arguments = "%sw+ Bincrafters" % ("\\" if self.settings.os == "Windows" else "\\\\")
if self.settings.os == "Windows":
self.run("%s %s" % (bin_path, arguments))
elif self.settings.os == "Macos":
self.run("DYLD_LIBRARY_PATH=%s %s %s" % (os.environ.get('DYLD_LIBRARY_PATH', ''), bin_path, arguments))
else:
self.run("LD_LIBRARY_PATH=%s %s %s" % (os.environ.get('LD_LIBRARY_PATH', ''), bin_path, arguments))

0 comments on commit cd07b8e

Please sign in to comment.