From cf65faed468d0cb45d383bb9ccef466e08b7810e Mon Sep 17 00:00:00 2001 From: Zdenek Veleba Date: Mon, 8 Apr 2019 07:47:42 +0000 Subject: [PATCH 1/2] Add gating test Resolves: rhbz#1682904 Signed-off-by: Peter Jones --- gating.yaml | 6 ++++ tests/macros.efi-srpm_test.sh | 58 +++++++++++++++++++++++++++++++++++ tests/test.spec | 22 +++++++++++++ tests/tests.yml | 12 ++++++++ 4 files changed, 98 insertions(+) create mode 100644 gating.yaml create mode 100644 tests/macros.efi-srpm_test.sh create mode 100644 tests/test.spec create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..6985029 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/macros.efi-srpm_test.sh b/tests/macros.efi-srpm_test.sh new file mode 100644 index 0000000..7875cea --- /dev/null +++ b/tests/macros.efi-srpm_test.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# exit when any command fails +set -e + +declare -A archs +archs[ia64]="efi_alt_arch=none + efi_alt_arch_upper=NONE + efi_arch=ia64 + efi_arch_upper=IA64 + efi_has_alt_arch=00 + efi_has_arch=01" +archs[x86_64]="efi_alt_arch=ia32 + efi_alt_arch_upper=IA32 + efi_arch=x64 + efi_arch_upper=X64 + efi_has_alt_arch=01 + efi_has_arch=01" +archs["%{ix86}"]="efi_alt_arch=none + efi_alt_arch_upper=NONE + efi_arch=ia32 + efi_arch_upper=IA32 + efi_has_alt_arch=00 + efi_has_arch=01" +archs[aarch64]="efi_alt_arch=none + efi_alt_arch_upper=NONE + efi_arch=aa64 + efi_arch_upper=AA64 + efi_has_alt_arch=00 + efi_has_arch=01" +archs["%{arm}"]="efi_alt_arch=none + efi_alt_arch_upper=NONE + efi_arch=arm + efi_arch_upper=ARM + efi_has_alt_arch=00 + efi_has_arch=01" + +common="efi_esp_boot=/boot/efi/EFI/BOOT + efi_esp_dir=/boot/efi/EFI/redhat + efi_esp_efi=/boot/efi/EFI + efi_esp_root=/boot/efi + efi_vendor=redhat" + +output=$(mktemp) + +for arch in "${!archs[@]}"; do + echo "Testing ${arch}" + rpmbuild -bp --target ${arch}-redhat-linux test.spec \ + | grep -A12 %prep > $output + + for item in ${archs[$arch]}; do + grep ^$item $output + done + for item in ${common}; do + grep ^$item $output + done + echo "" +done diff --git a/tests/test.spec b/tests/test.spec new file mode 100644 index 0000000..c649d9a --- /dev/null +++ b/tests/test.spec @@ -0,0 +1,22 @@ +Name: test +Version: 1 +Release: 1%{?dist} +Summary: test +License: None + +%description +None + +%prep +echo efi_alt_arch=%{efi_alt_arch} +echo efi_alt_arch_upper=%{efi_alt_arch_upper} +echo efi_arch=%{efi_arch} +echo efi_arch_upper=%{efi_arch_upper} +echo efi_esp_boot=%{efi_esp_boot} +echo efi_esp_dir=%{efi_esp_dir} +echo efi_esp_efi=%{efi_esp_efi} +echo efi_esp_root=%{efi_esp_root} +echo efi_has_alt_arch=%{efi_has_alt_arch} +echo efi_has_arch=%{efi_has_arch} +echo efi_srpm_macros_version=%{efi_srpm_macros_version} +echo efi_vendor=%{efi_vendor} diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..c943904 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +--- +- hosts: all + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - rpm-build + tests: + - rpm-macros: + dir: . + run: ./macros.efi-srpm_test.sh From c6c4986b11be139659483b03aad82125a94bf54a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 23:13:27 +0000 Subject: [PATCH 2/2] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- efi-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/efi-rpm-macros.spec b/efi-rpm-macros.spec index 05871bc..716f9e7 100644 --- a/efi-rpm-macros.spec +++ b/efi-rpm-macros.spec @@ -1,7 +1,7 @@ Summary: Common RPM Macros for building EFI-related packages Name: efi-rpm-macros Version: 4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ URL: https://github.com/rhboot/%{name}/ BuildRequires: git sed @@ -65,6 +65,9 @@ git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}" %dir /boot/efi/EFI/%{_efi_vendor_} %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu Jan 31 2019 Fedora Release Engineering - 4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild