| |
@@ -0,0 +1,46 @@
|
| |
+ # SPDX-License-Identifier: LGPL-2.1+
|
| |
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| |
+ #
|
| |
+ # Makefile of /CoreOS/libcap-ng
|
| |
+ # Description: Test if libcap-ng working ok
|
| |
+ # Author: Susant Sahani<susant@redhat.com>
|
| |
+ #
|
| |
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| |
+ export TEST=/CoreOS/libcap-ng
|
| |
+ export TESTVERSION=1.0
|
| |
+
|
| |
+ OBJS = test-libcap-ng.c
|
| |
+ CFLAG = -Wall -g3
|
| |
+ CC = gcc
|
| |
+ LIBS = -lcap-ng -lcmocka
|
| |
+
|
| |
+ test-libcap-ng:${OBJ}
|
| |
+ ${CC} ${CFLAGS} ${INCLUDES} -o $@ ${OBJS} ${LIBS}
|
| |
+
|
| |
+ run: test-libcap-ng
|
| |
+ ./runtest.sh
|
| |
+ clean:
|
| |
+ -rm -f *~ test-libcap-ng
|
| |
+
|
| |
+ .c.o:
|
| |
+ ${CC} ${CFLAGS} ${INCLUDES} -c $<
|
| |
+
|
| |
+ CC = gcc
|
| |
+
|
| |
+ include /usr/share/rhts/lib/rhts-make.include
|
| |
+ $(METADATA): Makefile
|
| |
+ @echo "Owner: Susant Sahani<susant@redhat.com>" > $(METADATA)
|
| |
+ @echo "Name: $(TEST)" >> $(METADATA)
|
| |
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
| |
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
|
| |
+ @echo "Description: Test libcap-ng works ok" >> $(METADATA)
|
| |
+ @echo "Type: Sanity" >> $(METADATA)
|
| |
+ @echo "TestTime: 5m" >> $(METADATA)
|
| |
+ @echo "RunFor: libcap-ng" >> $(METADATA)
|
| |
+ @echo "Requires: libcap-ng libcap-ng-devel" >> $(METADATA)
|
| |
+ @echo "Priority: Normal" >> $(METADATA)
|
| |
+ @echo "License: GPLv2" >> $(METADATA)
|
| |
+ @echo "Confidential: no" >> $(METADATA)
|
| |
+ @echo "Destructive: no" >> $(METADATA)
|
| |
+ @echo "Releases: -Fedora 29" >> $(METADATA)
|
| |
+ rhts-lint $(METADATA)
|
| |
justification
Adds tests according to the CI wiki specifically the standard test interface in the spec.
The playbook includes Tier1 level test cases that have been tested in the following contexts and
is passing reliably: Classic. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:
Test enveronment
Make sure you have installed packages from the spec
/runtest.sh
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Setup
:: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
libcap-ng-0.7.9-1.fc28.x86_64
:: [ 15:23:09 ] :: [ PASS ] :: Checking for the presence of libcap-ng rpm
:: [ 15:23:09 ] :: [ PASS ] :: Checking for the presence of libcap-ng rpm
:: [ 15:23:09 ] :: [ LOG ] :: Package versions:
:: [ 15:23:09 ] :: [ LOG ] :: Package versions:
:: [ 15:23:09 ] :: [ LOG ] :: libcap-ng-0.7.9-1.fc28.x86_64
:: [ 15:23:09 ] :: [ LOG ] :: libcap-ng-0.7.9-1.fc28.x86_64
:: [ 15:23:09 ] :: [ BEGIN ] :: Running 'cp test-libcap-ng /usr/bin/'
:: [ 15:23:09 ] :: [ PASS ] :: Command 'cp test-libcap-ng /usr/bin/' (Expected 0, got 0)
:: [ 15:23:09 ] :: [ PASS ] :: Command 'cp test-libcap-ng /usr/bin/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 0s
:: Duration: 0s
:: Assertions: 2 good, 0 bad
:: Assertions: 2 good, 0 bad
:: RESULT: PASS
:: RESULT: PASS
`
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Test
:: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 15:23:09 ] :: [ LOG ] :: Starting libcap-ng tests ...
:: [ 15:23:09 ] :: [ LOG ] :: Starting libcap-ng tests ...
:: [ 15:23:09 ] :: [ BEGIN ] :: Running '/usr/bin/test-libcap-ng'
[==========] Running 1 test(s).
[ RUN ] test_drop_cap_net_raw
[ OK ] test_drop_cap_net_raw
[==========] 1 test(s) run.
[ PASSED ] 1 test(s).
:: [ 15:23:09 ] :: [ PASS ] :: Command '/usr/bin/test-libcap-ng' (Expected 0, got 0)
:: [ 15:23:09 ] :: [ PASS ] :: Command '/usr/bin/test-libcap-ng' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 0s
:: Duration: 0s
:: Assertions: 1 good, 0 bad
:: Assertions: 1 good, 0 bad
:: RESULT: PASS
:: RESULT: PASS