From 9785cc8667e12ba1253524e369b54eb785f4d36f Mon Sep 17 00:00:00 2001 From: Michal Fabik Date: Thu, 4 Mar 2021 14:48:55 +0100 Subject: [PATCH] Add simple smoke test Build and execute a minimal program using the libreport library --- .fmf/version | 1 + gating.yaml | 2 ++ tests/smoke.fmf | 7 +++++++ tests/smoke.sh | 5 +++++ 4 files changed, 15 insertions(+) create mode 100644 .fmf/version create mode 100644 tests/smoke.fmf create mode 100755 tests/smoke.sh 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/gating.yaml b/gating.yaml index de03204..9ca798d 100644 --- a/gating.yaml +++ b/gating.yaml @@ -7,6 +7,7 @@ rules: - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} --- !Policy product_versions: @@ -17,4 +18,5 @@ rules: - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/tests/smoke.fmf b/tests/smoke.fmf new file mode 100644 index 0000000..c043228 --- /dev/null +++ b/tests/smoke.fmf @@ -0,0 +1,7 @@ +summary: Basic smoke test for libreport +require: gcc +execute: + script: | + test/smoke.sh + report-cli --version + diff --git a/tests/smoke.sh b/tests/smoke.sh new file mode 100755 index 0000000..49f2b53 --- /dev/null +++ b/tests/smoke.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash + +echo "int main(){libreport_init();}" | gcc -x c -lreport -Wno-implicit-function-declaration - +./a.out +rm -f a.out