@@ -1772,25 +1772,44 @@ def path(name):
17721772 crash : f'### { crash } worker non-zero exit code' ,
17731773 }
17741774
1775- # Only failures of the last run are annotated: with --rerun and -W,
1776- # failures of the first run are reported, but not annotated
1777- for args in (['-j2' , '-W' ], ['-j2' , '--rerun' ],
1778- ['-j2' , '-W' , '--rerun' ], ['-j0' , '-W' ]):
1779- tests = list (test_files )
1780- if '-j0' in args :
1781- # A crash kills the main process
1782- tests .remove (crash )
1783- with self .subTest (args = args ):
1775+ # Representative command lines of the CI jobs
1776+ command_lines = {
1777+ # "make ci", Windows, macOS, installed Python; the JIT jobs use
1778+ # the equivalent "-j0 --verbose2 --verbose3". Only failures of
1779+ # the re-run are annotated, not the reported first failures.
1780+ 'fast-ci' : ['--fast-ci' , '-j2' ],
1781+ # Sanitizers and Hypothesis: env changed is not a failure
1782+ 'parallel' : ['-j2' , '-W' ],
1783+ # iOS and WASI run tests in the main process: a crash kills it
1784+ 'single-process' : ['--fast-ci' , '--single-process' ],
1785+ # Profile task of PGO and BOLT builds: no annotations
1786+ 'pgo' : ['--pgo' ],
1787+ }
1788+ for name , args in command_lines .items ():
1789+ with self .subTest (name ):
1790+ tests = list (test_files )
1791+ if '--single-process' in args or '--pgo' in args :
1792+ tests .remove (crash )
17841793 output , summary = self .run_tests_github (
1785- '--fail-env-changed' , * args , * tests ,
1786- exitcode = EXITCODE_BAD_TEST )
1787-
1788- self .assertCountEqual (
1789- self .parse_github_annotations (output ),
1790- [* test_cases ,
1791- * ((name , path (name ), None )
1792- for name in (env_changed , crash ) if name in tests )],
1793- output )
1794+ * args , * tests , exitcode = EXITCODE_BAD_TEST )
1795+
1796+ annotations = []
1797+ if '--pgo' not in args :
1798+ annotations += test_cases
1799+ if '--fast-ci' in args :
1800+ annotations .append ((env_changed , path (env_changed ),
1801+ None ))
1802+ if crash in tests :
1803+ annotations .append ((crash , path (crash ), None ))
1804+ self .assertCountEqual (self .parse_github_annotations (output ),
1805+ annotations , output )
1806+ # Each test case is annotated right after its failure report
1807+ for title , _ , _ in annotations [:len (test_cases )]:
1808+ title = re .escape (title )
1809+ self .assertRegex (
1810+ output ,
1811+ rf'(?m)^(?:ERROR|FAIL): { title } \n'
1812+ rf'(?:(?!={{70}}$).*\n)*?::error .*title={ title } ::' )
17941813
17951814 # The job summary lists the failed tests in completion order
17961815 summary_lines = summary .splitlines ()
0 commit comments