#64 standard-test-chroot: Execute test scripts in a chroot
Opened by stefw. Modified
stefw/standard-test-roles standard-test-chroot  into  master

Download 64.patch

Put this role in your tests.yml playbook and specify a
number of test scripts to execute as tests. These will
be executed in a prepared chroot including all the packages
that are listed.

The results of each script will be piped into log file in the
artifacts directory. If any script exits with a non-zero exit
code the role will fail.

In the case of test subjects such a host or container, these
test scripts and related files will be copied to the target into
/var/tmp/tests before execution.

You should define the following variables:

  • tests: An array of scripts to run
  • files: A list of files or directories needed by the scripts
  • packages: A list of packages to install in the chroot

You can define these variables:

  • root: The path for the chroot. Defaults to /var/tmp/tests/test
  • target: A target directory inside the chroot to which to place the files. Defaults to /var/tmp/tests

Likely replacement for https://pagure.io/standard-test-roles/pull-request/61

I had much better luck using this than PR #61. However, see my very recent comment on https://src.fedoraproject.org/rpms/selinux-policy/pull-request/1 regarding the disconnect between the standard-test-source and standard-test-chroot roles that caused some difficulties for me.

rebased onto 22ac51fe0ed2ecb7ecdd22cb2c1e740ec1534b21

Fixed updates for your comments in https://src.fedoraproject.org/rpms/selinux-policy/pull-request/1

@stefw Still troubles. See https://src.fedoraproject.org/rpms/selinux-policy/pull-request/1.

Metadata