Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | from os import getenv |
Uilian Ries | 3491804 | 2017-06-23 11:06:49 -0300 | [diff] [blame^] | 3 | from os import path |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 4 | from conans import ConanFile |
| 5 | from conans import CMake |
| 6 | |
| 7 | |
| 8 | class CatchConanTest(ConanFile): |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 9 | generators = "cmake" |
| 10 | settings = "os", "compiler", "arch", "build_type" |
Uilian Ries | 3491804 | 2017-06-23 11:06:49 -0300 | [diff] [blame^] | 11 | username = getenv("CONAN_USERNAME", "philsquared") |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 12 | channel = getenv("CONAN_CHANNEL", "testing") |
Uilian Ries | 3491804 | 2017-06-23 11:06:49 -0300 | [diff] [blame^] | 13 | requires = "Catch/1.9.5@%s/%s" % (username, channel) |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 14 | |
| 15 | def build(self): |
| 16 | cmake = CMake(self) |
| 17 | cmake.configure(build_dir="./") |
| 18 | cmake.build() |
| 19 | |
| 20 | def test(self): |
Uilian Ries | 3491804 | 2017-06-23 11:06:49 -0300 | [diff] [blame^] | 21 | self.run(path.join("bin", "CatchTest")) |