diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..11017ab --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# when running this in 1minutetip the PATH must be specified to execute +# in the local directory. +echo "Setting path to local directory" +PATH=$PATH:$(pwd) + +# simple sanity test +sanity.sh +exit $? diff --git a/tests/sanity.sh b/tests/sanity.sh new file mode 100755 index 0000000..e7f4ea3 --- /dev/null +++ b/tests/sanity.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# +# This is a simple sanity test to satisfy the RHEL8.1 onboard gating +# requirement. + +ret=0 +qperf --help examples +let ret=$ret+$? + +qperf --help tests +let ret=$ret+$? + +# launch server +qperf & + +qperf localhost tcp_bw tcp_lat +let ret=$ret+$? + +qperf localhost udp_bw udp_lat +let ret=$ret+$? + +# kill off server +killall qperf + +exit $ret diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..2aa59eb --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: . # switch to subfolder. This parameter is REQUIRED, use `dir: .` for current folder + run: ./run_tests.sh # this is your test command, its exit code is the outcome of the test + required_packages: + - qperf + - psmisc