From 048eb66cf04ffefa46c38c462b58b42fef622449 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 20 Dec 2022 11:05:38 +0100 Subject: [PATCH] Add test for ucrt64 toolchain detection on fedora --- ucrt64-toolchain/main.fmf | 12 ++++++++++++ ucrt64-toolchain/runtest.sh | 4 ++++ ucrt64-toolchain/test.cpp | 6 ++++++ 3 files changed, 22 insertions(+) create mode 100644 ucrt64-toolchain/main.fmf create mode 100755 ucrt64-toolchain/runtest.sh create mode 100644 ucrt64-toolchain/test.cpp diff --git a/ucrt64-toolchain/main.fmf b/ucrt64-toolchain/main.fmf new file mode 100644 index 0000000..bd31699 --- /dev/null +++ b/ucrt64-toolchain/main.fmf @@ -0,0 +1,12 @@ +summary: Test that ucrt64 toolchain is detected +test: ./runtest.sh +component: + - clang +require: + - clang + - ucrt64-gcc-c++ + +adjust: + - enabled: false + when: distro != fedora or distro < fedora-37 + because: "The ucrt64 toolchain is only available since Fedora 37" diff --git a/ucrt64-toolchain/runtest.sh b/ucrt64-toolchain/runtest.sh new file mode 100755 index 0000000..2b3f166 --- /dev/null +++ b/ucrt64-toolchain/runtest.sh @@ -0,0 +1,4 @@ +set -eux + +clang++ --target=x86_64-windows-gnu test.cpp +file a.exe | grep "PE32+ executable (console) x86-64, for MS Windows" diff --git a/ucrt64-toolchain/test.cpp b/ucrt64-toolchain/test.cpp new file mode 100644 index 0000000..9c6f43b --- /dev/null +++ b/ucrt64-toolchain/test.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + std::cout << "Hello world" << std::endl; + return 0; +}