Merge lp:~vila/bzr/626667-check-no-docs-swallow-errors into lp:bzr

Proposed by Vincent Ladeuil on 2010-08-30
Status: Merged
Approved by: John A Meinel on 2010-08-30
Approved revision: 5397
Merged at revision: 5398
Proposed branch: lp:~vila/bzr/626667-check-no-docs-swallow-errors
Merge into: lp:bzr
Diff against target: 30 lines (+8/-0)
2 files modified
Makefile (+5/-0)
NEWS (+3/-0)
To merge this branch: bzr merge lp:~vila/bzr/626667-check-no-docs-swallow-errors
Reviewer Review Type Date Requested Status
John A Meinel 2010-08-30 Approve on 2010-08-30
Review via email: mp+34059@code.launchpad.net

Commit Message

prevent 'make check' from succeeding when no tests are run

Description of the Change

This fix a amazingly long standing bug (recently found though #626667)
in our Makefile that could lead pqm to accept bogus submissions.

Namely, errors in 'make check' were swallowed.

I went for a pretty conservative fix that requires that selftest produces
a non-empty result.

To post a comment you must log in.
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/30/2010 5:18 AM, Vincent Ladeuil wrote:
> Vincent Ladeuil has proposed merging lp:~vila/bzr/626667-check-no-docs-swallow-errors into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> This fix a amazingly long standing bug (recently found though #626667)
> in our Makefile that could lead pqm to accept bogus submissions.
>
> Namely, errors in 'make check' were swallowed.
>
> I went for a pretty conservative fix that requires that selftest produces
> a non-empty result.

Can we just to 'set -e' and have any non-zero exit code stop the script?

Otherwise:
  merge: approve

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx7vZgACgkQJdeBCYSNAAOq/gCfXYf9QbceQEgR3Csw84FXfy35
wPYAoJVt0y76sh49I7fkaS9aNmr2HyF3
=61gT
-----END PGP SIGNATURE-----

review: Approve
John A Meinel (jameinel) wrote :

sent to pqm by email

Martin Pool (mbp) wrote :

It's a bit strange and dangerous that pqm needs us to save a file,
even though it also consumes the output itself, but this is probably
the sensible fix anyhow.

John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/30/2010 9:31 PM, Martin Pool wrote:
> It's a bit strange and dangerous that pqm needs us to save a file,
> even though it also consumes the output itself, but this is probably
> the sensible fix anyhow.

right, it sends the stdout back to the user (if the command fails) but
we need to run something to analyze that output to determine if there
were any failures.

Arguably we should just have a pipe filter that would do this, but that
would require writing it :).

I believe it might be a way to get better filtered output (stripping the
log from all the 'successful' tests.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx8e2kACgkQJdeBCYSNAAOB0QCgwIHZFnS+VgG0VVgjux0k6U8/
NeQAnA/gZTgrf0gmos6qc9XplzrJV2l5
=79do
-----END PGP SIGNATURE-----

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2010-04-06 06:59:03 +0000
3+++ Makefile 2010-08-30 10:18:42 +0000
4@@ -40,7 +40,12 @@
5
6 check-nodocs: extensions
7 # Generate a stream for PQM to watch.
8+ -$(RM) selftest.log
9 $(PYTHON) -Werror -O ./bzr selftest --subunit $(tests) | tee selftest.log
10+ # An empty log file should catch errors in the $(PYTHON)
11+ # command above (the '|' swallow any errors since 'make'
12+ # sees the 'tee' exit code for the whole line
13+ if [ ! -s selftest.log ] ; then exit 1 ; fi
14 # Check that there were no errors reported.
15 subunit-stats < selftest.log
16
17
18=== modified file 'NEWS'
19--- NEWS 2010-08-30 07:47:38 +0000
20+++ NEWS 2010-08-30 10:18:42 +0000
21@@ -128,6 +128,9 @@
22 * `PathNotChild` should not give a traceback.
23 (Martin Pool, #98735)
24
25+* ``PQM`` will no longer ignore syntax errors in submissions.
26+ (Vincent Ladeuil, #626667)
27+
28 * Prevent ``CHKMap.apply_delta`` from generating non-canonical CHK maps,
29 which can result in "missing referenced chk root keys" errors when
30 fetching from repositories with affected revisions.