Execute tests in independent testing roots to enable parallel running
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.
This commit is contained in:
parent
a78871c0bc
commit
41380d7394
@ -26,6 +26,7 @@ m4_define([RPM_DEBUGEDIT_SETUP],[[
|
||||
# Create some test binaries. Create and build them in different subdirs
|
||||
# to make sure they produce different relative/absolute paths.
|
||||
|
||||
export HOME=${PWD}
|
||||
mkdir subdir_foo
|
||||
cp "${abs_srcdir}"/data/SOURCES/foo.c subdir_foo
|
||||
mkdir subdir_bar
|
||||
|
Loading…
Reference in New Issue
Block a user