diff --git a/test.py b/test.py index c7b8766..8c472ae 100644 --- a/test.py +++ b/test.py @@ -51,7 +51,8 @@ def check_build(self, project_name, args=''): def test_artifact_path(self): if PLATFORM.startswith('vs'): - out = self.check_generate('artifacts_path', args='-G Ninja -DCMAKE_TOOLCHAIN_FILE="../../toolchains/Windows.MSVC.toolchain.cmake"') + # Ninja Multi-Config + out = self.check_generate('artifacts_path', args='-G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE="../../toolchains/Windows.MSVC.toolchain.cmake"') print(out) out = self.check_build('artifacts_path', '--config Release') print(out) @@ -61,6 +62,19 @@ def test_artifact_path(self): self.assertTrue(os.path.exists('build/artifacts_path/Release/subfoo_static.lib')) self.assertTrue(os.path.exists('build/artifacts_path/Release/subfoo_shared.dll')) self.assertTrue(os.path.exists('build/artifacts_path/Release/subhello.exe')) + shutil.rmtree('build/artifacts_path') + + # Ninja + out = self.check_generate('artifacts_path', args='-G Ninja -DCMAKE_TOOLCHAIN_FILE="../../toolchains/Windows.MSVC.toolchain.cmake"') + print(out) + out = self.check_build('artifacts_path', '--config Release') + print(out) + self.assertTrue(os.path.exists('build/artifacts_path/foo_static.lib')) + self.assertTrue(os.path.exists('build/artifacts_path/foo_shared.dll')) + self.assertTrue(os.path.exists('build/artifacts_path/hello.exe')) + self.assertTrue(os.path.exists('build/artifacts_path/subfoo_static.lib')) + self.assertTrue(os.path.exists('build/artifacts_path/subfoo_shared.dll')) + self.assertTrue(os.path.exists('build/artifacts_path/subhello.exe')) elif PLATFORM == 'linux': self.check_generate('artifacts_path') self.check_build('artifacts_path')