Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame^] | 1 | #!/usr/bin/env python |
| 2 | from os import getenv |
| 3 | from conans import ConanFile |
| 4 | from conans import CMake |
| 5 | |
| 6 | |
| 7 | class CatchConanTest(ConanFile): |
| 8 | """Build test using target package and execute all tests |
| 9 | """ |
| 10 | target = "Catch" |
| 11 | name = "%s-test" % target |
| 12 | version = "1.9.5" |
| 13 | description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD" |
| 14 | author = "philsquared" |
| 15 | generators = "cmake" |
| 16 | settings = "os", "compiler", "arch", "build_type" |
| 17 | url = "https://github.com/philsquared/Catch" |
| 18 | license = "BSL-1.0" |
| 19 | username = getenv("CONAN_USERNAME", author) |
| 20 | channel = getenv("CONAN_CHANNEL", "testing") |
| 21 | requires = "%s/%s@%s/%s" % (target, version, username, channel) |
| 22 | |
| 23 | def build(self): |
| 24 | cmake = CMake(self) |
| 25 | cmake.configure(build_dir="./") |
| 26 | cmake.build() |
| 27 | |
| 28 | def test(self): |
| 29 | cmake = CMake(self) |
| 30 | cmake.configure(build_dir="./") |
| 31 | cmake.test() |