| ... |
... |
@@ -1619,14 +1619,28 @@ async def test_common_work(name: TestName, opts, |
|
1619
|
1619
|
# Which ways we are asked to skip
|
|
1620
|
1620
|
do_ways = list(filter (ok_way,all_ways))
|
|
1621
|
1621
|
|
|
1622
|
|
- # Only run all ways in slow mode.
|
|
1623
|
|
- # See Note [validate and testsuite speed] in `validate`
|
|
1624
|
1622
|
if config.accept:
|
|
1625
|
|
- # Only ever run one way
|
|
1626
|
|
- do_ways = do_ways[:1]
|
|
|
1623
|
+ # For --accept, run the normal way and in each way that has a
|
|
|
1624
|
+ # way-specific expected output file (e.g. T20696.stderr-ext-interp).
|
|
|
1625
|
+ def has_way_specific_output(way: WayName) -> bool:
|
|
|
1626
|
+ for ext in ['stdout', 'stderr']:
|
|
|
1627
|
+ path = in_srcdir(name + '.' + ext + '-' + way)
|
|
|
1628
|
+ if path.exists():
|
|
|
1629
|
+ return True
|
|
|
1630
|
+ return False
|
|
|
1631
|
+ way_specific_ways = list(filter(has_way_specific_output, do_ways))
|
|
|
1632
|
+ do_ways = do_ways[:1] + [w for w in way_specific_ways if w not in do_ways[:1]]
|
|
|
1633
|
+
|
|
|
1634
|
+ # If speed=SLOW, we run all ways.
|
|
|
1635
|
+ # If speed=NORMAL or FAST and at least one command-line way is given,
|
|
|
1636
|
+ # we run all the command-line ways.
|
|
|
1637
|
+ elif config.cmdline_ways:
|
|
|
1638
|
+ pass
|
|
|
1639
|
+
|
|
|
1640
|
+ # Otherwise, we trim it down to:
|
|
|
1641
|
+ # - a single default way (typically 'normal')
|
|
|
1642
|
+ # - and, additionally, the test's extra ways.
|
|
1627
|
1643
|
elif config.speed > 0:
|
|
1628
|
|
- # However, if we EXPLICITLY asked for a way (with extra_ways)
|
|
1629
|
|
- # please test it!
|
|
1630
|
1644
|
explicit_ways = list(filter(lambda way: way in opts.extra_ways, do_ways))
|
|
1631
|
1645
|
other_ways = list(filter(lambda way: way not in opts.extra_ways, do_ways))
|
|
1632
|
1646
|
do_ways = other_ways[:1] + explicit_ways
|