Skip to content

Commit 2276af7

Browse files
committed
testlib: allow passing list of tests to gyptest.py
1 parent 44a1f5b commit 2276af7

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.pyc
22
/out/
33
/.venv/
4+
*.tests

gyptest.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ def find_all_gyptest_files(directory):
3030
return result
3131

3232

33-
def main(argv=None):
34-
if argv is None:
35-
argv = sys.argv
36-
37-
parser = argparse.ArgumentParser()
33+
def main(argv):
34+
parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
3835
parser.add_argument("-a", "--all", action="store_true", help="run all tests")
3936
parser.add_argument("-C", "--chdir", action="store", help="change to directory")
4037
parser.add_argument("-f", "--format", action="store", default='', help="run tests with the specified formats")
@@ -232,4 +229,5 @@ def print_results(self):
232229

233230

234231
if __name__ == "__main__":
235-
sys.exit(main())
232+
ret = main(sys.argv)
233+
sys.exit(ret)

test/ios/gyptest-app-ios.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
test = TestGyp.TestGyp(formats=['xcode', 'ninja'], platforms=['darwin'])
1111

1212
if not XCodeDetect.XCodeDetect.HasIPhoneSDK():
13-
test.test_skip('IPhone SDK not installed')
13+
test.skip_test('IPhone SDK not installed')
1414

1515

1616
def CheckFileXMLPropertyList(file):

test/mac/gyptest-clang-cxx-library.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212
import XCodeDetect
1313

1414
test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode'], platforms=['darwin'])
15-
# Xcode 4.2 on OS X 10.6 doesn't install the libc++ headers, don't run this
16-
# test there.
15+
# Xcode 4.2 on OS X 10.6 doesn't install the libc++ headers, don't run this test there.
1716
if XCodeDetect.XCodeDetect.Version() <= '0420':
1817
test.skip_test('test only on XCode > 0420')
1918

20-
# if test.format == 'make':
21-
# # This is failing because of a deprecation warning for libstdc++.
22-
# test.skip_test() # bug=533
19+
if test.format == 'make':
20+
# This is failing because of a deprecation warning for libstdc++.
21+
test.skip_test() # bug=533
2322

2423
test.run_gyp('clang-cxx-library.gyp', chdir='clang-cxx-library')
2524
test.build('clang-cxx-library.gyp', test.ALL, chdir='clang-cxx-library')

0 commit comments

Comments
 (0)