Remove APIPermission::kFileSystemWriteDirectory
[chromium-blink-merge.git] / tools / idl_parser / run_tests.py
blob878f17ed34ec20156f2e67a2d61d8e2bfee2f612
1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 import glob
7 import os
8 import sys
9 import unittest
11 if __name__ == '__main__':
12 suite = unittest.TestSuite()
13 cur_dir = os.path.dirname(os.path.realpath(__file__))
14 for testname in glob.glob(os.path.join(cur_dir, '*_test.py')):
15 print 'Adding Test: ' + testname
16 module = __import__(os.path.basename(testname)[:-3])
17 suite.addTests(unittest.defaultTestLoader.loadTestsFromModule(module))
18 result = unittest.TextTestRunner(verbosity=2).run(suite)
19 if result.wasSuccessful():
20 sys.exit(0)
21 else:
22 sys.exit(1)