| 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 ''' |
| 11 Rebaselines the given GM tests, on all bots and all configurations. | 11 Rebaselines the given GM tests, on all bots and all configurations. |
| 12 Must be run from the gm-expected directory. If run from a git or SVN | 12 Must be run from the gm-expected directory. If run from a git or SVN |
| 13 checkout, the files will be added to the staging area for commit. | 13 checkout, the files will be added to the staging area for commit. |
| 14 ''' | 14 ''' |
| 15 | 15 |
| 16 import os, subprocess, sys, tempfile | 16 import os, subprocess, sys, tempfile |
| 17 | 17 |
| 18 pairs = [ | 18 pairs = [ |
| 19 ['base-shuttle-win7-intel-float', | 19 ['base-shuttle-win7-intel-float', |
| 20 'Skia_Shuttle_Win7_Intel_Float_Release_32'], | 20 'Test-Win7-ShuttleA-HD2000-x86-Release'], |
| 21 ['base-shuttle-win7-intel-angle', | 21 ['base-shuttle-win7-intel-angle', |
| 22 'Skia_Shuttle_Win7_Intel_Float_ANGLE_Release_32'], | 22 'Test-Win7-ShuttleA-HD2000-x86-Release-ANGLE'], |
| 23 ['base-shuttle-win7-intel-directwrite', | 23 ['base-shuttle-win7-intel-directwrite', |
| 24 'Skia_Shuttle_Win7_Intel_Float_DirectWrite_Release_32'], | 24 'Test-Win7-ShuttleA-HD2000-x86-Release-DirectWrite'], |
| 25 ['base-shuttle_ubuntu12_ati5770', | 25 ['base-shuttle_ubuntu12_ati5770', |
| 26 'Skia_Shuttle_Ubuntu12_ATI5770_Float_Release_64'], | 26 'Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release'], |
| 27 ['base-macmini', | 27 ['base-macmini', |
| 28 'Skia_Mac_Float_Release_32'], | 28 'Test-Mac10.6-MacMini4.1-GeForce320M-x86-Release'], |
| 29 ['base-macmini-lion-float', | 29 ['base-macmini-lion-float', |
| 30 'Skia_MacMiniLion_Float_Release_32'], | 30 'Test-Mac10.7-MacMini4.1-GeForce320M-x86-Release'], |
| 31 ['base-android-galaxy-nexus', | 31 ['base-android-galaxy-nexus', |
| 32 'Skia_GalaxyNexus_4-1_Float_Release_32'], | 32 'Test-Android-GalaxyNexus-SGX540-Arm7-Release'], |
| 33 ['base-android-nexus-7', | 33 ['base-android-nexus-7', |
| 34 'Skia_Nexus7_4-1_Float_Release_32'], | 34 'Test-Android-Nexus7-Tegra3-Arm7-Release'], |
| 35 ['base-android-nexus-s', | 35 ['base-android-nexus-s', |
| 36 'Skia_NexusS_4-1_Float_Release_32'], | 36 'Test-Android-NexusS-SGX540-Arm7-Release'], |
| 37 ['base-android-xoom', | 37 ['base-android-xoom', |
| 38 'Skia_Xoom_4-1_Float_Release_32'], | 38 'Test-Android-Xoom-Tegra2-Arm7-Release'], |
| 39 ] | 39 ] |
| 40 | 40 |
| 41 if len(sys.argv) < 2: | 41 if len(sys.argv) < 2: |
| 42 print 'Usage: ' + os.path.basename(sys.argv[0]) + ' <testname> ' | 42 print 'Usage: ' + os.path.basename(sys.argv[0]) + ' <testname> ' |
| 43 '[ <testname> ... ]' | 43 '[ <testname> ... ]' |
| 44 exit(1) | 44 exit(1) |
| 45 | 45 |
| 46 is_svn_checkout = os.path.exists('.svn') or os.path.exists(os.path.join('..', '.
svn') ) | 46 is_svn_checkout = os.path.exists('.svn') or os.path.exists(os.path.join('..', '.
svn') ) |
| 47 is_git_checkout = os.path.exists('.git') or os.path.exists(os.path.join('..', '.
git')) | 47 is_git_checkout = os.path.exists('.git') or os.path.exists(os.path.join('..', '.
git')) |
| 48 | 48 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 68 cmd = [ 'cp', temp.name, outfilename ] | 68 cmd = [ 'cp', temp.name, outfilename ] |
| 69 subprocess.call(cmd); | 69 subprocess.call(cmd); |
| 70 if is_svn_checkout: | 70 if is_svn_checkout: |
| 71 cmd = [ 'svn', 'add', '--quiet', outfilename ] | 71 cmd = [ 'svn', 'add', '--quiet', outfilename ] |
| 72 subprocess.call(cmd) | 72 subprocess.call(cmd) |
| 73 cmd = [ 'svn', 'propset', '--quiet', 'svn:mime-type', 'image/png
', outfilename ]; | 73 cmd = [ 'svn', 'propset', '--quiet', 'svn:mime-type', 'image/png
', outfilename ]; |
| 74 subprocess.call(cmd) | 74 subprocess.call(cmd) |
| 75 elif is_git_checkout: | 75 elif is_git_checkout: |
| 76 cmd = [ 'git', 'add', outfilename ] | 76 cmd = [ 'git', 'add', outfilename ] |
| 77 subprocess.call(cmd) | 77 subprocess.call(cmd) |
| OLD | NEW |