From 8d1b083469383d18b48c0445b60a40f8f1fd2948 Mon Sep 17 00:00:00 2001 From: Micah Abbott Date: Wed, 21 Feb 2018 09:28:38 -0500 Subject: [PATCH] ci: enable extra args to be passed to .test_director (#343) * 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 --- .papr.yml | 12 ++++++++---- .test_director | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.papr.yml b/.papr.yml index e222d9a..bd921a9 100644 --- a/.papr.yml +++ b/.papr.yml @@ -25,11 +25,11 @@ 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 @@ -37,8 +37,12 @@ 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 + diff --git a/.test_director b/.test_director index bb6bcad..cdc68de 100755 --- a/.test_director +++ b/.test_director @@ -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