From 088bed91e622e11eafbf8edc48de28688dd5af04 Mon Sep 17 00:00:00 2001 From: Christine Caulfield Date: Mon, 11 Oct 2021 08:35:47 +0100 Subject: [PATCH] Add gating tests that got lost in the grab from Fedora Resolves: rhbz#1999980 --- tests/run-tests.sh | 35 +++++++++++++++++++++++++++++++++++ tests/tests.yml | 19 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100755 tests/run-tests.sh create mode 100644 tests/tests.yml diff --git a/tests/run-tests.sh b/tests/run-tests.sh new file mode 100755 index 0000000..a6ce762 --- /dev/null +++ b/tests/run-tests.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +EXCLUDES="knet_bench_test api_knet_handle_new_limit_test fun_pmtud_crypto_test run-tests.sh" +TESTS_RUN=0 +TESTS_FAILED=0 + +modprobe sctp +cd /usr/lib64/kronosnet/tests + +for i in * +do + echo $EXCLUDES|grep $i >/dev/null 2>/dev/null + if [ $? = 1 ] + then + echo + echo "---- running $i" + ./$i + if [ $? != 0 ] + then + TESTS_FAILED=$((TESTS_FAILED + 1)) + echo "FAILED: $i" + fi + TESTS_RUN=$((TESTS_RUN + 1)) + fi +done +echo +echo "Tests run: $TESTS_RUN" +echo "Tests failed: $TESTS_FAILED" + +if [ $TESTS_FAILED -gt 0 ] +then + exit 1 +else + exit 0 +fi diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..38f5f21 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,19 @@ +- hosts: localhost + roles: + - role: standard-test-source # Fetch source tarball and unpack it into the test environment + tags: + - always + + - role: standard-test-basic + tags: + - atomic + - classic + required_packages: + - bash + - kronosnet-tests + - kernel-modules-extra + + tests: + - check: # Run tests + dir: . + run: ./run-tests.sh