| |
@@ -0,0 +1,64 @@
|
| |
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| |
+ #
|
| |
+ # Makefile of /CoreOS/util-linux/various
|
| |
+ # Description: This test groups small sanity and regression tests for util-linux
|
| |
+ # Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
| |
+ #
|
| |
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| |
+ #
|
| |
+ # Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
| |
+ #
|
| |
+ # This copyrighted material is made available to anyone wishing
|
| |
+ # to use, modify, copy, or redistribute it subject to the terms
|
| |
+ # and conditions of the GNU General Public License version 2.
|
| |
+ #
|
| |
+ # This program is distributed in the hope that it will be
|
| |
+ # useful, but WITHOUT ANY WARRANTY; without even the implied
|
| |
+ # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
| |
+ # PURPOSE. See the GNU General Public License for more details.
|
| |
+ #
|
| |
+ # You should have received a copy of the GNU General Public
|
| |
+ # License along with this program; if not, write to the Free
|
| |
+ # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
| |
+ # Boston, MA 02110-1301, USA.
|
| |
+ #
|
| |
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| |
+
|
| |
+ export TEST=/CoreOS/util-linux/Sanity/various
|
| |
+ export TESTVERSION=1.0
|
| |
+
|
| |
+ BUILT_FILES=
|
| |
+
|
| |
+ FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
| |
+
|
| |
+ .PHONY: all install download clean
|
| |
+
|
| |
+ run: $(FILES) build
|
| |
+ ./runtest.sh
|
| |
+
|
| |
+ build: $(BUILT_FILES)
|
| |
+ test -x runtest.sh || chmod a+x runtest.sh
|
| |
+
|
| |
+ clean:
|
| |
+ rm -f *~ $(BUILT_FILES)
|
| |
+
|
| |
+
|
| |
+ include /usr/share/rhts/lib/rhts-make.include
|
| |
+
|
| |
+ $(METADATA): Makefile
|
| |
+ @echo "Owner: Miroslav Vadkerti <mvadkert@redhat.com>" > $(METADATA)
|
| |
+ @echo "Name: $(TEST)" >> $(METADATA)
|
| |
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
| |
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
|
| |
+ @echo "Description: This test groups small sanity and regression tests for util-linux" >> $(METADATA)
|
| |
+ @echo "Type: Sanity" >> $(METADATA)
|
| |
+ @echo "TestTime: 10m" >> $(METADATA)
|
| |
+ @echo "RunFor: util-linux" >> $(METADATA)
|
| |
+ @echo "Requires: util-linux util-linux-user" >> $(METADATA)
|
| |
+ @echo "Priority: Normal" >> $(METADATA)
|
| |
+ @echo "License: GPLv2" >> $(METADATA)
|
| |
+ @echo "Confidential: no" >> $(METADATA)
|
| |
+ @echo "Destructive: no" >> $(METADATA)
|
| |
+ @echo "Releases: -RHEL3 -RHEL4 -RHEL5Server -RHEL5Client -RHEL6" >> $(METADATA)
|
| |
+
|
| |
+ rhts-lint $(METADATA)
|
| |
Adds tests according to the CI wiki [0] specifically the standard test interface in the spec [1].
The playbook includes Tier1 level test cases that have been tested in the following contexts and is passing reliably: Docker, and Classic.
Test logs are stored in the Artifacts directory. Currently tests are not suitable for Atomic but may be updated later to support it.
The following steps are used to execute the tests using the standard test interface:
Atomic
sudo ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory) TEST_SUBJECTS=../atomic.qcow2 TEST_ARTIFACTS=$PWD/artifacts ansible-playbook --tags atomic tests.yml
Docker
sudo ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory) TEST_DEBUG=1 TEST_SUBJECTS=docker:docker.io/library/fedora:26 TEST_ARTIFACTS=$PWD/artifacts ansible-playbook --tags container tests.yml
Classic
sudo ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory) TEST_SUBJECTS="" TEST_ARTIFACTS=$PWD/artifacts ansible-playbook --tags classic tests.yml
Test Logs: (If you would like a pointer to the complete log, I can include that as well)
Docker
<snip>
08:45:33 TASK [standard-test-beakerlib : Execute beakerlib tests]
08:45:35 changed: [46accfcf89d9ee689e79f54b24984a47b474861deb08064a9471107252e30a4b] => (item=various)
08:45:35
08:45:35 TASK [standard-test-beakerlib : Make the master test summary log artifact]
08:45:36 changed: [46accfcf89d9ee689e79f54b24984a47b474861deb08064a9471107252e30a4b] => (item=various)
08:45:36
08:45:36 TASK [standard-test-beakerlib : Pull out the logs]
08:45:36 changed: [46accfcf89d9ee689e79f54b24984a47b474861deb08064a9471107252e30a4b]
08:45:36
08:45:36 TASK [standard-test-beakerlib : Check the results]
08:45:37 changed: [46accfcf89d9ee689e79f54b24984a47b474861deb08064a9471107252e30a4b]
08:45:37
08:45:37 PLAY RECAP
08:45:37 46accfcf89d9ee689e79f54b24984a47b474861deb08064a9471107252e30a4b : ok=16 changed=11 unreachable=0 failed=0
08:45:37
08:45:37 ###################################
08:45:37 Test results:
08:45:37 ###################################
08:45:37 PASS various
Classic
<snip>
TASK [standard-test-beakerlib : Execute beakerlib tests]
changed: [localhost] => (item=various)
TASK [standard-test-beakerlib : Make the master test summary log artifact]
changed: [localhost] => (item=various)
TASK [standard-test-beakerlib : Pull out the logs]
changed: [localhost]
TASK [standard-test-beakerlib : Check the results]
changed: [localhost]
PLAY RECAP
localhost : ok=15 changed=9 unreachable=0 failed=0
Tests will be enabled in CI, yet gating is currently disabled, so nothing will change. However eventually gating will be enabled. Tests will run on each dist-git commit, they are not triggered on koji builds and if you are using FMN, it should notify you of failures normally.
The RH QE maintainer contact in case you have questions: rskvaril@redhat.com
The idea is that these tests become yours just as you're maintaining the package, there will of course be people around if you have questions or troubles.
[0] https://fedoraproject.org/wiki/CI
[1] https://fedoraproject.org/wiki/Changes/InvokingTests