Skip to content

Commit

Permalink
Merge pull request #516 from conan-io/release/0.34.1
Browse files Browse the repository at this point in the history
Bump Conan version to 1.28.0
  • Loading branch information
czoido authored Jul 31, 2020
2 parents 521dc78 + 33585f3 commit e6490ba
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- stage: Conan Latest - Macos
language: generic
os: osx
osx_image: xcode8.3
osx_image: xcode10.3
env: PYVER=py27 TOXENV=py27-conan-latest
- language: generic
os: osx
osx_image: xcode8.3
osx_image: xcode10.3
env: PYVER=py37 TOXENV=py37-conan-latest

- stage: Conan Development - Linux
Expand Down
4 changes: 2 additions & 2 deletions cpt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

__version__ = '0.34.0'
NEWEST_CONAN_SUPPORTED = "1.27.000"
__version__ = '0.34.1'
NEWEST_CONAN_SUPPORTED = "1.28.000"


def get_client_version():
Expand Down
2 changes: 1 addition & 1 deletion cpt/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
six>=1.10.0, <1.15.0
conan>=1.7.0, <1.28.0
conan>=1.7.0, <1.29.0
tabulate>=0.8.0, <0.9.0
3 changes: 3 additions & 0 deletions cpt/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def __init__(self, profile_abs_path, reference, conan_api, uploader,

self._profile = load_profile(profile_abs_path, cache)

if isinstance(self._test_folder, str) and self._test_folder.lower() == "false":
self._test_folder = False

@property
def settings(self):
return self._profile.settings
Expand Down
39 changes: 39 additions & 0 deletions cpt/test/integration/basic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from conans import tools
from conans.model.ref import ConanFileReference
from conans.errors import ConanException

from cpt.test.integration.base import BaseTest
from cpt.packager import ConanMultiPackager
Expand Down Expand Up @@ -310,6 +311,44 @@ def configure(self):
json_data = json.load(json_content)
self.assertFalse(json_data[0]["package"]["error"])

def test_disable_test_folder(self):
conanfile = """from conans import ConanFile
class Pkg(ConanFile):
name = "lib"
version = "1.0"
"""
self.save_conanfile(conanfile)
conanfile = """from conans import ConanFile
class Pkg(ConanFile):
def test(self):
raise Exception("Should not run")
"""
tools.save(os.path.join(self.tmp_folder, "test_package", "conanfile.py"), conanfile)
with tools.environment_append({"CPT_TEST_FOLDER": "False"}):
self.packager = ConanMultiPackager(out=self.output.write)
self.packager.add_common_builds()
self.packager.run()

def test_invalid_test_folder(self):
conanfile = """from conans import ConanFile
class Pkg(ConanFile):
name = "lib"
version = "1.0"
"""
self.save_conanfile(conanfile)
for test_folder in ["True", "foobar"]:
with tools.environment_append({"CPT_TEST_FOLDER": test_folder}):
self.packager = ConanMultiPackager(out=self.output.write)
self.packager.add_common_builds()
with self.assertRaises(ConanException) as raised:
self.packager.run()
self.assertIn("test folder '{}' not available, or it doesn't have a conanfile.py"
.format(test_folder),
str(raised.exception))

def test_custom_name_version(self):
conanfile = """from conans import ConanFile
from datetime import date
Expand Down

0 comments on commit e6490ba

Please sign in to comment.