-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Currently, the new /per-rule
- always reinstalls a clean VM before running the tests,
- always
rsync
s everything into it, - etc.
and is not really optimized for a use case of a CaC/content developer incrementally making changes to unit tests & quickly testing them via the /from-env
test variant.
To improve this, a few things can be changed:
-
Implement
CONTEST_REBUILD_CONTENT
, a Contest-wide override forutil.build_content()
that would behave as if the function was called withrebuild=True
. This is useful when a developer incrementallyrsync
s small changes to aCONTEST_CONTENT
location on the remote machine, without clearing thebuild/
directory. Forcing a rebuild incorporates the small source file changes. -
Implement some VM-snapshot-removal function in
lib.virt
that would remove the external snapshot and clear any other snapshot-ish files in/var/lib/libvirt/images
, and have the/per-rule
test do something like:if not prepared for snapshot (never installed): g.install(...) else: g.unprepare_snapshot()
effectively resulting in a regular bootable VM (to be set up via
with g.booted():
like now) that the test canrsync
files to. This should take only a few moments and shouldn't matter if done repeatedly. Thersync
should be with--delete
to cleanly update any existing content inside the (un-prepared-snapshot) VM, overriding it.Maybe do the un-prepare only on some variable, like
CONTEST_PER_RULE_REFRESH_VM
and rely on repeated test executions just re-using the same snapshot, which would be a good default for >5 slices running in ATEX, reusing remotes.