#1 Add CI tests using the standard test interface
Merged 5 years ago by kay. Opened 5 years ago by ssahani.
Unknown source tests  into  master

@@ -0,0 +1,25 @@

+ #!/bin/bash

+ # Include Beaker environment

+ . /usr/share/beakerlib/beakerlib.sh || exit 1

+ 

+ PACKAGE="libvarlink"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlRun "git clone https://github.com/varlink/libvarlink; cd libvarlink; meson build;make"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlLog "Starting tests ..."

+         rlRun "cd build; ninja test"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+        rlLog "libvarlink tests done"

+        rlRun "rm -rf libvarlink"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

+ 

+ rlGetTestState

file added
+12
@@ -0,0 +1,12 @@

+ - hosts: localhost

+   roles:

+     - role: standard-test-beakerlib

+       tags:

+         - classic

+       tests:

+         - sanity

+       required_packages:

+         - libvarlink

+         - meson

+         - ninja-build

+         - gcc

Note: These tests basically wraps up the upstream tests

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 and Container. Test logs are stored in the artifacts directory.

The following steps are used to execute the tests using the standard test interface:

Test environment
Make sure you have installed packages from the spec

$ rpm -q ansible python2-dnf libselinux-python standard-test-roles
ansible-2.3.2.0-1.fc26.noarch
python2-dnf-2.6.3-11.fc26.noarch
libselinux-python-2.6-7.fc26.x86_64
standard-test-roles-2.4-1.fc26.noarch

Install all necessary packages from Standard_Test_Roles

$ sudo dnf install fedpkg libselinux-python standard-test-roles

Sample-run:

:: [ 14:45:07 ] :: [   LOG    ] :: Starting tests ...
:: [ 14:45:07 ] :: [   LOG    ] :: Starting tests ...
:: [ 14:45:07 ] :: [  BEGIN   ] :: Running 'cd build; ninja test'
[0/1] Running all tests.
1/8 test-interface                          OK       0.01 s
2/8 test-server-client                      OK       0.03 s
3/8 test-object                             OK       0.01 s
4/8 test-array                              OK       0.01 s
5/8 test-type                               OK       0.01 s
6/8 test-error                              OK       0.01 s
7/8 test-avl                                OK       0.01 s
8/8 test-symbols                            OK       0.02 s

OK:         8
FAIL:       0
SKIP:       0
TIMEOUT:    0

Tests will be enabled in CI, yet gating is currently disabled, so nothing will change. Tests will run on each dist-git commit, they are not triggered by koji builds and if you are using FMN, it should notify you of failures normally.

Pull-Request has been merged by kay

5 years ago