| 29 | |
| 30 | |
| 31 | class NumFuzzer(base_runner.BaseTestRunner): |
| 32 | def __init__(self, *args, **kwargs): |
| 33 | super(NumFuzzer, self).__init__(*args, **kwargs) |
| 34 | |
| 35 | @property |
| 36 | def default_framework_name(self): |
| 37 | return 'num_fuzzer' |
| 38 | |
| 39 | def _add_parser_options(self, parser): |
| 40 | parser.add_option("--fuzzer-random-seed", default=0, |
| 41 | help="Default seed for initializing fuzzer random " |
| 42 | "generator") |
| 43 | parser.add_option("--tests-count", default=5, type="int", |
| 44 | help="Number of tests to generate from each base test. " |
| 45 | "Can be combined with --total-timeout-sec with " |
| 46 | "value 0 to provide infinite number of subtests. " |
| 47 | "When --combine-tests is set it indicates how many " |
| 48 | "tests to create in total") |
| 49 | |
| 50 | # Stress gc |
| 51 | parser.add_option( |
| 52 | "--allocation-offset", |
| 53 | default=0, |
| 54 | type="int", |
| 55 | help="probability [0-10] of adding allocation padding " |
| 56 | "to the test") |
| 57 | parser.add_option("--scavenge-chaos", default=0, type="int", |
| 58 | help="probability [0-10] of adding scavenger-chaos " |
| 59 | "flags to the test") |
| 60 | parser.add_option("--stress-marking", default=0, type="int", |
| 61 | help="probability [0-10] of adding --stress-marking " |
| 62 | "flag to the test") |
| 63 | parser.add_option("--stress-scavenge", default=0, type="int", |
| 64 | help="probability [0-10] of adding --stress-scavenge " |
| 65 | "flag to the test") |
| 66 | parser.add_option("--stress-compaction", default=0, type="int", |
| 67 | help="probability [0-10] of adding --stress-compaction " |
| 68 | "flag to the test") |
| 69 | parser.add_option("--stress-gc", default=0, type="int", |
| 70 | help="probability [0-10] of adding --random-gc-interval " |
| 71 | "flag to the test") |
| 72 | |
| 73 | # Stress stack size |
| 74 | parser.add_option("--stress-stack-size", default=0, type="int", |
| 75 | help="probability [0-10] of adding --stack-size " |
| 76 | "flag to the test") |
| 77 | |
| 78 | # Stress tasks |
| 79 | parser.add_option("--stress-delay-tasks", default=0, type="int", |
| 80 | help="probability [0-10] of adding --stress-delay-tasks " |
| 81 | "flag to the test") |
| 82 | parser.add_option("--stress-thread-pool-size", default=0, type="int", |
| 83 | help="probability [0-10] of adding --thread-pool-size " |
| 84 | "flag to the test") |
| 85 | |
| 86 | # Stress compiler |
| 87 | parser.add_option("--stress-deopt", default=0, type="int", |
| 88 | help="probability [0-10] of adding --deopt-every-n-times " |