[ 
https://issues.apache.org/jira/browse/LUCENE-8106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16368370#comment-16368370
 ] 

Steve Rowe edited comment on LUCENE-8106 at 2/20/18 1:22 AM:
-------------------------------------------------------------

{quote}
bq. I'd include the repro stuff into the main build job somehow!
I'll try making it a build step (instead of a post-build action).
{quote}
 
I added the following as an "Execute shell" build step to the 
{{Lucene-Solr-master-Linux}} project - we'll see how it goes:

{noformat}
set -x # Log commands

TMPFILE=`mktemp`
trap "rm -f $TMPFILE" EXIT   # Delete the temp file on SIGEXIT

curl -o $TMPFILE 
https://jenkins.thetaphi.de/job/$JOB_NAME/$BUILD_NUMBER/consoleText

if grep --quiet 'reproduce with' $TMPFILE ; then

    # Preserve original build output
    mv lucene/build lucene/build.orig
    mv solr/build solr/build.orig

    PYTHON32_EXE=`grep "^[[:space:]]*python32\.exe[[:space:]]*=" 
~/lucene.build.properties | cut -d'=' -f2`
    GIT_EXE=`grep "^[[:space:]]*git\.exe[[:space:]]*=" 
~/lucene.build.properties | cut -d'=' -f2`
    PATH=$GIT_EXE:$PATH $PYTHON32_EXE -u 
dev-tools/scripts/reproduceJenkinsFailures.py --no-fetch file://$TMPFILE

    # Preserve repro build output
    mv lucene/build lucene/build.repro
    mv solr/build solr/build.repro

    # Restore original build output
    mv lucene/build.orig lucene/build
    mv solr/build.orig solr/build
fi
{noformat}


was (Author: steve_rowe):
{quote}
bq. I'd include the repro stuff into the main build job somehow!
I'll try making it a build step (instead of a post-build action).
{quote}
 
I added the following as an "Execute shell" build step to the 
{{Lucene-Solr-master-Linux}} project - we'll see how it goes:

{noformat}
set -x # Log commands

if grep --quiet 'reproduce with' ../builds/$BUILD_NUMBER/log ; then

    # Preserve original build output
    mv lucene/build lucene/build.orig
    mv solr/build solr/build.orig

    PYTHON32_EXE=`grep "^[[:space:]]*python32\.exe[[:space:]]*=" 
~/lucene.build.properties | cut -d'=' -f2`
    GIT_EXE=`grep "^[[:space:]]*git\.exe[[:space:]]*=" 
~/lucene.build.properties | cut -d'=' -f2`
    cd ..
    PARENT_DIR=`pwd`
    cd workspace
    PATH=$GIT_EXE:$PATH $PYTHON32_EXE -u 
dev-tools/scripts/reproduceJenkinsFailures.py --no-fetch 
file://$PARENT_DIR/builds/$BUILD_NUMBER/log

    # Preserve repro build output
    mv lucene/build lucene/build.repro
    mv solr/build solr/build.repro

    # Restore original build output
    mv lucene/build.orig lucene/build
    mv solr/build.orig solr/build
fi
{noformat}

> Add script to attempt to reproduce failing tests from a Jenkins log
> -------------------------------------------------------------------
>
>                 Key: LUCENE-8106
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8106
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>            Priority: Major
>             Fix For: master (8.0), 7.3
>
>         Attachments: LUCENE-8106-part2.patch, LUCENE-8106.patch, 
> LUCENE-8106.patch
>
>
> This script will be runnable from a downstream job triggered by an upstream 
> failing Jenkins job, passing log location info between the two.
> The script will also be runnable manually from a developer's cmdline.
> From the script help:
> {noformat}
> Usage:
>      python3 -u reproduceJenkinsFailures.py URL
> Must be run from a Lucene/Solr git workspace. Downloads the Jenkins
> log pointed to by the given URL, parses it for Git revision and failed
> Lucene/Solr tests, checks out the Git revision in the local workspace,
> groups the failed tests by module, then runs
> 'ant test -Dtest.dups=5 -Dtests.class="*.test1[|*.test2[...]]" ...'
> in each module of interest, failing at the end if any of the runs fails.
> To control the maximum number of concurrent JVMs used for each module's
> test run, set 'tests.jvms', e.g. in ~/lucene.build.properties
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to