-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify runcontainer to support running multiple containers simultaneously #129
Conversation
…usly Add 3 options: - --containers <NUM>: specifies the number of containers. Default to 1. - --exclude <TEST PATH>: specifies a test to skip. Default to none. E.g., --exclude tests/tests_default.yml --exclude tests/tests_relp.yml - --extra-rpm <RPM>: specifies an additional rpm package to install in the container. Default to none. E.g., --extra-rpm diffutils --extra-rpm sudo
The test should use Ansible tags to exclude tests, like we do for downstream testing. For example, in kernel settings, we cannot run this test in basic smoke test because it will reboot the machine, so we use tag As far as additional packages to install - this should be done in tests/setup-snapshot.yml - there should be a section in there for test packages e.g. in logging: https://github.com/linux-system-roles/logging/blob/main/tests/setup-snapshot.yml#L16 - just add |
@@ -115,6 +115,9 @@ refresh_test_container() { | |||
prepkgs="dnf-plugins-core" ;; | |||
*) pkgcmd=dnf; prepkgs="" ;; | |||
esac | |||
for rpm in $EXTRA_RPMS; do | |||
initpkgs="$rpm $initpkgs" | |||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok to leave this, but in general, the test framework will install extra packages from tests/setup-snapshot.yml
CONTAINER_COUNT="$1" ;; | ||
--exclude) | ||
shift | ||
EXCLUDES+=("$1") ;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok to leave this, but in general, the test framework will use --skip-tags ...
to exclude tests that cannot be run in containers.
Closing this PR in favor of richm#1. |
This patch adds 3 options:
--containers <NUM>
: specifies the number of containers. Default to 1.--exclude <TEST PATH>
: specifies a test to skip. Default to none. E.g.,--exclude tests/tests_default.yml --exclude tests/tests_relp.yml
--extra-rpm <RPM>
: specifies an additional rpm package to install in the container. Default to none. E.g.,--extra-rpm diffutils --extra-rpm sudo
Note:
This is a sample command line to run the logging CI tests on 4 centos-9 containers.
This command-line excludes
tests_basics_files.yml
,tests_ovirt_elasticsearch.yml
, andtests_relp.yml
since these tests fail as they executeselinux role
internally. It requires thediffutils
rpm package since some tests calldiff
in it.Question:
Each role has its own required options for
--exclude
and--extra-rpm
as shown above for the logging role. Where shall I put the information? In each role's README.md or README.md in tox-lsr?