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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 suite_paths = utils.GetSuitePaths(join(BASE_DIR, "test")) | 586 suite_paths = utils.GetSuitePaths(join(BASE_DIR, "test")) |
587 | 587 |
588 # Use default tests if no test configuration was provided at the cmd line. | 588 # Use default tests if no test configuration was provided at the cmd line. |
589 if len(args) == 0: | 589 if len(args) == 0: |
590 args = ["default"] | 590 args = ["default"] |
591 | 591 |
592 # Expand arguments with grouped tests. The args should reflect the list of | 592 # Expand arguments with grouped tests. The args should reflect the list of |
593 # suites as otherwise filters would break. | 593 # suites as otherwise filters would break. |
594 def ExpandTestGroups(name): | 594 def ExpandTestGroups(name): |
595 if name in TEST_MAP: | 595 if name in TEST_MAP: |
596 return [suite for suite in TEST_MAP[arg]] | 596 return [suite for suite in TEST_MAP[name]] |
597 else: | 597 else: |
598 return [name] | 598 return [name] |
599 args = reduce(lambda x, y: x + y, | 599 args = reduce(lambda x, y: x + y, |
600 [ExpandTestGroups(arg) for arg in args], | 600 [ExpandTestGroups(arg) for arg in args], |
601 []) | 601 []) |
602 | 602 |
603 args_suites = OrderedDict() # Used as set | 603 args_suites = OrderedDict() # Used as set |
604 for arg in args: | 604 for arg in args: |
605 args_suites[arg.split('/')[0]] = True | 605 args_suites[arg.split('/')[0]] = True |
606 suite_paths = [ s for s in args_suites if s in suite_paths ] | 606 suite_paths = [ s for s in args_suites if s in suite_paths ] |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 if exit_code == 1 and options.json_test_results: | 807 if exit_code == 1 and options.json_test_results: |
808 print("Force exit code 0 after failures. Json test results file generated " | 808 print("Force exit code 0 after failures. Json test results file generated " |
809 "with failure information.") | 809 "with failure information.") |
810 exit_code = 0 | 810 exit_code = 0 |
811 | 811 |
812 return exit_code | 812 return exit_code |
813 | 813 |
814 | 814 |
815 if __name__ == "__main__": | 815 if __name__ == "__main__": |
816 sys.exit(Main()) | 816 sys.exit(Main()) |
OLD | NEW |