Notification time stamped 2022-02-22 09:30:42 UTC
From 582e8ec166fa5a23a4fdd911e5c9d7a318343173 Mon Sep 17 00:00:00 2001
From: Michal Srb <michal(a)redhat.com>
Date: Feb 22 2022 09:11:26 +0000
Subject: Backport tests
Signed-off-by: Michal Srb <michal(a)redhat.com>
---
diff --git a/tests/library-smoke.sh b/tests/library-smoke.sh
new file mode 100755
index 0000000..ed1322f
--- /dev/null
+++ b/tests/library-smoke.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/bash
+
+gcc -x c -o smoke_test -lreport -Wno-implicit-function-declaration - <<EOF
+#include <stdio.h>
+int main(void) {
+ libreport_init();
+ printf("libreport initialized OK\n");
+ return 0;
+}
+EOF
+./smoke_test
diff --git a/tests/smoke.fmf b/tests/smoke.fmf
index c043228..e872709 100644
--- a/tests/smoke.fmf
+++ b/tests/smoke.fmf
@@ -1,7 +1,15 @@
summary: Basic smoke test for libreport
-require: gcc
+prepare:
+ how: install
+ # Do not attempt to install conflicting subpackages.
+ exclude:
+ - abrt-atomic
+ - abrt-java-connector-container
+ - python3-abrt-container-addon
+ # Prerequisite for smoke testing liblibreport.
+ package:
+ - gcc
execute:
script: |
- test/smoke.sh
+ tests/library-smoke.sh
report-cli --version
-
diff --git a/tests/smoke.sh b/tests/smoke.sh
deleted file mode 100755
index 49f2b53..0000000
--- a/tests/smoke.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/bash
-
-echo "int main(){libreport_init();}" | gcc -x c -lreport
-Wno-implicit-function-declaration -
-./a.out
-rm -f a.out
https://src.fedoraproject.org/rpms/libreport/c/582e8ec166fa5a23a4fdd911e5...