public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Aleksandra Fedorova <afedorova@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gcc] rhel-f41-base: Build both C an C++ hello world programs as integration test
Date: Mon, 29 Jun 2026 12:28:49 GMT [thread overview]
Message-ID: <178273612995.1.4623399999382529325.rpms-gcc-d6a2f172d658@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gcc
Branch : rhel-f41-base
Commit : d6a2f172d658927a1f21b6111d490cf2a4fb773d
Author : Aleksandra Fedorova <afedorova@redhat.com>
Date : 2020-08-03T12:58:11+00:00
Stats : +33/-0 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/gcc/c/d6a2f172d658927a1f21b6111d490cf2a4fb773d?branch=rhel-f41-base
Log:
Build both C an C++ hello world programs as integration test
Add simple test which builds Hello World programs for both C and C++.
Build options provided by default rpm macro.
Based on
https://github.com/CentOS/sig-core-t_functional/tree/master/tests/p_annobin
Gating is not enabled yet, so the test will not be blocking.
---
diff --git a/tests/build_hello_world.sh b/tests/build_hello_world.sh
new file mode 100755
index 0000000..f6aae70
--- /dev/null
+++ b/tests/build_hello_world.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -ex
+
+gcc -x c $(rpm --eval %build_cflags) data/hello.c -o hello_c.out
+./hello_c.out | grep -q "Hello World"
+
+g++ -x c++ $(rpm --eval %build_cxxflags) data/hello.cpp -o hello_cpp.out
+./hello_cpp.out | grep -q "Hello World"
diff --git a/tests/data/hello.c b/tests/data/hello.c
new file mode 100644
index 0000000..fe064a2
--- /dev/null
+++ b/tests/data/hello.c
@@ -0,0 +1,5 @@
+#include <stdio.h>
+int main() {
+ printf("Hello World!\n");
+ return 0;
+}
diff --git a/tests/data/hello.cpp b/tests/data/hello.cpp
new file mode 100644
index 0000000..2131d8a
--- /dev/null
+++ b/tests/data/hello.cpp
@@ -0,0 +1,5 @@
+#include <iostream>
+int main() {
+ std::cout << "Hello World!\n";
+ return 0;
+}
diff --git a/tests/tests.yml b/tests/tests.yml
new file mode 100644
index 0000000..dfe09e0
--- /dev/null
+++ b/tests/tests.yml
@@ -0,0 +1,14 @@
+- hosts: localhost
+ roles:
+ - role: standard-test-basic
+ tags:
+ - classic
+
+ required_packages:
+ - redhat-rpm-config
+ - annobin
+
+ tests:
+ - build_hello_world:
+ dir: .
+ run: "./build_hello_world.sh"
reply other threads:[~2026-06-29 12:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178273612995.1.4623399999382529325.rpms-gcc-d6a2f172d658@fedoraproject.org \
--to=afedorova@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox