diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..4ca9235 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/isns-utils.spec b/isns-utils.spec index c48b41d..3d56fc1 100644 --- a/isns-utils.spec +++ b/isns-utils.spec @@ -1,12 +1,13 @@ Name: isns-utils Version: 0.101 -Release: 12%{?dist} +Release: 13%{?dist} Summary: The iSNS daemon and utility programs License: LGPL-2.1-or-later URL: https://github.com/open-iscsi/open-isns Source0: https://github.com/open-iscsi/open-isns/archive/v%{version}.tar.gz#/open-isns-%{version}.tar.gz Source1: isnsd.service +Patch1: test_as_installed.patch BuildRequires: gcc BuildRequires: openssl-devel automake pkgconfig systemd-devel systemd diff --git a/test_as_installed.patch b/test_as_installed.patch new file mode 100644 index 0000000..63993ef --- /dev/null +++ b/test_as_installed.patch @@ -0,0 +1,47 @@ +From 420ae1af11fad3151b5bfa676e7218168e4e6f3f Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Wed, 26 May 2021 10:00:17 -0700 +Subject: [PATCH 1/1] run tests with binaries from arbitrary paths + +--- + tests/Makefile | 4 ++++ + tests/harness.py | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/tests/Makefile b/tests/Makefile +index 372572d..2c61183 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -48,3 +48,7 @@ quick: tests-no-security + tests-no-security: + @echo running tests without security -- takes about 2 minutes + ./test-isns.py ++ ++tests-as-installed: ++ @echo running tests from installed executables -- takes about 2 minutes ++ ./test-isns.py --path="/usr/sbin" +diff --git a/tests/harness.py b/tests/harness.py +index 39fc5e6..b710f5a 100644 +--- a/tests/harness.py ++++ b/tests/harness.py +@@ -137,6 +137,9 @@ def new_initArgParsers(self): + self._main_parser.add_argument('-d', '--debug', dest='debug', + action='store_true', + help='Enable developer debugging') ++ self._main_parser.add_argument('--path', dest='path', ++ action='store', default='..', ++ help='Set isns bin path, to run from installed executables') + + def new_parseArgs(self, argv): + """ +@@ -148,6 +151,7 @@ def new_parseArgs(self, argv): + Global.verbosity = self.verbosity + Global.security = self.security + Global.debug = self.debug ++ Global._isns_bin_dir = self.path + dprint("found: verbosity=%d, security=%s" % \ + (Global.verbosity, Global.security)) + +-- +2.31.1 + diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..8ca7ed2 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,20 @@ +--- +- hosts: localhost + roles: + - role: standard-test-source + tags: + - always + + - role: standard-test-basic + tags: + - classic + required_packages: + - make + - python3 + - isns-utils + - openssl + tests: + - smoke: + dir: ./source/tests/ + run: make tests-as-installed +