All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	David Hildenbrand <david@redhat.com>
Subject: Re: [kvm-unit-test PATCH 5/5] travis.yml: Expect that at least one test succeeds
Date: Wed, 13 Nov 2019 16:17:51 +0100	[thread overview]
Message-ID: <417bee9b-578b-5b3c-25a6-9998020ba514@redhat.com> (raw)
In-Reply-To: <87mucz7r3s.fsf@linaro.org>

On 13/11/2019 16.06, Alex Bennée wrote:
> 
> Thomas Huth <thuth@redhat.com> writes:
> 
>> While working on the travis.yml file, I've run into cases where
>> all tests are reported as "SKIP" by the run_test.sh script (e.g.
>> when QEMU could not be started). This should not result in a
>> successful test run, so mark it as failed if not at least one
>> test passed.
> 
> But doesn't this mean you could have everything fail except one pass and
> still report success?

The FAILs are already handled one line earlier...

>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  .travis.yml | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/.travis.yml b/.travis.yml
>> index 9ceb04d..aacf7d2 100644
>> --- a/.travis.yml
>> +++ b/.travis.yml
>> @@ -115,3 +115,4 @@ script:
>>    - make -j3
>>    - ACCEL="${ACCEL:-tcg}" ./run_tests.sh -v $TESTS | tee results.txt
>>    - if grep -q FAIL results.txt ; then exit 1 ; fi

... here -----------^

>> +  - if ! grep -q PASS results.txt ; then exit 1 ; fi

Maybe it would also be nicer to provide proper exit values in the
run_tests.sh script, but the logic there gives me a bad headache...
grep'ing for FAIL and PASS in the yml script is way more easy.

 Thomas


  reply	other threads:[~2019-11-13 15:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 11:26 [kvm-unit-test PATCH 0/5] Improvements for the Travis CI Thomas Huth
2019-11-13 11:26 ` [kvm-unit-test PATCH 1/5] travis.yml: Re-arrange the test matrix Thomas Huth
2019-11-13 12:54   ` Alex Bennée
2019-11-13 11:26 ` [kvm-unit-test PATCH 2/5] travis.yml: Install only the required packages for each entry in the matrix Thomas Huth
2019-11-13 12:54   ` Alex Bennée
2019-11-13 11:26 ` [kvm-unit-test PATCH 3/5] travis.yml: Test with KVM instead of TCG (on x86) Thomas Huth
2019-11-13 13:49   ` Alex Bennée
2019-11-13 16:07     ` Thomas Huth
2019-11-13 17:48       ` [kvm-unit-tests PATCH v2] " Thomas Huth
2019-11-13 11:26 ` [kvm-unit-test PATCH 4/5] travis.yml: Test the i386 build, too Thomas Huth
2019-11-13 15:05   ` Alex Bennée
2019-11-13 11:26 ` [kvm-unit-test PATCH 5/5] travis.yml: Expect that at least one test succeeds Thomas Huth
2019-11-13 15:06   ` Alex Bennée
2019-11-13 15:17     ` Thomas Huth [this message]
2019-11-13 16:03       ` Alex Bennée
2019-11-13 14:50 ` [kvm-unit-test PATCH 0/5] Improvements for the Travis CI Paolo Bonzini
2019-11-14 12:29 ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=417bee9b-578b-5b3c-25a6-9998020ba514@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=david@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.