Commit 36b9d633 authored by Jérome Perrin's avatar Jérome Perrin Committed by Rafael Monnerat

Fix random test failure with make flags on test node

When running under testnode, there was sometimes this failure:

```
File "/srv/slapgrid/slappart8/srv/testnode/bee/inst/test0-0/parts/slapos.recipe.cmmi/slapos/recipe/cmmi/README.txt", line 521, in README.txt
Failed example:
    print(system(buildout))
Expected:
    Uninstalling package.
    Installing package.
    package: [ENV] CFLAGS = -I/sw/include
    package: [ENV] LDFLAGS = -L/sw/lib -L/some/extra/lib
    package: [ENV] TMP = /sample_buildout/parts/package/tmp
    package: Applying patches
    patching file configure
    patching file Makefile.dist
    patched-configure --prefix=/somewhere/else --with-threads --without-foobar
    building patched package
    installing patched package
    installing patched package-lib
    <BLANKLINE>
Got:
    Uninstalling package.
    Installing package.
    package: [ENV] CFLAGS = -I/sw/include
    package: [ENV] LDFLAGS = -L/sw/lib -L/some/extra/lib
    package: [ENV] TMP = /sample_buildout/parts/package/tmp
    package: Applying patches
    patching file configure
    patching file Makefile.dist
    patched-configure --prefix=/somewhere/else --with-threads --without-foobar
    building patched package
    installing patched package-lib
    installing patched package
    <BLANKLINE>
```

The order of in which `installing patched package-lib` and ` installing patched package` are printed is not always same.

This test does `make install install-lib` with a Makefile containing:

```
all:
        @echo building package

install:
        @echo installing package

install-lib:
        @echo installing package-lib
```

@vpelletier  and I investigated this and he pointed out that order of parts depends is not stable when make is invoked with `-j` option.

Turned out that [on test node](https://nexedi.erp5.net/test_result_module/20180308-55459479/7) `MAKEFLAGS` is  set to `-j12`.


/reviewed-on !5
parent 0b91fa69
......@@ -23,6 +23,7 @@ optionflags = (doctest.ELLIPSIS |
def setUp(test):
os.environ.pop('MAKEFLAGS')
zc.buildout.testing.buildoutSetUp(test)
zc.buildout.testing.install('slapos.recipe.build', test)
zc.buildout.testing.install_develop('slapos.recipe.cmmi', test)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment