The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
427 B
19 lines
427 B
#!/usr/bin/env python3 |
|
|
|
import os |
|
import sys |
|
try: |
|
import pefile |
|
except ImportError: |
|
if 'CI' in os.environ: |
|
raise |
|
# Skip the test if not on CI |
|
sys.exit(77) |
|
|
|
executable = sys.argv[1] |
|
expected = int(sys.argv[2]) |
|
|
|
actual = pefile.PE(executable).dump_dict()['OPTIONAL_HEADER']['Subsystem']['Value'] |
|
|
|
print('subsystem expected: %d, actual: %d' % (expected, actual)) |
|
sys.exit(0 if (expected == actual) else 1)
|
|
|