From 3145421d1f23d3157ef45fa647f41c3cd1d211bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Fri, 7 Apr 2023 10:50:13 +0200 Subject: [PATCH] Support Collection GCC in the all_tests plan Take care of installing the respective Collection and enabling it in runtime. Notes: 1. The script taking care of the installation part is missing. It's not relevant in Fedora anyway. I'll handle it later when needed for RHEL. 2. Getting the actual Collection from TMT context and using it (e.g. setting the WITH_SCL variable) isn't pretty. Unfortunately TMT allows using Context only in conditions, so... :-( --- plans/all_tests.fmf | 47 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/plans/all_tests.fmf b/plans/all_tests.fmf index 9eed518..dba197b 100644 --- a/plans/all_tests.fmf +++ b/plans/all_tests.fmf @@ -4,8 +4,45 @@ discover: execute: how: tmt adjust: - prepare+: - - name: Add secondary architecture RPMs - how: shell - script: ./plans/provide_secondary_arch_rpms.sh - when: distro == fedora and arch == x86_64 + - prepare+: + - name: Add secondary architecture RPMs + how: shell + script: ./plans/provide_secondary_arch_rpms.sh + when: distro == fedora and arch == x86_64 + - environment+: + COLLECTIONS: devtoolset-11 + WITH_SCL: "scl enable devtoolset-11" + when: collection == devtoolset-11 + - environment+: + COLLECTIONS: devtoolset-12 + WITH_SCL: "scl enable devtoolset-12" + when: collection == devtoolset-12 + - environment+: + COLLECTIONS: devtoolset-13 + WITH_SCL: "scl enable devtoolset-12" + when: collection == devtoolset-13 + - environment+: + COLLECTIONS: gcc-toolset-11 + WITH_SCL: "scl enable gcc-toolset-11" + when: collection == gcc-toolset-11 + - environment+: + COLLECTIONS: gcc-toolset-12 + WITH_SCL: "scl enable gcc-toolset-12" + when: collection == gcc-toolset-12 + - environment+: + COLLECTIONS: gcc-toolset-13 + WITH_SCL: "scl enable gcc-toolset-13" + when: collection == gcc-toolset-13 + - environment+: + COLLECTIONS: gcc-toolset-14 + WITH_SCL: "scl enable gcc-toolset-14" + when: collection == gcc-toolset-14 + - environment+: + COLLECTIONS: gcc-toolset-15 + WITH_SCL: "scl enable gcc-toolset-15" + when: collection == gcc-toolset-15 + - prepare+: + - name: Install Collection gcc + how: shell + script: ./plans/install_toolset.sh + when: distro != fedora and collection is defined