qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] script: git script to compile every commit in a


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] script: git script to compile every commit in a range of commits
Date: Fri, 07 Jun 2013 11:51:36 -0500
User-agent: Notmuch/0.15.2+77~g661dcf8 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu)

Laszlo Ersek <address@hidden> writes:

> On 06/07/13 16:44, Jeff Cody wrote:
>
>> Thanks.  I can either do the above changes for a v2, or as follow on
>> patches.
>
> Whichever is easier for you, certainly! I'm fine with the script
> going-in as is.

A suggestion I'll make is to split the script into two parts.
git-bisect run is a terribly useful command and I use a bisect script
that looks like this:

    #!/bin/sh

    set -e

    pushd ~/build/qemu
    make -j1 || exit 1
    popd

    # Add right seed here
    if test "$1"; then
        "$@"
    fi

I'm sure we all have bisect scripts like this.

What you're proposing is very similar to bisect but instead of doing a
binary search, it does a linear search starting from the oldest commit.
Basically:

    #!/bin/sh

    refspec="$1"
    shift

    git rev-list $refspec | while read commit; do
        git checkout $commit
        "$@" || exit $?
    done

And indeed, I have a local script called git-foreach to do exactly
this.  I suspect a nicer version would make a very good addition to the
git project.

So to bisect for a make check failure, I do:

  git bisect run bisect.sh make check

Or to bisect for a qemu-test failure:

  git bisect run bisect.sh qemu-test-regress.sh

With git-foreach, you can do:

  git-foreach bisect.sh

To do a simple build test.  Or you can do:

  git-foreach git show checkpatch-head.sh

etc.

Regards,

Anthony Liguori

>
> Cheers,
> Laszlo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]