Add some basic testing

This commit is contained in:
Peter Hutterer 2019-02-28 14:13:46 +10:00
parent bad9712fc3
commit 16ed7bef68
5 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,4 @@
PURPOSE of libinput-tool-beakerlib
Description: Test for the libinput commandline tool
Author: Peter Hutterer <peter.hutterer@redhat.com>

View File

@ -0,0 +1,34 @@
#!/bin/bash
# Include rhts environment
. /usr/bin/rhts-environment.sh
. /usr/share/rhts-library/rhtslib.sh
PACKAGE="libinput"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertRpm $PACKAGE-utils
rlPhaseEnd
rlPhaseStartTest
rlRun "libinput --help" 0 "libinput help exists cleanly"
rlRun "libinput --version" 0 "libinput version exists cleanly"
rlPhaseEnd
rlPhaseStartTest
rlRun "libinput quirks validate" 0 "libinput quirks parse "
rlPhaseEnd
rlPhaseStartTest
rlRun "libinput record --help" 0 "libinput record exists"
rlRun "libinput measure --help" 0 "libinput measure exists"
rlRun "libinput measure fuzz --help" 0 "libinput measure fuzz exists"
rlRun "libinput measure touch-size --help" 0 "libinput measure touch-size exists"
rlRun "libinput measure touchpad-pressure --help" 0 "libinput touchpad-pressure exists"
rlRun "libinput measure touchpad-tap --help" 0 "libinput touchpad-tap exists"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -0,0 +1,5 @@
PURPOSE of libinput-tool
Description: Test for the libinput commandline tool
Author: Peter Hutterer <peter.hutterer@redhat.com>

View File

@ -0,0 +1,16 @@
#!/bin/bash
# check libinput is in the path, --help and --version need to work
libinput --help
libinput --version
# this should fail if the quirks failed to install
libinput quirks validate
# check the various tools exist
libinput record --help
libinput measure --help
libinput measure fuzz --help
libinput measure touch-size --help
libinput measure touchpad-pressure --help
libinput measure touchpad-tap --help

16
tests/tests.yml Normal file
View File

@ -0,0 +1,16 @@
---
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
tests:
- libinput-tool-beakerlib
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- libinput-tool