diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml index 648918d..40466f9 100644 --- a/gating.yaml +++ b/gating.yaml @@ -1,6 +1,7 @@ --- !Policy product_versions: - - rhel-9 + - rhel-10 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/fedora.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional} diff --git a/plans/fedora.fmf b/plans/fedora.fmf new file mode 100644 index 0000000..d5b1643 --- /dev/null +++ b/plans/fedora.fmf @@ -0,0 +1,6 @@ +summary: Basic smoke test +discover: + how: fmf + url: https://src.fedoraproject.org/tests/gzip.git +execute: + how: tmt diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf new file mode 100644 index 0000000..e0aad11 --- /dev/null +++ b/plans/tier1-internal.fmf @@ -0,0 +1,11 @@ +summary: Internal gating tests plan +discover: + - name: Internal gating tests + how: fmf + filter: 'tag: CI-Tier-1' + url: https://pkgs.devel.redhat.com/git/tests/gzip +execute: + how: tmt +adjust: + enabled: false + when: distro == centos-stream or distro == fedora diff --git a/tests/.gitignore b/tests/.gitignore deleted file mode 100644 index 8793994..0000000 --- a/tests/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.swp -*.retry diff --git a/tests/gating/all.sh b/tests/gating/all.sh deleted file mode 100755 index 07fb296..0000000 --- a/tests/gating/all.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -passed=0 -subtests=(./gzip ./gunzip ./gzexe ./zcat ./zcmp ./zdiff ./zegrep ./zfgrep ./zforce ./zgrep ./zless ./zmore ./znew) -total=${#subtests[@]} - -for subtest in ${subtests[@]} -do - pushd $subtest >/dev/null - ./test.sh - result=$? - echo "Test $subtest result: $result" - if [ "$result" == "0" ] - then - ((passed++)) - fi - popd >/dev/null -done - -echo "Passed $passed/$total tests" -[[ $total == $passed ]] || exit 1 diff --git a/tests/gating/gunzip/test.sh b/tests/gating/gunzip/test.sh deleted file mode 100755 index cb1bd73..0000000 --- a/tests/gating/gunzip/test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -echo "Hello World!" > ./in -gzip -f -k ./in -gunzip -c ./in.gz > ./out -diff ./in ./out -result=$? -rm -f *.gz ./out ./in -exit $result - diff --git a/tests/gating/gzexe/test.sh b/tests/gating/gzexe/test.sh deleted file mode 100755 index f52cda1..0000000 --- a/tests/gating/gzexe/test.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - - -cat <./in -#!/bin/bash -echo "Hello World!" -EOF -chmod +x ./in -./in >./expected - -gzexe ./in 2>/dev/null -/bin/bash ./in >./out -diff ./out ./expected -result=$? -rm -f ./in ./in~ ./out ./expected -exit $result - diff --git a/tests/gating/gzip/test.sh b/tests/gating/gzip/test.sh deleted file mode 100755 index 17b1885..0000000 --- a/tests/gating/gzip/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -echo "Hello World!" > ./in -gzip -f -c ./in >/dev/null -result=$? -rm -f ./in *.gz -exit $result - diff --git a/tests/gating/zcat/test.sh b/tests/gating/zcat/test.sh deleted file mode 100755 index a4c8ef9..0000000 --- a/tests/gating/zcat/test.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -echo "Hello" > ./in -echo "World!" > ./in2 -echo "Hello" > ./exp -echo "World!" >> ./exp -gzip -f -k ./in -gzip -f -k ./in2 -zcat ./in.gz ./in2.gz >out -diff ./exp ./out -result=$? -rm -f ./in ./in2 *.gz ./out ./exp -exit $result - diff --git a/tests/gating/zcmp/test.sh b/tests/gating/zcmp/test.sh deleted file mode 100755 index 1c694e5..0000000 --- a/tests/gating/zcmp/test.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -echo "Hello World!" > ./in -gzip -f -k ./in -zcmp ./in ./in.gz -result=$? -rm -f *.gz ./out ./in -exit $result - diff --git a/tests/gating/zdiff/test.sh b/tests/gating/zdiff/test.sh deleted file mode 100755 index 84d3f20..0000000 --- a/tests/gating/zdiff/test.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -echo "Hello World!" > ./in -gzip -f -k ./in -zdiff ./in ./in.gz -result=$? -rm -f *.gz ./out ./in -exit $result - diff --git a/tests/gating/zegrep/test.sh b/tests/gating/zegrep/test.sh deleted file mode 100755 index d695585..0000000 --- a/tests/gating/zegrep/test.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -echo "Hello World!" > ./in -gzip -f -k ./in -zegrep "ello" ./in.gz >/dev/null -result=$? -rm -f *.gz ./out ./in -exit $result - diff --git a/tests/gating/zfgrep/test.sh b/tests/gating/zfgrep/test.sh deleted file mode 100755 index 35b9073..0000000 --- a/tests/gating/zfgrep/test.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -echo "Hello World!" > ./in -gzip -f -k ./in -zfgrep "ello" ./in.gz >/dev/null -result=$? -rm -f *.gz ./out ./in -exit $result - diff --git a/tests/gating/zforce/test.sh b/tests/gating/zforce/test.sh deleted file mode 100755 index ce79e25..0000000 --- a/tests/gating/zforce/test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -echo "Hello World!" > ./in -gzip -f -c ./in > ./out -zforce ./out > /dev/null -ls ./out.gz >/dev/null -result=$? -rm -f ./in *.gz -exit $result - diff --git a/tests/gating/zgrep/test.sh b/tests/gating/zgrep/test.sh deleted file mode 100755 index e74c6bc..0000000 --- a/tests/gating/zgrep/test.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -echo "Hello World!" > ./in -gzip -f -k ./in -zgrep "ello" ./in.gz >/dev/null -result=$? -rm -f *.gz ./out ./in -exit $result - diff --git a/tests/gating/zless/test.sh b/tests/gating/zless/test.sh deleted file mode 100755 index c72f95e..0000000 --- a/tests/gating/zless/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -zless --help >/dev/null -result=$? -exit $result diff --git a/tests/gating/zmore/test.sh b/tests/gating/zmore/test.sh deleted file mode 100755 index 8cafdce..0000000 --- a/tests/gating/zmore/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -zmore --help >/dev/null -result=$? -exit $result diff --git a/tests/gating/znew/test.sh b/tests/gating/znew/test.sh deleted file mode 100755 index 8c81298..0000000 --- a/tests/gating/znew/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -znew --help >/dev/null -result=$? -exit $result diff --git a/tests/sanity.yml b/tests/sanity.yml deleted file mode 100644 index da0d623..0000000 --- a/tests/sanity.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- hosts: localhost - vars: - - artifacts: ./artifacts - remote_user: root - roles: - - role: standard-test-basic - tags: - - atomic - - classic - - container - tests: - - simple: - dir: gating - run: ./all.sh diff --git a/tests/test-simple b/tests/test-simple deleted file mode 100644 index 278d622..0000000 --- a/tests/test-simple +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -ex - -# exercise installed gzip/gunzip programs -echo "Bla" > bla.file -cp bla.file bla.file.orig -gzip bla.file -gunzip bla.file.gz -cmp bla.file bla.file.orig -echo "hi" -rm bla.file bla.file.orig diff --git a/tests/test_simple.yml b/tests/test_simple.yml deleted file mode 100644 index 9f7d0df..0000000 --- a/tests/test_simple.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -- hosts: localhost - vars: - - artifacts: ./artifacts - tags: - - atomic - - classic - - container - remote_user: root - tasks: - - name: Create the folder where we will store the tests - action: file state=directory path={{ item }} - owner=root group=root - with_items: - - /usr/local/bin - - - name: Install the test files - copy: src={{ item.file }} dest=/usr/local/bin/{{ item.dest }} - mode=0755 - with_items: - - {file: test-simple, dest: test-simple } - - - name: Execute the tests - block: - - shell: exec > /tmp/test.log && /usr/local/bin/test-simple 2>&1 - - always: - - name: Pull out the logs - fetch: - dest: "{{ artifacts }}/" - src: "/tmp/test.log" - flat: true diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index b057848..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- import_playbook: test_simple.yml -- import_playbook: sanity.yml