OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 ''' | 3 ''' |
4 Copyright 2012 Google Inc. | 4 Copyright 2012 Google Inc. |
5 | 5 |
6 Use of this source code is governed by a BSD-style license that can be | 6 Use of this source code is governed by a BSD-style license that can be |
7 found in the LICENSE file. | 7 found in the LICENSE file. |
8 ''' | 8 ''' |
9 | 9 |
10 ''' | 10 ''' |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 print 'Usage: ' + os.path.basename(sys.argv[0]) + ' <testname> ' | 44 print 'Usage: ' + os.path.basename(sys.argv[0]) + ' <testname> ' |
45 '[ <testname> ... ]' | 45 '[ <testname> ... ]' |
46 exit(1) | 46 exit(1) |
47 | 47 |
48 is_svn_checkout = os.path.exists('.svn') or os.path.exists(os.path.join('..', '.
svn') ) | 48 is_svn_checkout = os.path.exists('.svn') or os.path.exists(os.path.join('..', '.
svn') ) |
49 is_git_checkout = os.path.exists('.git') or os.path.exists(os.path.join('..', '.
git')) | 49 is_git_checkout = os.path.exists('.git') or os.path.exists(os.path.join('..', '.
git')) |
50 | 50 |
51 for testname in sys.argv[1:]: | 51 for testname in sys.argv[1:]: |
52 for pair in pairs: | 52 for pair in pairs: |
53 if (pair[0] == 'base-shuttle-win7-intel-angle'): | 53 if (pair[0] == 'base-shuttle-win7-intel-angle'): |
54 testtypes = [ 'angle' ] | 54 testtypes = [ 'angle', 'anglemsaa16' ] |
55 else: | 55 else: |
56 testtypes = [ '565', '8888', 'gpu', 'pdf', 'mesa' ] | 56 testtypes = [ '565', '8888', 'gpu', 'pdf', 'mesa', 'msaa16', 'msaa4'
] |
57 print pair[0] + ':' | 57 print pair[0] + ':' |
58 for testtype in testtypes: | 58 for testtype in testtypes: |
59 infilename = testname + '_' + testtype + '.png' | 59 infilename = testname + '_' + testtype + '.png' |
60 print infilename | 60 print infilename |
61 | 61 |
62 url = 'http://skia-autogen.googlecode.com/svn/gm-actual/' + pair[0]
+ '/' + pair[1] + '/' + pair[0] + '/' + infilename | 62 url = 'http://skia-autogen.googlecode.com/svn/gm-actual/' + pair[0]
+ '/' + pair[1] + '/' + pair[0] + '/' + infilename |
63 cmd = [ 'curl', '--fail', '--silent', url ] | 63 cmd = [ 'curl', '--fail', '--silent', url ] |
64 temp = tempfile.NamedTemporaryFile() | 64 temp = tempfile.NamedTemporaryFile() |
65 ret = subprocess.call(cmd, stdout=temp) | 65 ret = subprocess.call(cmd, stdout=temp) |
66 if ret != 0: | 66 if ret != 0: |
67 print 'Couldn\'t fetch ' + url | 67 print 'Couldn\'t fetch ' + url |
68 continue | 68 continue |
69 outfilename = os.path.join(pair[0], infilename); | 69 outfilename = os.path.join(pair[0], infilename); |
70 cmd = [ 'cp', temp.name, outfilename ] | 70 cmd = [ 'cp', temp.name, outfilename ] |
71 subprocess.call(cmd); | 71 subprocess.call(cmd); |
72 if is_svn_checkout: | 72 if is_svn_checkout: |
73 cmd = [ 'svn', 'add', '--quiet', outfilename ] | 73 cmd = [ 'svn', 'add', '--quiet', outfilename ] |
74 subprocess.call(cmd) | 74 subprocess.call(cmd) |
75 cmd = [ 'svn', 'propset', '--quiet', 'svn:mime-type', 'image/png
', outfilename ]; | 75 cmd = [ 'svn', 'propset', '--quiet', 'svn:mime-type', 'image/png
', outfilename ]; |
76 subprocess.call(cmd) | 76 subprocess.call(cmd) |
77 elif is_git_checkout: | 77 elif is_git_checkout: |
78 cmd = [ 'git', 'add', outfilename ] | 78 cmd = [ 'git', 'add', outfilename ] |
79 subprocess.call(cmd) | 79 subprocess.call(cmd) |
OLD | NEW |