Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Commit

Permalink
ci: enable extra args to be passed to .test_director (#343)
Browse files Browse the repository at this point in the history
* ci: enable extra args to be passed to .test_director

The `centos/7/atomic` context has been consistently failing because
there are AVC denials from the kernel that are present in the version
of CentOS AH we are using.  This is preventing any useful CI checks
from being run on that platform.

This change introduces a simple check to the `.test_director` script to
see if any arguments were passed to the script.  This way, we are able
to skip tags we know are causing problems in our CI checks.

In order to utilize this change, I re-arranged the order of contexts
in the `.papr.yml` file in order to maintain inheritence between the
contexts and only pass in the extra args to the `centos/7/atomic`
context.

* fixup! ci: enable extra args to be passed to .test_director
  • Loading branch information
Micah Abbott committed Feb 21, 2018
1 parent 2531a1b commit 8d1b083
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .papr.yml
Expand Up @@ -25,20 +25,24 @@ inherit: true
cluster:
hosts:
- name: testnode
distro: centos/7/atomic
distro: centos/7/atomic/continuous
container:
image: registry.fedoraproject.org/fedora:27

context: centos/7/atomic
context: centos/7/atomic/continuous

---
inherit: true

cluster:
hosts:
- name: testnode
distro: centos/7/atomic/continuous
distro: centos/7/atomic
container:
image: registry.fedoraproject.org/fedora:27

context: centos/7/atomic/continuous
context: centos/7/atomic

tests:
- ./.test_director --skip-tags kernel_avc_denied

6 changes: 3 additions & 3 deletions .test_director
Expand Up @@ -18,15 +18,15 @@ NEW_TESTS=( $(git diff --name-only $(git merge-base origin/master HEAD) | grep '
# no new tests found, just run improved sanity test
if [ ${#NEW_TESTS[@]} -eq 0 ]; then
ansible-playbook --syntax-check tests/improved-sanity-test/main.yml
ansible-playbook -vi testnode, tests/improved-sanity-test/main.yml
ansible-playbook -vi testnode, tests/improved-sanity-test/main.yml "$@"
else
# added or modified tests found, iterate through and run each one
printf '%s\n' "${NEW_TESTS[@]}"
for NEW_TEST in "${NEW_TESTS[@]}"; do
# diff may contain deleted tests so only run tests that exist
if [ -f $NEW_TEST ]; then
ansible-playbook --syntax-check $NEW_TEST
ansible-playbook -vi testnode, $NEW_TEST
ansible-playbook --syntax-check $NEW_TEST
ansible-playbook -vi testnode, $NEW_TEST "$@"
fi
done
fi

0 comments on commit 8d1b083

Please sign in to comment.