Skip to content

Commit

Permalink
Merge branch 'release/0.20.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
lasote committed Nov 5, 2018
2 parents c06445f + 4846df3 commit 2117f5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cpt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

__version__ = '0.20.0'
__version__ = '0.20.2'
NEWEST_CONAN_SUPPORTED = "1.9"
2 changes: 1 addition & 1 deletion cpt/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def add(self, settings=None, options=None, env_vars=None, build_requires=None, r
def remove_build_if(self, predicate):
filtered_builds = []
for build in self.items:
if predicate(build):
if not predicate(build):
filtered_builds.append(build)

self._builds = filtered_builds
Expand Down
8 changes: 4 additions & 4 deletions cpt/test/unit/packager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def _add_build(self, number, compiler=None, version=None):
def test_remove_build_if(self):
self.packager.add({"arch": "x86", "build_type": "Release", "compiler": "gcc", "compiler.version": "6"})
self.packager.add({"arch": "x86", "build_type": "Debug", "compiler": "gcc", "compiler.version": "6"})
self.packager.add({"arch": "x86_64", "build_type": "Release", "compiler": "gcc", "compiler.version": "7"})
self.packager.add({"arch": "x86_64", "build_type": "Debug", "compiler": "gcc", "compiler.version": "7"})
self.packager.add({"arch": "x86", "build_type": "Release", "compiler": "gcc", "compiler.version": "7"})
self.packager.add({"arch": "x86", "build_type": "Debug", "compiler": "gcc", "compiler.version": "7"})

self.packager.remove_build_if(lambda build: build.settings["compiler.version"] == "6")

Expand All @@ -56,8 +56,8 @@ def test_remove_build_if(self):
reference="lib/1.0",
ci_manager=self.ci_manager)

packager_expected.add({"arch": "x86", "build_type": "Release", "compiler": "gcc", "compiler.version": "6"})
packager_expected.add({"arch": "x86", "build_type": "Debug", "compiler": "gcc", "compiler.version": "6"})
packager_expected.add({"arch": "x86", "build_type": "Release", "compiler": "gcc", "compiler.version": "7"})
packager_expected.add({"arch": "x86", "build_type": "Debug", "compiler": "gcc", "compiler.version": "7"})

self.assertEqual([tuple(a) for a in self.packager.items], packager_expected.items)

Expand Down

0 comments on commit 2117f5d

Please sign in to comment.