Hey Hoss, this is failing precommit because there’s still a nocommit comment:
> failures[testcase] += 1 > break > + # have to play nice with 'ant clean' ... nocommit: test this > + newDirPath = os.path.join('repro-reports', newSubDir, dir) > + os.makedirs(newDirPath, exist_ok=True) > On 21 Nov 2019, at 22:28, hoss...@apache.org wrote: > > This is an automated email from the ASF dual-hosted git repository. > > hossman pushed a commit to branch master > in repository https://gitbox.apache.org/repos/asf/lucene-solr.git > > > The following commit(s) were added to refs/heads/master by this push: > new 2d1e67c LUCENE-9054: Fix reproduceJenkinsFailures.py to not overwrite > junit XML files when retrying > 2d1e67c is described below > > commit 2d1e67c8b4adff3e1cb092fa69552529459d34d3 > Author: Chris Hostetter <hoss...@apache.org> > AuthorDate: Thu Nov 21 15:28:46 2019 -0700 > > LUCENE-9054: Fix reproduceJenkinsFailures.py to not overwrite junit XML > files when retrying > --- > dev-tools/scripts/reproduceJenkinsFailures.py | 25 ++++++++++++++++++++----- > lucene/CHANGES.txt | 2 ++ > 2 files changed, 22 insertions(+), 5 deletions(-) > > diff --git a/dev-tools/scripts/reproduceJenkinsFailures.py > b/dev-tools/scripts/reproduceJenkinsFailures.py > index 037c62a..2cb86dd 100644 > --- a/dev-tools/scripts/reproduceJenkinsFailures.py > +++ b/dev-tools/scripts/reproduceJenkinsFailures.py > @@ -17,6 +17,7 @@ import argparse > import http.client > import os > import re > +import shutil > import subprocess > import sys > import time > @@ -211,7 +212,7 @@ def runTests(testIters, modules, tests): > finally: > os.chdir(cwd) > > -def printReport(testIters, location): > +def printAndMoveReports(testIters, newSubDir, location): > failures = {} > for start in ('lucene/build', 'solr/build'): > for (dir, _, files) in os.walk(start): > @@ -221,12 +222,17 @@ def printReport(testIters, location): > testcase = testOutputFileMatch.group(1) > if testcase not in failures: > failures[testcase] = 0 > - with open(os.path.join(dir, file), encoding='UTF-8') as > testOutputFile: > + filePath = os.path.join(dir, file) > + with open(filePath, encoding='UTF-8') as testOutputFile: > for line in testOutputFile: > errorFailureMatch = reErrorFailure.search(line) > if errorFailureMatch is not None: > failures[testcase] += 1 > break > + # have to play nice with 'ant clean' ... nocommit: test this > + newDirPath = os.path.join('repro-reports', newSubDir, dir) > + os.makedirs(newDirPath, exist_ok=True) > + os.rename(filePath, os.path.join(newDirPath, file)) > print("[repro] Failures%s:" % location) > for testcase in sorted(failures, key=lambda t: (failures[t],t)): # sort by > failure count, then by testcase > print("[repro] %d/%d failed: %s" % (failures[testcase], testIters, > testcase)) > @@ -246,10 +252,17 @@ def main(): > localGitBranch = getLocalGitBranch() > > try: > + # have to play nice with ant clean, so printAndMoveReports will move all > the junit XML files here... > + print('[repro] JUnit rest result XML files will be moved to: > ./repro-reports') > + if os.path.isdir('repro-reports'): > + print('[repro] Deleting old ./repro-reports'); > + shutil.rmtree('repro-reports') > prepareWorkspace(config.useGit, revisionFromLog) > modules = groupTestsByModule(tests) > runTests(config.testIters, modules, tests) > - failures = printReport(config.testIters, '') > + failures = printAndMoveReports(config.testIters, 'orig', > + ' w/original seeds' + (' at %s' % > revisionFromLog if config.useGit else '')) > + > > if config.useGit: > # Retest 100% failures at the tip of the branch > @@ -264,7 +277,8 @@ def main(): > prepareWorkspace(True, branchFromLog) > modules = groupTestsByModule(tests) > runTests(config.testIters, modules, tests) > - failures = printReport(config.testIters, ' at the tip of %s' % > branchFromLog) > + failures = printAndMoveReports(config.testIters, 'branch-tip', > + ' original seeds at the tip of %s' % > branchFromLog) > > # Retest 100% tip-of-branch failures without a seed > oldTests = tests > @@ -278,7 +292,8 @@ def main(): > prepareWorkspace(False, branchFromLog) > modules = groupTestsByModule(tests) > runTests(config.testIters, modules, tests) > - printReport(config.testIters, ' at the tip of %s without a seed' % > branchFromLog) > + printAndMoveReports(config.testIters, 'branch-tip-no-seed', > + ' at the tip of %s without a seed' % > branchFromLog) > except Exception as e: > print('[repro] %s' % traceback.format_exc()) > sys.exit(1) > diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt > index 740d3a1..2879aaa 100644 > --- a/lucene/CHANGES.txt > +++ b/lucene/CHANGES.txt > @@ -122,6 +122,8 @@ Bug Fixes > * LUCENE-9030: Fix WordnetSynonymParser behaviour so it behaves similar to > SolrSynonymParser. (Christoph Buescher via Alan Woodward) > > +* LUCENE-9054: Fix reproduceJenkinsFailures.py to not overwrite junit XML > files when retrying (hossman) > + > Other > > * LUCENE-8979: Code Cleanup: Use entryset for map iteration wherever > possible. - Part 2 (Koen De Groote) > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org