OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2012 the V8 project authors. All rights reserved. | 3 # Copyright 2012 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 | 1364 |
1365 | 1365 |
1366 def GetSpecialCommandProcessor(value): | 1366 def GetSpecialCommandProcessor(value): |
1367 if (not value) or (value.find('@') == -1): | 1367 if (not value) or (value.find('@') == -1): |
1368 def ExpandCommand(args): | 1368 def ExpandCommand(args): |
1369 return args | 1369 return args |
1370 return ExpandCommand | 1370 return ExpandCommand |
1371 else: | 1371 else: |
1372 pos = value.find('@') | 1372 pos = value.find('@') |
1373 import urllib | 1373 import urllib |
1374 prefix = urllib.unquote(value[:pos]).split() | 1374 import shlex |
1375 suffix = urllib.unquote(value[pos+1:]).split() | 1375 prefix = shlex.split(urllib.unquote(value[:pos])) |
| 1376 suffix = shlex.split(urllib.unquote(value[pos+1:])) |
1376 def ExpandCommand(args): | 1377 def ExpandCommand(args): |
1377 return prefix + args + suffix | 1378 return prefix + args + suffix |
1378 return ExpandCommand | 1379 return ExpandCommand |
1379 | 1380 |
1380 | 1381 |
1381 BUILT_IN_TESTS = ['mjsunit', 'cctest', 'message', 'preparser'] | 1382 BUILT_IN_TESTS = ['mjsunit', 'cctest', 'message', 'preparser'] |
1382 | 1383 |
1383 | 1384 |
1384 def GetSuites(test_root): | 1385 def GetSuites(test_root): |
1385 def IsSuite(path): | 1386 def IsSuite(path): |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1547 for entry in timed_tests[:20]: | 1548 for entry in timed_tests[:20]: |
1548 t = FormatTime(entry.duration) | 1549 t = FormatTime(entry.duration) |
1549 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) | 1550 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) |
1550 index += 1 | 1551 index += 1 |
1551 | 1552 |
1552 return result | 1553 return result |
1553 | 1554 |
1554 | 1555 |
1555 if __name__ == '__main__': | 1556 if __name__ == '__main__': |
1556 sys.exit(Main()) | 1557 sys.exit(Main()) |
OLD | NEW |