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

Re: Test that every revision builds before pushing changes?

From
Daniel Pittman <daniel@rimspace.net>
Date
Mar 27, 2009, 01:30 UTC
Message-ID
<8763hviwgw.fsf@rimspace.net>
In-Reply-To
<49CB4ED8.4060205@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 6 quoted lines
> Daniel Pittman wrote:
>> Andreas Ericsson <ae@op5.se> writes:
>>> Daniel Pittman wrote:
>>>> I would like to ensure that my commits are fully bisectable before I
>>>> commit them to an upstream repository, at least to the limits of an
>>>> automatic tool for testing them.
[...]
Show 9 quoted lines
>>> The manual step comes at merge-time; Someone has to be responsible for
>>> merging all the topics that are to be included in the release branch
>>> and make sure it builds and passes all tests after each merge.
>>
>> Ah.  You have not quite grasped what I was looking for: I was after a
>> tool to help automate that step, rather than a workflow around it.
>
> Oh right. Sorry, I'm stuck in continuous-integration land where people
> tend to want the server to take care of such things.

We have that also; I am primarily motivated by avoiding trivial breakage in the CI server, as well as bisection.

>> For example, the responsible person for that testing could use the
>> hypothetical (until someone tells me where to find it):
>>
>>     git test public..test make test
[...]
Show 15 quoted lines
> Something like this?
> --%<--%<--
> #!/bin/sh
>
> git stash
> revspec="$1"
> shift
> for rev in $(git rev-list "$revspec"); do
> 	git checkout $rev
> 	"$@" || break
> done
> --%<--%<--
>
> Run it as such:
> ./git-test.sh public..test make test

Thank you, that points me in the right direction, and I can obviously season the rest of it to taste — reverse that revision list, for example.

Thank you also to Wincent Colaiuta, who provided a similar script albiet with significantly more detail.

[...]
> It doesn't handle merges very nicely, btw, but I guess this should be
> run prior to merging anyways.

Once I have the framework I can quietly work my way through fixing nasty issues one way or another. Thanks.

Regards,
        Daniel
Previous: Andreas EricssonNext: Jeff King
Message 5 of 7 in “Test that every revision builds before pushing changes?”
  1. Daniel PittmanMar 26, 2009
  2. Andreas EricssonMar 26, 2009
  3. Daniel PittmanMar 26, 2009
  4. Andreas EricssonMar 26, 2009
  5. Daniel PittmanMar 27, 2009
  6. Jeff KingMar 26, 2009
  7. Wincent ColaiutaMar 26, 2009

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.