Convert tests to TMT

Apart from the expected Makefile -> main.fmf conversion, this also does
a couple more tweaks to make the tests pass in CI, namely:
  - adds a missing bzip2 dependency
  - the msi/msp/mst tests from file-tests are timezone-dependent, so the
    reference timestamps were adjusted for the UTC timezone (used in
    CIs); not sure if there's any nicer way to tell file to always
    assume UTC when generating the timestamps without touching timezone
    data on the test machine itself
This commit is contained in:
Frantisek Sumsal 2024-11-27 15:25:22 +01:00
parent ff838f9ddc
commit 8d1b9f8cbe
11 changed files with 48 additions and 24 deletions

View File

@ -0,0 +1,17 @@
summary: Support local additions to magic files
description: |+
Testing custom additions in
/etc/magic
$HOME/.magic
$HOME/.magic.mgc
contact: Karel Srot <ksrot@redhat.com>
component:
- file
test: ./runtest.sh
framework: beakerlib
recommend:
- file
duration: 5m
extra-summary: Support-local-additions-to-magic-files
extra-task: Support-local-additions-to-magic-files

View File

@ -27,7 +27,6 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh
. /usr/share/beakerlib/beakerlib.sh
PACKAGE="file"

View File

@ -54,7 +54,7 @@ $(METADATA): Makefile
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: file zlib" >> $(METADATA)
@echo "Requires: file" >> $(METADATA)
@echo "Requires: file bzip2" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)

View File

@ -0,0 +1,15 @@
summary: Tests (most of) command line options available for the file command.
description: |
test multiple cmd line options
contact: Karel Srot <ksrot@redhat.com>
component:
- file
- zlib
test: ./runtest.sh
framework: beakerlib
recommend:
- bzip2
- file
duration: 10m
extra-summary: /CoreOS/file/Sanity/command-line-options
extra-task: /CoreOS/file/Sanity/command-line-options

View File

@ -27,7 +27,6 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include rhts environment
. /usr/bin/rhts-environment.sh
. /usr/share/beakerlib/beakerlib.sh
PACKAGE="file"

11
tests/file-tests/main.fmf Normal file
View File

@ -0,0 +1,11 @@
summary: File regressions detection tests from github.com:file/file-tests.git
contact: Jan Kaluza <jkaluza@redhat.com>
component:
- file
test: ./runtest.sh
framework: beakerlib
recommend:
- file
duration: 20m
extra-summary: file-tests
extra-task: file-tests

View File

@ -1 +1 @@
Composite Document File V2 Document Little Endian Os: Windows Version 5.1 MSI Installer Code page: 1252 Title: Installation Database Subject: Acme's Foobar 1.0 Installer Author: file-test creator Keywords: Installer Comments: created following http://wix.tramontana.co.hu/tutorial Template: Intel;1033 Revision Number: {F6B1C691-4136-4489-AD6A-DFE142735E4B} Create Time/Date: Mon Mar 24 12:00:28 2014 Last Saved Time/Date: Mon Mar 24 12:00:28 2014 Number of Pages: 100 Number of Words: 2 Name of Creating Application: Windows Installer XML Toolset (3.8.1128.0) Security: 2
Composite Document File V2 Document Little Endian Os: Windows Version 5.1 MSI Installer Code page: 1252 Title: Installation Database Subject: Acme's Foobar 1.0 Installer Author: file-test creator Keywords: Installer Comments: created following http://wix.tramontana.co.hu/tutorial Template: Intel;1033 Revision Number: {F6B1C691-4136-4489-AD6A-DFE142735E4B} Create Time/Date: Mon Mar 24 11:00:28 2014 Last Saved Time/Date: Mon Mar 24 11:00:28 2014 Number of Pages: 100 Number of Words: 2 Name of Creating Application: Windows Installer XML Toolset (3.8.1128.0) Security: 2

View File

@ -1 +1 @@
Composite Document File V2 Document Little Endian Os: Windows Version 5.1 Code page: 1252 Title: Installation Database Subject: Acme's Foobar 1.0 Installer Author: Acme Ltd. Keywords: Installer Comments: Foobar is a registered trademark of Acme Ltd. Create Time/Date: Mon Mar 24 12:33:32 2014 Name of Creating Application: Windows Installer XML Toolset (3.8.1128.0) Security: 4 Template: Intel;1033 Last Saved By: Intel;1033 Revision Number: {3D9F6ADC-CBB9-4EE4-949F-CA8BCFDB8255}1.0.0;{3D9F6ADC-CBB9-4EE4-949F-CA8BCFDB8255}1.0.0;{11799D66-3206-495E-AA87-901734ECDAEA} Number of Pages: 100 Number of Characters: 153223199
Composite Document File V2 Document Little Endian Os: Windows Version 5.1 Code page: 1252 Title: Installation Database Subject: Acme's Foobar 1.0 Installer Author: Acme Ltd. Keywords: Installer Comments: Foobar is a registered trademark of Acme Ltd. Create Time/Date: Mon Mar 24 11:33:32 2014 Name of Creating Application: Windows Installer XML Toolset (3.8.1128.0) Security: 4 Template: Intel;1033 Last Saved By: Intel;1033 Revision Number: {3D9F6ADC-CBB9-4EE4-949F-CA8BCFDB8255}1.0.0;{3D9F6ADC-CBB9-4EE4-949F-CA8BCFDB8255}1.0.0;{11799D66-3206-495E-AA87-901734ECDAEA} Number of Pages: 100 Number of Characters: 153223199

View File

@ -1 +1 @@
Composite Document File V2 Document Little Endian Os: Windows Version 5.1 Code page: 1250 Title: Installation Database Subject: Acme's Foobar 1.0 Installer Author: Acme Ltd. Keywords: Installer Comments: Foobar is a registered trademark of Acme Ltd. Create Time/Date: Mon Mar 24 13:02:34 2014 Name of Creating Application: Windows Installer XML Toolset (3.8.1128.0) Security: 4 Template: Intel;1033 Last Saved By: Intel;1033 Revision Number: {26FB1AB6-7195-4B92-9751-F1B6226CBA34}1.0.0;{26FB1AB6-7195-4B92-9751-F1B6226CBA34}1.0.0;{3F2782EF-47A2-4602-B6B4-4ECD17E98294} Number of Pages: 100 Number of Characters: 131135
Composite Document File V2 Document Little Endian Os: Windows Version 5.1 Code page: 1250 Title: Installation Database Subject: Acme's Foobar 1.0 Installer Author: Acme Ltd. Keywords: Installer Comments: Foobar is a registered trademark of Acme Ltd. Create Time/Date: Mon Mar 24 12:02:34 2014 Name of Creating Application: Windows Installer XML Toolset (3.8.1128.0) Security: 4 Template: Intel;1033 Last Saved By: Intel;1033 Revision Number: {26FB1AB6-7195-4B92-9751-F1B6226CBA34}1.0.0;{26FB1AB6-7195-4B92-9751-F1B6226CBA34}1.0.0;{3F2782EF-47A2-4602-B6B4-4ECD17E98294} Number of Pages: 100 Number of Characters: 131135

View File

@ -13,7 +13,6 @@ done
cd ..
. /usr/bin/rhts-environment.sh
. /usr/share/beakerlib/beakerlib.sh
PACKAGE="file"
@ -762,4 +761,4 @@ rlJournalStart
rlJournalPrintText
rlJournalEnd
rm -rf tmp
rm -rf tmp

View File

@ -1,16 +0,0 @@
---
# This first play always runs on the local staging system
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
- container
- atomic
tests:
- Support-local-additions-to-magic-files
- command-line-options
- file-tests
required_packages:
- file # file package required for both tests
- bzip2 # bunzip2 command required for cmd-line-options test