bpo-36876: Add a tool that identifies unsupported global C variables. (#15877)

This commit is contained in:
Eric Snow 2019-09-11 19:49:45 +01:00 committed by GitHub
parent 9936371af2
commit ee536b2020
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 9467 additions and 19 deletions

View file

@ -0,0 +1,22 @@
import unittest
import test.test_tools
test.test_tools.skip_if_missing('c-analyzer')
with test.test_tools.imports_under_tool('c-analyzer'):
from c_globals.__main__ import main
class ActualChecks(unittest.TestCase):
# XXX Also run the check in "make check".
@unittest.expectedFailure
def test_check_c_globals(self):
try:
main('check', {})
except NotImplementedError:
raise unittest.SkipTest('not supported on this host')
if __name__ == '__main__':
# Test needs to be a package, so we can do relative imports.
unittest.main()