Patchwork [3,of,3] tests: test-gendoc.t checks if anything was translated

login
register
mail settings
Submitter Simon Heimberg
Date Oct. 18, 2013, 5:15 p.m.
Message ID <6941a446df1642f545df.1382116547@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/2790/
State Accepted
Commit 52bc80d0769fcc4db3c414266c84cce257580f5b
Headers show

Comments

Simon Heimberg - Oct. 18, 2013, 5:15 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1382115412 -7200
# Node ID 6941a446df1642f545dfd7bb7f68351dcd3a078c
# Parent  7b40ee1c254521033cf7e68b5eccde6046848323
tests: test-gendoc.t checks if anything was translated

This would triggered when the variable would be set wrong again.
Matt Mackall - Oct. 20, 2013, 12:46 a.m.
On Fri, 2013-10-18 at 19:15 +0200, Simon Heimberg wrote:
> # HG changeset patch
> # User Simon Heimberg <simohe@besonet.ch>
> # Date 1382115412 -7200
> # Node ID 6941a446df1642f545dfd7bb7f68351dcd3a078c
> # Parent  7b40ee1c254521033cf7e68b5eccde6046848323
> tests: test-gendoc.t checks if anything was translated
> 
> This would triggered when the variable would be set wrong again.

These are queued, thanks.
Simon Heimberg - Oct. 21, 2013, 1:07 p.m.
My change [1] has broken test-gendoc.t in some builds. The languages ja and 
ru seem to contain some syntax errors still [2].
I do not see any rule for passing and failing. The same builder passes or 
fails for builds with different python versions (or --pure) [3]. The python 
version 2.6 passed on linux (hg tests) and failed on OS X (OS X 10.8 hg 
tests). On my computer the test has passed (probably python 2.7, will check 
later). On some builders, pure passes, on some it does not. I do not see 
what python version the pure tests are running.
Some guesses: Maybe the test is skipped on some builds. Maybe docutils has 
changed.

I will try to fix this later.


[1] change: http://hg.intevation.org/mercurial/rev/52bc80d0769f
[2] example output of broken build: 
http://hgbuildbot.kublai.com/builders/hg%20tests%20%28stable%29/builds/19/steps/pure/logs/stdio
[3] builders with broken builds:
 * hg tests (http://hgbuildbot.kublai.com/builders/hg%20tests/builds/39/)
   failed:
   * pure(ver=?) 
http://hgbuildbot.kublai.com/builders/hg%20tests/builds/39/steps/pure/logs/warnings%20%281%29
   passed:
   * python2.4, python2.5 and python2.6

 * hg tests stable 
(http://hgbuildbot.kublai.com/builders/hg%20tests%20%28stable%29/builds/19/)
   failed:
   * pure(ver=?) 
http://hgbuildbot.kublai.com/builders/hg%20tests%20%28stable%29/builds/19/steps/pure/logs/warnings%20%281%29
   passed:
   * python2.4, python2.5, python2.6

 * OS X 10.8 hg tests 
(http://hgbuildbot.kublai.com/builders/OS%20X%2010.8%20hg%20tests/builds/35/)

   failed:
   * python2.6 
http://hgbuildbot.kublai.com/builders/OS%20X%2010.8%20hg%20tests/builds/35/steps/run-tests.py%20%28python2.6%29/logs/warnings%20%282%29
   passed:
   * python2.7, pure(version=?)

 * vfat hg tests 
(http://hgbuildbot.kublai.com/builders/vfat%20hg%20tests/builds/36/)
   * 
http://hgbuildbot.kublai.com/builders/vfat%20hg%20tests/builds/36/steps/vfat/logs/warnings%20%281%29
 * vfat hg tests stable 
(http://hgbuildbot.kublai.com/builders/vfat%20hg%20tests%20%28stable%29/builds/16/)
   * 
http://hgbuildbot.kublai.com/builders/vfat%20hg%20tests%20%28stable%29/builds/16/steps/vfat/logs/warnings%20%281%29


--On Saturday, 19. October 2013 17:46 -0700 Matt Mackall <mpm@selenic.com> 
wrote:

> On Fri, 2013-10-18 at 19:15 +0200, Simon Heimberg wrote:
>> # HG changeset patch
>> # User Simon Heimberg <simohe@besonet.ch>
>> # Date 1382115412 -7200
>> # Node ID 6941a446df1642f545dfd7bb7f68351dcd3a078c
>> # Parent  7b40ee1c254521033cf7e68b5eccde6046848323
>> tests: test-gendoc.t checks if anything was translated
>>
>> This would triggered when the variable would be set wrong again.
>
> These are queued, thanks.
>
> --
> Mathematics is the supreme nostalgia of our time.
Matt Mackall - Oct. 22, 2013, 7:52 p.m.
On Mon, 2013-10-21 at 15:07 +0200, Simon Heimberg wrote:
> My change [1] has broken test-gendoc.t in some builds. The languages ja and 
> ru seem to contain some syntax errors still [2].
> I do not see any rule for passing and failing. The same builder passes or 
> fails for builds with different python versions (or --pure) [3]. The python 
> version 2.6 passed on linux (hg tests) and failed on OS X (OS X 10.8 hg 
> tests). On my computer the test has passed (probably python 2.7, will check 
> later). On some builders, pure passes, on some it does not. I do not see 
> what python version the pure tests are running.
> Some guesses: Maybe the test is skipped on some builds. Maybe docutils has 
> changed.

Docutils has indeed changed, and we almost certainly have multiple
versions of docutils running on the buildbots. This is probably a good
thing, since it's catching weird issues like this.

I think the right fix is to:

a) fix minirst so it accepts a blank line after ".. note:"
b) enforce using a blank line via check-code

(b) might be a bit challenging at the moment, as check-code masks
doc-strings.

Patch

diff -r 7b40ee1c2545 -r 6941a446df16 tests/test-gendoc.t
--- a/tests/test-gendoc.t	Fre Okt 18 18:49:45 2013 +0200
+++ b/tests/test-gendoc.t	Fre Okt 18 18:56:52 2013 +0200
@@ -11,6 +11,10 @@ 
   >     echo "" >> gendoc-$LOCALE.txt
   >     LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
   > 
+  >     if [ $LOCALE != C ]; then
+  >         cmp -s gendoc-C.txt gendoc-$LOCALE.txt && echo '** NOTHING TRANSLATED **'
+  >     fi
+  > 
   >     # We call runrst without adding "--halt warning" to make it report
   >     # all errors instead of stopping on the first one.
   >     echo "checking for parse errors"