aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-10-23 21:17:37 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-24 17:19:36 +0300
commitc4a9f59dc415f40513a281210d9598911b35b723 (patch)
tree56d3927b323e2d5494fe0c8a6c2f46fa838081e0 /run_unittests.py
parent61348da069bd3afe28a9de03e7792e20a9cb2eac (diff)
downloadmeson-c4a9f59dc415f40513a281210d9598911b35b723.zip
meson-c4a9f59dc415f40513a281210d9598911b35b723.tar.gz
meson-c4a9f59dc415f40513a281210d9598911b35b723.tar.bz2
Move VS C++17 test to a unit test since it requires env setup.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 9e9ba04..ee80a87 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3097,6 +3097,19 @@ class WindowsTests(BasePlatformTests):
self.utime(os.path.join(testdir, 'res', 'resource.h'))
self.assertRebuiltTarget('prog_1')
+ @unittest.skipIf(shutil.which('cl') is None, 'Test only applies to VS')
+ def test_msvc_cpp17(self):
+ testdir = os.path.join(self.unit_test_dir, '45 vscpp17')
+ try:
+ self.init(testdir)
+ except subprocess.CalledProcessError:
+ # According to Python docs, output is only stored when
+ # using check_output. We don't use it, so we can't check
+ # that the output is correct (i.e. that it failed due
+ # to the right reason).
+ return
+ self.build()
+
class DarwinTests(BasePlatformTests):
'''
Tests that should run on macOS