Skip to content

Improve tmt-reproducer.sh

@mvadkert discussed the recently introduced "show COPR installation in tmt-reproducer feature with the tmt developers. this is what it looks like today.

Apparently there are two main complaints:

  1. The reproducer can become quite big and unwieldy if many rpm binaries are involved.
  2. Using a single tmt call with prepare --how shell --script '...' overwrites a test plan's existing prepare: step.

@psssssss , @mvadkert , does that sound right? Can you please add more relevant people to this discussion?

So far my ideas for this were:

  1. Do something similar to -e @tmt-environment-….yaml: Write the commands into some guest-setup.sh file artifact, add a curl reproducer step to download that, and replace the inline script with something like prepare --how shell --script "$(cat guest-setup.sh)". MR !299 (merged) lays the ground work for that (it calls the script sut_install_commands.sh, but that's probably acceptable -- if not, it's easy enough to rename).
  2. Injecting guest setup into tmt is hard, see the investigation below and https://github.com/teemtee/tmt/issues/1732 . But this works:
tmt run --until provision provision --how virtual --image Fedora-37 plan --name '^/plans/all/second$'
tmt run --last login < guest-setup.sh
tmt run --last --since prepare

Any suggestion from TMT developers greatly appreciated of course!

Also tracked in https://issues.redhat.com/browse/TFT-1752

This is currently blocked on MR !363 (merged)

Edited by Martin Pitt