[Rpm-maint] [rpm-software-management/rpm] Execute tests in independent testing roots to enable parallel running (#1268)

Panu Matilainen notifications at github.com
Thu Jun 11 11:17:59 UTC 2020


Up to now we've run tests in a mish-mash of an environment where bits and pieces of previous tests might exist, and as state has been shared it's been impossible to execute tests in parallel.
    
This makes the pre-populated testing-root read-only to the owner to force all writers to perform an extra setup call to gain a private testing environment. Most of the users needing this already had RPMDB_INIT calls to ensure clean rpmdb state so that's where this is hooked onto.
    
There's a fair bit of gymnastics with the environment to make things match on both sides of fakechroot, some of which can hopefully go away eventually once the dust from this settles. This is also rather heavy as it is, on my laptop serial execution goes down from ~1m15s to ~1m45s, but then parallel execution with -j8 is down to ~50s. There should be a number of optimizations that can be made, such as setting up links for writable directories instead of copying the entire testing-tree around, but leaving that as a future exercise. This is more of an enabler than the goal state.

Note that this does *not* enable test-suite parallel running for `make -jN check`, because `make` does not export the -j argument in a way that we could pass to `./rpmtests` from the makefile. To enable that, one needs to pass a suitable -jN argument through TESTSUITEFLAGS, such as `make -j8 check TESTSUITEFLAGS="-j8"`. Or run invoke `rpmtests` manually.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1268

-- Commit Summary --

  * Always refer to our testing root directory via ${RPMTEST}
  * Merge RPMDB_CLEAR into RPMDB_INIT, they're never used separately
  * Add missing RPMDB_INIT wherever we write something in the tests
  * Run tests sharing built material as groups
  * Use testroot, not host configuration for finding lua init directory
  * Don't assume pre-existing /opt in replace tests
  * Execute tests in independent testing roots to enable parallel running

-- File Changes --

    M tests/Makefile.am (4)
    M tests/atlocal.in (18)
    M tests/debugedit.at (1)
    M tests/local.at (23)
    M tests/rpmbuild.at (169)
    M tests/rpmbuildid.at (82)
    M tests/rpmconfig.at (25)
    M tests/rpmconfig2.at (22)
    M tests/rpmconfig3.at (8)
    M tests/rpmconflict.at (40)
    M tests/rpmdb.at (18)
    M tests/rpmdeps.at (36)
    M tests/rpmi.at (114)
    M tests/rpmio.at (2)
    M tests/rpmmacro.at (7)
    M tests/rpmorder.at (3)
    M tests/rpmpython.at (2)
    M tests/rpmquery.at (35)
    M tests/rpmreplace.at (23)
    M tests/rpmscript.at (5)
    M tests/rpmsigdig.at (18)
    M tests/rpmverify.at (19)
    M tests/rpmvfylevel.at (5)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1268.patch
https://github.com/rpm-software-management/rpm/pull/1268.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1268
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200611/1cc62418/attachment-0001.html>


More information about the Rpm-maint mailing list