Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2016 the V8 project authors. All rights reserved. | 2 # Copyright 2016 the V8 project 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 """ | 6 """ |
| 7 V8 correctness fuzzer launcher script. | 7 V8 correctness fuzzer launcher script. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import argparse | 10 import argparse |
| 11 import hashlib | 11 import hashlib |
| 12 import itertools | 12 import itertools |
| 13 import json | 13 import json |
| 14 import os | 14 import os |
| 15 import re | 15 import re |
| 16 import sys | 16 import sys |
| 17 import traceback | 17 import traceback |
| 18 | 18 |
| 19 import v8_commands | 19 import v8_commands |
| 20 import v8_suppressions | 20 import v8_suppressions |
| 21 | 21 |
| 22 CONFIGS = dict( | 22 CONFIGS = dict( |
| 23 default=[], | 23 default=[], |
| 24 validate_asm=['--validate-asm'], # Maybe add , '--disable-asm-warnings' | 24 validate_asm=['--validate-asm'], # Maybe add , '--disable-asm-warnings' |
| 25 fullcode=['--nocrankshaft', '--turbo-filter=~', '--novalidate-asm'], | 25 fullcode=['--nocrankshaft', '--turbo-filter=~', '--novalidate-asm'], |
| 26 noturbo=['--turbo-filter=~', '--noturbo-asm'], | 26 noturbo=['--turbo-filter=~', '--noturbo-asm'], |
| 27 noturbo_opt=['--always-opt', '--turbo-filter=~', '--noturbo-asm'], | 27 noturbo_opt=['--always-opt', '--turbo-filter=~', '--noturbo-asm'], |
| 28 ignition=['--ignition', '--turbo-filter=~', '--hydrogen-filter=~', | |
| 29 '--novalidate-asm'], | |
| 28 ignition_staging=['--ignition-staging'], | 30 ignition_staging=['--ignition-staging'], |
| 29 ignition_turbo=['--ignition-staging', '--turbo'], | 31 ignition_turbo=['--ignition-staging', '--turbo', '--novalidate-asm'], |
| 30 ignition_turbo_opt=['--ignition-staging', '--turbo', '--always-opt'], | 32 ignition_turbo_opt=['--ignition-staging', '--turbo', '--always-opt', |
| 33 '--novalidate-asm'], | |
| 31 ) | 34 ) |
| 32 | 35 |
| 33 # Timeout in seconds for one d8 run. | 36 # Timeout in seconds for one d8 run. |
| 34 TIMEOUT = 3 | 37 TIMEOUT = 3 |
| 35 | 38 |
| 36 # Return codes. | 39 # Return codes. |
| 37 RETURN_PASS = 0 | 40 RETURN_PASS = 0 |
| 38 RETURN_FAIL = 2 | 41 RETURN_FAIL = 2 |
| 39 | 42 |
| 40 BASE_PATH = os.path.dirname(os.path.abspath(__file__)) | 43 BASE_PATH = os.path.dirname(os.path.abspath(__file__)) |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 def parse_args(): | 98 def parse_args(): |
| 96 parser = argparse.ArgumentParser() | 99 parser = argparse.ArgumentParser() |
| 97 parser.add_argument( | 100 parser.add_argument( |
| 98 '--random-seed', type=int, required=True, | 101 '--random-seed', type=int, required=True, |
| 99 help='random seed passed to both runs') | 102 help='random seed passed to both runs') |
| 100 parser.add_argument( | 103 parser.add_argument( |
| 101 '--first-arch', help='first architecture', default='x64') | 104 '--first-arch', help='first architecture', default='x64') |
| 102 parser.add_argument( | 105 parser.add_argument( |
| 103 '--second-arch', help='second architecture', default='x64') | 106 '--second-arch', help='second architecture', default='x64') |
| 104 parser.add_argument( | 107 parser.add_argument( |
| 105 '--first-config', help='first configuration', default='fullcode') | 108 '--first-config', help='first configuration', default='fullcode') |
|
Michael Achenbach
2017/01/18 15:18:25
I'd also like to change this default to ignition,
| |
| 106 parser.add_argument( | 109 parser.add_argument( |
| 107 '--second-config', help='second configuration', default='fullcode') | 110 '--second-config', help='second configuration', default='fullcode') |
| 108 parser.add_argument( | 111 parser.add_argument( |
| 109 '--first-d8', default='d8', | 112 '--first-d8', default='d8', |
| 110 help='optional path to first d8 executable, ' | 113 help='optional path to first d8 executable, ' |
| 111 'default: bundled in the same directory as this script') | 114 'default: bundled in the same directory as this script') |
| 112 parser.add_argument( | 115 parser.add_argument( |
| 113 '--second-d8', | 116 '--second-d8', |
| 114 help='optional path to second d8 executable, default: same as first') | 117 help='optional path to second d8 executable, default: same as first') |
| 115 parser.add_argument('testcase', help='path to test case') | 118 parser.add_argument('testcase', help='path to test case') |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 configs='', source_key='', suppression='wrong_usage') | 293 configs='', source_key='', suppression='wrong_usage') |
| 291 result = RETURN_FAIL | 294 result = RETURN_FAIL |
| 292 except Exception as e: | 295 except Exception as e: |
| 293 print FAILURE_HEADER_TEMPLATE % dict( | 296 print FAILURE_HEADER_TEMPLATE % dict( |
| 294 configs='', source_key='', suppression='internal_error') | 297 configs='', source_key='', suppression='internal_error') |
| 295 print '# Internal error: %s' % e | 298 print '# Internal error: %s' % e |
| 296 traceback.print_exc(file=sys.stdout) | 299 traceback.print_exc(file=sys.stdout) |
| 297 result = RETURN_FAIL | 300 result = RETURN_FAIL |
| 298 | 301 |
| 299 sys.exit(result) | 302 sys.exit(result) |
| OLD | NEW |