From bd5e1ed4abfaa5c6725611a4380db93ba8586805 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 18 Aug 2022 10:10:38 +0200 Subject: [PATCH] Simplify test plans Use inheritance to merge similar test plans. --- gating.yaml | 12 ++++++------ plans/javapackages-jdk11.fmf | 12 ------------ plans/javapackages-jdk17.fmf | 12 ------------ plans/javapackages-jdk8.fmf | 12 ------------ plans/javapackages.fmf | 29 +++++++++++++++++++++++++++++ plans/smoke-jdk11.fmf | 8 -------- plans/smoke-jdk17.fmf | 8 -------- plans/smoke-jdk8.fmf | 8 -------- plans/smoke.fmf | 25 +++++++++++++++++++++++++ 9 files changed, 60 insertions(+), 66 deletions(-) delete mode 100644 plans/javapackages-jdk11.fmf delete mode 100644 plans/javapackages-jdk17.fmf delete mode 100644 plans/javapackages-jdk8.fmf create mode 100644 plans/javapackages.fmf delete mode 100644 plans/smoke-jdk11.fmf delete mode 100644 plans/smoke-jdk17.fmf delete mode 100644 plans/smoke-jdk8.fmf create mode 100644 plans/smoke.fmf diff --git a/gating.yaml b/gating.yaml index 24a4107..d96530f 100644 --- a/gating.yaml +++ b/gating.yaml @@ -5,9 +5,9 @@ decision_contexts: - bodhi_update_push_testing - bodhi_update_push_stable rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke-jdk8.functional} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke-jdk11.functional} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke-jdk17.functional} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages-jdk8.functional} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages-jdk11.functional} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages-jdk17.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke/jdk8.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke/jdk11.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke/jdk17.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages/jdk8.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages/jdk11.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages/jdk17.functional} diff --git a/plans/javapackages-jdk11.fmf b/plans/javapackages-jdk11.fmf deleted file mode 100644 index 6bfdb67..0000000 --- a/plans/javapackages-jdk11.fmf +++ /dev/null @@ -1,12 +0,0 @@ -summary: - Run javapackages-specific tests - OpenJDK 11 -prepare: - how: install - exclude: - - maven-openjdk8 - - maven-openjdk17 -discover: - how: fmf - url: https://pagure.io/javapackages-validator-tests -execute: - how: tmt diff --git a/plans/javapackages-jdk17.fmf b/plans/javapackages-jdk17.fmf deleted file mode 100644 index ae04747..0000000 --- a/plans/javapackages-jdk17.fmf +++ /dev/null @@ -1,12 +0,0 @@ -summary: - Run javapackages-specific tests - OpenJDK 17 -prepare: - how: install - exclude: - - maven-openjdk8 - - maven-openjdk11 -discover: - how: fmf - url: https://pagure.io/javapackages-validator-tests -execute: - how: tmt diff --git a/plans/javapackages-jdk8.fmf b/plans/javapackages-jdk8.fmf deleted file mode 100644 index d35bc4e..0000000 --- a/plans/javapackages-jdk8.fmf +++ /dev/null @@ -1,12 +0,0 @@ -summary: - Run javapackages-specific tests - OpenJDK 8 -prepare: - how: install - exclude: - - maven-openjdk11 - - maven-openjdk17 -discover: - how: fmf - url: https://pagure.io/javapackages-validator-tests -execute: - how: tmt diff --git a/plans/javapackages.fmf b/plans/javapackages.fmf new file mode 100644 index 0000000..fa87577 --- /dev/null +++ b/plans/javapackages.fmf @@ -0,0 +1,29 @@ +discover: + how: fmf + url: https://pagure.io/javapackages-validator-tests +prepare: + how: install + exclude: + - maven-openjdk8 + - maven-openjdk11 + - maven-openjdk17 +execute: + how: tmt + +/jdk8: + summary: Run javapackages-specific tests (OpenJDK 8) + prepare+: + exclude-: + - maven-openjdk8 + +/jdk11: + summary: Run javapackages-specific tests (OpenJDK 11) + prepare+: + exclude-: + - maven-openjdk11 + +/jdk17: + summary: Run javapackages-specific tests (OpenJDK 17) + prepare+: + exclude-: + - maven-openjdk17 diff --git a/plans/smoke-jdk11.fmf b/plans/smoke-jdk11.fmf deleted file mode 100644 index 4ad3c5f..0000000 --- a/plans/smoke-jdk11.fmf +++ /dev/null @@ -1,8 +0,0 @@ -summary: Basic smoke test - OpenJDK 11 -prepare: - how: install - exclude: - - maven-openjdk8 - - maven-openjdk17 -execute: - script: mvn -V dependency:get -Dartifact=junit:junit:4.12 && stat $HOME/.m2/repository/junit/junit/4.12/junit-4.12.jar diff --git a/plans/smoke-jdk17.fmf b/plans/smoke-jdk17.fmf deleted file mode 100644 index 1200458..0000000 --- a/plans/smoke-jdk17.fmf +++ /dev/null @@ -1,8 +0,0 @@ -summary: Basic smoke test - OpenJDK 17 -prepare: - how: install - exclude: - - maven-openjdk8 - - maven-openjdk11 -execute: - script: mvn -V dependency:get -Dartifact=junit:junit:4.12 && stat $HOME/.m2/repository/junit/junit/4.12/junit-4.12.jar diff --git a/plans/smoke-jdk8.fmf b/plans/smoke-jdk8.fmf deleted file mode 100644 index c83338c..0000000 --- a/plans/smoke-jdk8.fmf +++ /dev/null @@ -1,8 +0,0 @@ -summary: Basic smoke test - OpenJDK 8 -prepare: - how: install - exclude: - - maven-openjdk11 - - maven-openjdk17 -execute: - script: mvn -V dependency:get -Dartifact=junit:junit:4.12 && stat $HOME/.m2/repository/junit/junit/4.12/junit-4.12.jar diff --git a/plans/smoke.fmf b/plans/smoke.fmf new file mode 100644 index 0000000..afce0bc --- /dev/null +++ b/plans/smoke.fmf @@ -0,0 +1,25 @@ +summary: Basic smoke test - OpenJDK 8 +prepare: + how: install + exclude: + - maven-openjdk8 + - maven-openjdk11 + - maven-openjdk17 +execute: + script: + - mvn -V dependency:get -Dartifact=junit:junit:4.12 && stat $HOME/.m2/repository/junit/junit/4.12/junit-4.12.jar + +/jdk8: + prepare+: + exclude-: + - maven-openjdk8 + +/jdk11: + prepare+: + exclude-: + - maven-openjdk11 + +/jdk17: + prepare+: + exclude-: + - maven-openjdk17