git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v1 3/3] travis-ci: run Git bisect on failed tests

From
Christian Couder <christian.couder@gmail.com>
Date
May 22, 2016, 15:35 UTC
Message-ID
<CAP8UFD3TJ7mJEu2xCXhrspHY1v02uTonUGdszZbcQGf9ne9_Cg@mail.gmail.com>
In-Reply-To
<1463914856-64745-4-git-send-email-larsxschneider@gmail.com>
On Sun, May 22, 2016 at 1:00 PM,  <larsxschneider@gmail.com> wrote:
[...]
Show 22 quoted lines
> +#
> +# Run Git bisect
> +#
> +run_bisect () {
> +       TEST_SCRIPT=$1
> +       BAD_REV=$2
> +       GOOD_RV=$3
> +       TMPDIR=$(mktemp -d -t "ci-report-bisect-XXXXXX" 2>/dev/null)
> +       cat > "$TMPDIR/bisect-run.sh" <<EOF
> +
> +EOF
> +       chmod +x "$TMPDIR/bisect-run.sh"
> +       git bisect start $BAD_REV $GOOD_RV
> +       git bisect run "$TMPDIR/bisect-run.sh"
> +       if test -e ./t/$TEST_SCRIPT.sh && make --jobs=2 >/dev/null 2>&1
> +       then
> +               cd t && ./$TEST_SCRIPT.sh >/dev/null 2>&1
> +       else
> +               # If the test file does not exist or the build fails then tell
> +               # Git bisect to skip the commit.
> +               exit 125
> +       fi

Shouldn't all the above "if ... fi" be in the here document creating "$TMPDIR/bisect-run.sh"?

> +       git bisect reset >/dev/null 2>&1
> +}
Previous: larsxschneider@gmail.comNext: Lars Schneider
Message 6 of 10 in “travis-ci: run Git bisect on failed tests”
  1. 0/3 travis-ci: run Git bisect on failed testslarsxschneider@gmail.com, May 22, 2016
  2. 1/3 travis-ci: move "after_failure" code to dedicated file in /cilarsxschneider@gmail.com, May 22, 2016
  3. 2/3 travis-ci: disable verbose test outputlarsxschneider@gmail.com, May 22, 2016
  4. Jeff KingMay 26, 2016
  5. 3/3 travis-ci: run Git bisect on failed testslarsxschneider@gmail.com, May 22, 2016
  6. Christian CouderMay 22, 2016
  7. Lars SchneiderMay 22, 2016
  8. Pranit BauvaMay 22, 2016
  9. Lars SchneiderMay 23, 2016
  10. Junio C HamanoMay 23, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.