2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 19:30:04 +01:00
waf/tests/msvc/wscript

26 lines
780 B
Python
Executable File

#! /usr/bin/env python3.1
from waflib.Tools import msvc
from waflib import Logs
def configure(ctx):
pass
def test(ctx):
errors = []
msvc_versions = ['wsdk 6.1', 'winphone 8.0', 'msvc 9.0', 'msvc 16.6', 'msvc 16.0', 'msvc 15.9', 'msvc 15.0', 'msvc 14.0', 'msvc 12.0', 'msvc 11.0']
sorted_versions = ['msvc 16.6', 'msvc 16.0', 'msvc 15.9', 'msvc 15.0', 'msvc 14.0', 'msvc 12.0', 'msvc 11.0', 'msvc 9.0', 'winphone 8.0', 'wsdk 6.1']
def tt(msg, result, expected):
color = 'RED'
if result == expected:
color = 'GREEN'
else:
errors.append(result)
Logs.pprint(color, msg.ljust(20) + " %r" % result)
tt('msvc version detection sort', sorted(msvc_versions, key=msvc.MSVCVersion, reverse=True), sorted_versions)
if errors:
ctx.fatal('There are test failures')