Test all system
@@ -131,10 +131,14 @@ class AppTest(unittest.TestCase):
self.packager.builds = [({"os": "Windows"}, {"option": "value"})]
self.assertEquals(self.packager.builds, [BuildConf(settings={'os': 'Windows'}, options={'option': 'value'}, env_vars={}, build_requires={})])
-
def test_only_mingw(self):
+
+ class PlatformInfoMock(object):
+ def system(self):
+ return "Windows"
+
mingw_configurations = [("4.9", "x86_64", "seh", "posix")]
- builder = ConanMultiPackager(mingw_configurations=mingw_configurations, visual_versions=[], username="Pepe")
+ builder = ConanMultiPackager(mingw_configurations=mingw_configurations, visual_versions=[], username="Pepe", platform_info=PlatformInfoMock())
builder.add_common_builds(shared_option_name="zlib:shared", pure_c=True)
expected = [({'compiler.libcxx': 'libstdc++', 'compiler.exception': 'seh', 'compiler.threads': 'posix', 'compiler.version': '4.9', 'arch': 'x86_64', 'build_type': 'Release', 'compiler': 'gcc'},
{'mingw_installer:threads': 'posix', 'mingw_installer:arch': 'x86_64', 'mingw_installer:version': '4.9', 'mingw_installer:exception': 'seh'},
@@ -144,6 +148,5 @@ class AppTest(unittest.TestCase):
{'mingw_installer:threads': 'posix', 'mingw_installer:arch': 'x86_64', 'mingw_installer:version': '4.9', 'mingw_installer:exception': 'seh'},
{},
{'*': [ConanFileReference.loads("mingw_installer/0.1@lasote/testing")]})]
- if platform.system() == "Windows":
self.assertEquals([tuple(a) for a in builder.builds], expected)
