Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(948)

Side by Side Diff: content/browser/gpu/generate_webgl_conformance_test_list.py

Issue 10916334: Enable webgl conformance tests under content/test/gpu in content_browsertests (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: namespace fixup Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/perf/rendering/latency_tests.cc ('k') | content/browser/gpu/test_support_gpu.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Auto-generates the WebGL conformance test list header file. 6 """Auto-generates the WebGL conformance test list header file.
7 7
8 Parses the WebGL conformance test *.txt file, which contains a list of URLs 8 Parses the WebGL conformance test *.txt file, which contains a list of URLs
9 for individual conformance tests (each on a new line). It recursively parses 9 for individual conformance tests (each on a new line). It recursively parses
10 *.txt files. For each test URL, the matching gtest call is created and 10 *.txt files. For each test URL, the matching gtest call is created and
(...skipping 11 matching lines...) Expand all
22 // found in the LICENSE file. 22 // found in the LICENSE file.
23 23
24 """ 24 """
25 WARNING = """\ 25 WARNING = """\
26 // DO NOT EDIT! This file is auto-generated by 26 // DO NOT EDIT! This file is auto-generated by
27 // generate_webgl_conformance_test_list.py 27 // generate_webgl_conformance_test_list.py
28 // It is included by webgl_conformance_tests.cc 28 // It is included by webgl_conformance_tests.cc
29 29
30 """ 30 """
31 HEADER_GUARD = """\ 31 HEADER_GUARD = """\
32 #ifndef CHROME_TEST_GPU_WEBGL_CONFORMANCE_TEST_LIST_AUTOGEN_H_ 32 #ifndef CONTENT_TEST_GPU_WEBGL_CONFORMANCE_TEST_LIST_AUTOGEN_H_
33 #define CHROME_TEST_GPU_WEBGL_CONFORMANCE_TEST_LIST_AUTOGEN_H_ 33 #define CONTENT_TEST_GPU_WEBGL_CONFORMANCE_TEST_LIST_AUTOGEN_H_
34 34
35 """ 35 """
36 HEADER_GUARD_END = """ 36 HEADER_GUARD_END = """
37 #endif // CHROME_TEST_GPU_WEBGL_CONFORMANCE_TEST_LIST_AUTOGEN_H_ 37 #endif // CONTENT_TEST_GPU_WEBGL_CONFORMANCE_TEST_LIST_AUTOGEN_H_
38 38
39 """ 39 """
40 40
41 # Assume this script is run from the src/chrome/test/gpu directory. 41 # Assume this script is run from the src/content/test/gpu directory.
42 INPUT_DIR = "../../../third_party/webgl_conformance" 42 INPUT_DIR = "../../../third_party/webgl_conformance"
43 INPUT_FILE = "00_test_list.txt" 43 INPUT_FILE = "00_test_list.txt"
44 OUTPUT_FILE = "webgl_conformance_test_list_autogen.h" 44 OUTPUT_FILE = "webgl_conformance_test_list_autogen.h"
45 45
46 def main(argv): 46 def main(argv):
47 """Main function for the WebGL conformance test list generator. 47 """Main function for the WebGL conformance test list generator.
48 """ 48 """
49 if not os.path.exists(os.path.join(INPUT_DIR, INPUT_FILE)): 49 if not os.path.exists(os.path.join(INPUT_DIR, INPUT_FILE)):
50 print >> sys.stderr, "ERROR: WebGL conformance tests do not exist." 50 print >> sys.stderr, "ERROR: WebGL conformance tests do not exist."
51 print >> sys.stderr, "Run the script from the directory containing it." 51 print >> sys.stderr, "Run the script from the directory containing it."
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 else: 99 else:
100 print >> sys.stderr, "WARNING: %s does not exist (skipped)." % url 100 print >> sys.stderr, "WARNING: %s does not exist (skipped)." % url
101 input.close() 101 input.close()
102 102
103 output.write(HEADER_GUARD_END) 103 output.write(HEADER_GUARD_END)
104 output.close() 104 output.close()
105 return 0 105 return 0
106 106
107 if __name__ == "__main__": 107 if __name__ == "__main__":
108 sys.exit(main(sys.argv[1:])) 108 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « chrome/test/perf/rendering/latency_tests.cc ('k') | content/browser/gpu/test_support_gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698