From 12449feb0b40e25c35823b05a5e39bf66b3abdf6 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Fri, 17 Mar 2023 14:33:23 +0100 Subject: [PATCH] Add smoke tests, enable JPV tests --- .fmf/version | 1 + ci.fmf | 1 + gating.yaml | 9 +++++++++ plans/Smoke.java | 15 +++++++++++++++ plans/javapackages.fmf | 7 +++++++ plans/smoke.fmf | 17 +++++++++++++++++ 6 files changed, 50 insertions(+) create mode 100644 .fmf/version create mode 100644 ci.fmf create mode 100644 gating.yaml create mode 100644 plans/Smoke.java create mode 100644 plans/javapackages.fmf create mode 100644 plans/smoke.fmf 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 new file mode 100644 index 0000000..7b6e38f --- /dev/null +++ b/gating.yaml @@ -0,0 +1,9 @@ +--- !Policy +product_versions: + - fedora-* +decision_contexts: + - bodhi_update_push_testing + - bodhi_update_push_stable +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages.functional} diff --git a/plans/Smoke.java b/plans/Smoke.java new file mode 100644 index 0000000..4762ea3 --- /dev/null +++ b/plans/Smoke.java @@ -0,0 +1,15 @@ +import com.sun.xml.dtdparser.DTDEventListener; +import com.sun.xml.dtdparser.DTDHandlerBase; +import com.sun.xml.dtdparser.DTDParser; +import com.sun.xml.dtdparser.InputEntity; + +public class Smoke +{ + public static void main(String[] args) + { + System.out.println(DTDEventListener.class.getCanonicalName()); + System.out.println(DTDHandlerBase.class.getCanonicalName()); + System.out.println(DTDParser.class.getCanonicalName()); + System.out.println(InputEntity.class.getCanonicalName()); + } +} diff --git a/plans/javapackages.fmf b/plans/javapackages.fmf new file mode 100644 index 0000000..0cbb629 --- /dev/null +++ b/plans/javapackages.fmf @@ -0,0 +1,7 @@ +summary: Run javapackages-specific tests +discover: + how: fmf + url: https://src.fedoraproject.org/tests/javapackages + ref: f39 +execute: + how: tmt diff --git a/plans/smoke.fmf b/plans/smoke.fmf new file mode 100644 index 0000000..b6f90d0 --- /dev/null +++ b/plans/smoke.fmf @@ -0,0 +1,17 @@ +summary: Basic smoke test +prepare: + how: install + package: + - java-11-openjdk-devel + - xmvn-tools +discover: + how: shell + tests: + - name: /smoke/classpath-import + test: | + CLASSPATH+=":$(xmvn-resolve com.sun.xml.dtd-parser:dtd-parser)" + export CLASSPATH + /usr/lib/jvm/java-11-openjdk/bin/javac plans/Smoke.java + /usr/lib/jvm/java-11-openjdk/bin/java -cp "${CLASSPATH}:plans" Smoke +execute: + how: tmt