| |
@@ -0,0 +1,63 @@
|
| |
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| |
+ #
|
| |
+ # Makefile of /CoreOS/coreutils/readlink-cannot-handle-recursive-symlink s
|
| |
+ # Description: Test for readlink cannot handle recursive symlinks
|
| |
+ # Author: Jan Scotka <jscotka@redhat.com>
|
| |
+ #
|
| |
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| |
+ #
|
| |
+ # Copyright (c) 2010 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/coreutils/readlink-cannot-handle-recursive-symlinks
|
| |
+ 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)
|
| |
+ chmod a+x runtest.sh
|
| |
+
|
| |
+ clean:
|
| |
+ rm -f *~ $(BUILT_FILES)
|
| |
+
|
| |
+
|
| |
+ include /usr/share/rhts/lib/rhts-make.include
|
| |
+
|
| |
+ $(METADATA): Makefile
|
| |
+ @echo "Owner: Jan Scotka <jscotka@redhat.com>" > $(METADATA)
|
| |
+ @echo "Name: $(TEST)" >> $(METADATA)
|
| |
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
| |
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
|
| |
+ @echo "Description: Test for readlink cannot handle recursive symlinks" >> $(METADATA)
|
| |
+ @echo "Type: Sanity" >> $(METADATA)
|
| |
+ @echo "TestTime: 5m" >> $(METADATA)
|
| |
+ @echo "RunFor: coreutils" >> $(METADATA)
|
| |
+ @echo "Requires: coreutils" >> $(METADATA)
|
| |
+ @echo "Priority: Normal" >> $(METADATA)
|
| |
+ @echo "License: GPLv2" >> $(METADATA)
|
| |
+ @echo "Confidential: no" >> $(METADATA)
|
| |
+ @echo "Destructive: no" >> $(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: Atomic Host, Docker, and Classic.
Test logs are stored in the Artifacts directory.
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 you would like a pointer to the complete log, I can include that as well)
Atomic
<snip>
03:19:46 TASK [standard-test-beakerlib : Execute beakerlib tests]
03:19:52 changed: [../atomic.qcow2] => (item=test-basics)
03:20:00 changed: [../atomic.qcow2] => (item=readlink-cannot-handle-recursive-symlinks)
03:20:00
03:20:00 TASK [standard-test-beakerlib : Make the master test summary log artifact]
03:20:01 changed: [../atomic.qcow2] => (item=test-basics)
03:20:01 changed: [../atomic.qcow2] => (item=readlink-cannot-handle-recursive-symlinks)
03:20:01
03:20:01 TASK [standard-test-beakerlib : Pull out the logs]
03:20:01 changed: [../atomic.qcow2]
03:20:01
03:20:01 TASK [standard-test-beakerlib : Check the results]
03:20:02 changed: [../atomic.qcow2]
03:20:02
03:20:02 PLAY RECAP
03:20:02 ../atomic.qcow2 : ok=13 changed=9 unreachable=0 failed=0
03:20:02
03:20:02 ###################################
03:20:02 Test results:
03:20:02 ###################################
03:20:02 PASS test-basics
03:20:02 PASS readlink-cannot-handle-recursive-symlinks
03:20:02 ###################################
Docker
<snip>
03:23:08 TASK [standard-test-beakerlib : Execute beakerlib tests]
03:23:11 changed: [2e310b9a86988556529f8e7ce4cb1c5c73f2201ea067642776534ee641ac4677] => (item=test-basics)
03:23:14 changed: [2e310b9a86988556529f8e7ce4cb1c5c73f2201ea067642776534ee641ac4677] => (item=readlink-cannot-handle-recursive-symlinks)
03:23:14
03:23:14 TASK [standard-test-beakerlib : Make the master test summary log artifact]
03:23:14 changed: [2e310b9a86988556529f8e7ce4cb1c5c73f2201ea067642776534ee641ac4677] => (item=test-basics)
03:23:15 changed: [2e310b9a86988556529f8e7ce4cb1c5c73f2201ea067642776534ee641ac4677] => (item=readlink-cannot-handle-recursive-symlinks)
03:23:15
03:23:15 TASK [standard-test-beakerlib : Pull out the logs]
03:23:16 changed: [2e310b9a86988556529f8e7ce4cb1c5c73f2201ea067642776534ee641ac4677]
03:23:16
03:23:16 TASK [standard-test-beakerlib : Check the results]
03:23:17 changed: [2e310b9a86988556529f8e7ce4cb1c5c73f2201ea067642776534ee641ac4677]
03:23:17
03:23:17 PLAY RECAP
03:23:17 2e310b9a86988556529f8e7ce4cb1c5c73f2201ea067642776534ee641ac4677 : ok=14 changed=10 unreachable=0 failed=0
03:23:17
03:23:17 ###################################
03:23:17 Test results:
03:23:17 ###################################
03:23:17 PASS test-basics
03:23:17 PASS readlink-cannot-handle-recursive-symlinks
Classic
<snip>
03:16:37 ==> default: TASK [standard-test-beakerlib : Execute beakerlib tests]
03:16:39 ==> default: changed: [localhost] => (item=test-basics)
03:16:41 ==> default: changed: [localhost] => (item=readlink-cannot-handle-recursive-symlinks)
03:16:41 ==> default:
03:16:41 ==> default: TASK [standard-test-beakerlib : Make the master test summary log artifact]
03:16:42 ==> default: changed: [localhost] => (item=test-basics)
03:16:42 ==> default: changed: [localhost] => (item=readlink-cannot-handle-recursive-symlinks)
03:16:42 ==> default:
03:16:42 ==> default: TASK [standard-test-beakerlib : Pull out the logs]
03:16:42 ==> default: changed: [localhost]
03:16:42 ==> default:
03:16:42 ==> default: TASK [standard-test-beakerlib : Check the results]
03:16:42 ==> default: changed: [localhost]
03:16:42 ==> default:
03:16:42 ==> default: PLAY RECAP
03:16:42 ==> default: localhost : ok=14 changed=11 unreachable=0 failed=0
03:16:42 ==> default: ++ '[' 0 -ne 0 ']'
03:16:42 ==> default: ++ cat /home/vagrant/coreutils/artifacts/test.log
03:16:42 ==> default: PASS test-basics
03:16:42 ==> default: PASS readlink-cannot-handle-recursive-symlinks
[0] https://fedoraproject.org/wiki/CI
[1] https://fedoraproject.org/wiki/Changes/InvokingTests