From c1f8812e66685b498db98d39d0223e131e78d8d6 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Thu, 29 Jun 2023 17:33:01 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- .gitignore | 9 +++++++-- tests/run_tests.sh | 26 ++++++++++++++++++++++++++ tests/tests.yml | 15 +++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100755 tests/run_tests.sh create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index 3c3f223..956354d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ -SOURCES/fence-virt-1.0.0.tar.bz2 -/fence-virt-1.0.0.tar.bz2 +/*.tar.gz +/*.tar.bz2 +/*.rpm +/.build-*.log +/*/ +!/tests/ +/tests/*.retry diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..8f80ecf --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +err=0 + +agents=$(pcs stonith list 2>&1) +if [ $(echo "$agents" | grep -c "fence_virt\|fence_xvm") -ne 2 ]; then + echo "ERROR: pcs: fence_virt/fence_xvm not available:\n$agents" + err=$((err+1)) +else + echo "INFO: pcs: fence_virt/fence_xvm available..." +fi + +for bin in "fence_virtd -l"; do + output="$($bin 2>&1)" + if [ $? -ne 0 ]; then + echo -e "ERROR: $bin failed:\n$output" + err=$((err+1)) + else + echo "INFO: $bin works..." + fi +done + +if [ $err -ge 1 ]; then + echo -e "\nERROR: $err tests FAILED..." + exit 1 +fi diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..3424a11 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,15 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + - container + required_packages: + - fence-virt + - fence-virtd* + - pcs + + tests: + - subpackage_tests: + dir: . + run: ./run_tests.sh