public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/llvm] main: Add a new test for flang
Date: Wed, 10 Jun 2026 18:13:03 GMT	[thread overview]
Message-ID: <178111518322.1.2292107745345965.tests-llvm-48d9d59fc67c@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/llvm
            Branch : main
            Commit : 48d9d59fc67c495327fce54b0cbebefca183f2b2
            Author : Tulio Magno Quites Machado Filho <tuliom@redhat.com>
            Date   : 2026-06-08T11:02:46-03:00
            Stats  : +41/-0 in 4 file(s)
            URL    : https://src.fedoraproject.org/tests/llvm/c/48d9d59fc67c495327fce54b0cbebefca183f2b2?branch=main

            Log:
            Add a new test for flang

Build and run 2 simple Fortran programs using flang in order to
guarantee we have a flang that does the most basic tasks.

---
diff --git a/tests/flang/hello.f b/tests/flang/hello.f
new file mode 100644
index 0000000..e32b35a
--- /dev/null
+++ b/tests/flang/hello.f
@@ -0,0 +1,3 @@
+      PROGRAM HELLO
+        PRINT '(A)', 'Hello, world'
+      END

diff --git a/tests/flang/main.fmf b/tests/flang/main.fmf
new file mode 100644
index 0000000..85895d6
--- /dev/null
+++ b/tests/flang/main.fmf
@@ -0,0 +1,20 @@
+summary: Run simple tests for flang
+
+tag+:
+  - fedora-only
+
+adjust+:
+  - because: "flang is available for Fedora, not RHEL/CentOS"
+    when: >-
+      distro == rhel
+      or distro == centos
+    enabled: false
+
+  - because: "flang is not built for compat packages"
+    enabled: false
+    when: compat is defined
+
+require+:
+  - flang
+  - llvm-devel
+duration: 1h

diff --git a/tests/flang/sin.f90 b/tests/flang/sin.f90
new file mode 100644
index 0000000..ba091b0
--- /dev/null
+++ b/tests/flang/sin.f90
@@ -0,0 +1,5 @@
+program sin
+    real :: pi
+    pi = 4*atan(1.0)
+    print *, sin(pi/2)
+end program

diff --git a/tests/flang/test.sh b/tests/flang/test.sh
new file mode 100755
index 0000000..6b29663
--- /dev/null
+++ b/tests/flang/test.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/bash
+# Compile and run simple Fortran programs in order to evaluate if Flang is
+# minimally funcional.
+
+set -e
+
+flang hello.f -o hello
+./hello | grep -q "Hello, world"
+rm hello
+
+flang sin.f90 -o sin
+./sin | grep -q "1."
+rm sin

                 reply	other threads:[~2026-06-10 18:13 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=178111518322.1.2292107745345965.tests-llvm-48d9d59fc67c@fedoraproject.org \
    --to=tuliom@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