From 13c1c0c519fd78ced17f790149f5c050015dce45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 19 Dec 2022 15:06:03 +0100 Subject: [PATCH] CI tests: Assert rpmlint's python-bytecode-inconsistent-mtime is not happening --- tests/pythontest.spec | 2 +- tests/tests.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/pythontest.spec b/tests/pythontest.spec index 50c136a..32bb039 100644 --- a/tests/pythontest.spec +++ b/tests/pythontest.spec @@ -7,7 +7,7 @@ Name: pythontest Version: 0 -Release: 0 +Release: 0%{?dist} Summary: ... License: MIT BuildRequires: python3-devel diff --git a/tests/tests.yml b/tests/tests.yml index ac03d2e..4b8b2dd 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -18,12 +18,19 @@ run: PYTHONPATH=/usr/lib/rpm/redhat ALTERNATE_PYTHON_VERSION=3.6 pytest -v - manual_byte_compilation_clamp_mtime_off: dir: . - run: rpmbuild --define 'clamp_mtime_to_source_date_epoch 0' -ba pythontest.spec + run: rpmbuild --define 'dist .clamp0' --define 'clamp_mtime_to_source_date_epoch 0' -ba pythontest.spec - manual_byte_compilation_clamp_mtime_on: dir: . - run: rpmbuild --define 'clamp_mtime_to_source_date_epoch 1' -ba pythontest.spec + run: rpmbuild --define 'dist .clamp1' --define 'clamp_mtime_to_source_date_epoch 1' -ba pythontest.spec + - rpmlint_clamp_mtime_off: + dir: . + run: rpmlint ~/rpmbuild/RPMS/x86_64/pythontest-0-0.clamp0.x86_64.rpm | grep python-bytecode-inconsistent-mtime || exit 0 && exit 1 + - rpmlint_clamp_mtime_on: + dir: . + run: rpmlint ~/rpmbuild/RPMS/x86_64/pythontest-0-0.clamp1.x86_64.rpm | grep python-bytecode-inconsistent-mtime || exit 0 && exit 1 required_packages: - rpm-build + - rpmlint - python-rpm-macros - python3-rpm-macros - python3-devel