tests: port tests to tmt
In this commit we:
1. Use `tmt tests import` to gather all related
metadata from tests/Support-local-additions-to-magic-files
and tests/command-line-options directories and
convert them into tmt format.
2. Add missing requirement for bzip2 in
tests/command-line-options/{Makefile,main.fmf}
files.
3. Replace an obsolescent `egrep` with a `grep -E`
command in the tests/command-line-options/runtest.sh
file.
4. Create new tests/file-tests/Makefile file.
5. Use `tmt tests import` to convert the
tests/file-tests and all related
metadata into tmt format.
6. Simplify and update tests/file-tests/{prepare.sh,
runtest.sh,reference.sh,readfile.py} scripts.
Thank you lzaoral!
7. Update and create new "references" (file-5.42.4 outputs)
in the file-tests/reference.
8. Rename the file-tests/blacklist.txt to
file-tests/blocklist.txt.
9. Replace the tests/tests.yml file with
the plans/file-CI-plan.fmf file.
This commit is contained in:
parent
64e7e54de2
commit
2dd88dfd9f
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
5
plans/file-CI-plan.fmf
Normal file
5
plans/file-CI-plan.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: fedora CI tests plan
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
17
tests/Support-local-additions-to-magic-files/main.fmf
Normal file
17
tests/Support-local-additions-to-magic-files/main.fmf
Normal 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
|
||||
@ -27,7 +27,6 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/bin/rhts-environment.sh
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
PACKAGE="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)
|
||||
|
||||
15
tests/command-line-options/main.fmf
Normal file
15
tests/command-line-options/main.fmf
Normal 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
|
||||
@ -27,7 +27,6 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include rhts environment
|
||||
. /usr/bin/rhts-environment.sh
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
PACKAGE="file"
|
||||
@ -117,8 +116,8 @@ rlJournalStart
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "--version"
|
||||
rlRun "file -v 2>&1 | egrep 'file-[[:digit:]]\.[[:digit:]]'" 0 "Checking -v"
|
||||
rlRun "file --version 2>&1 | egrep 'file-[[:digit:]]\.[[:digit:]]'" 0 "Checking --version"
|
||||
rlRun "file -v 2>&1 | grep -E 'file-[[:digit:]]\.[[:digit:]]'" 0 "Checking -v"
|
||||
rlRun "file --version 2>&1 | grep -E 'file-[[:digit:]]\.[[:digit:]]'" 0 "Checking --version"
|
||||
rlPhaseEnd
|
||||
|
||||
if ! rlIsRHEL 4; then # not for RHEL4 - this will never be fixed
|
||||
|
||||
63
tests/file-tests/Makefile
Normal file
63
tests/file-tests/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of file-tests
|
||||
# Description: File regressions detection tests from github.com:file/file-tests.git
|
||||
# Author: Jan Kaluza <jkaluza@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2023 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=file-tests
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) blocklist.txt db main.fmf Makefile prepare.sh readfile.py README reference reference.sh runtest.sh
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
test -x runtest.sh || chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Jan Kaluza <jkaluza@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: File regressions detection tests from github.com:file/file-tests.git" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 20m" >> $(METADATA)
|
||||
@echo "RunFor: file" >> $(METADATA)
|
||||
@echo "Requires: file" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
||||
@ -1,3 +1,3 @@
|
||||
./prepare.sh
|
||||
./reference.sh [--mime-type]
|
||||
./runtest.sh [--mime-type]
|
||||
./runtest.sh [--mime-type]
|
||||
|
||||
@ -9,6 +9,7 @@ elf/pie.out
|
||||
img/qcow2.img
|
||||
jpg/xsane-zoom-in.jpg
|
||||
lnk/windows_link.lnk
|
||||
mach-o/PythonLauncher
|
||||
pbm/icontopbm-back-from-icon.pbm
|
||||
so/libaio.so
|
||||
tar.gz/a.tar.gz
|
||||
@ -16,4 +17,4 @@ tgz/broken-file.tgz
|
||||
webm/bunny.webm
|
||||
xls/encrypted.xls
|
||||
xls/excel-file.xls
|
||||
xps/presentation.xps
|
||||
xps/presentation.xps
|
||||
BIN
tests/file-tests/db/bmp/4x2x24-win3.bmp
Normal file
BIN
tests/file-tests/db/bmp/4x2x24-win3.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 B |
2
tests/file-tests/db/bmp/4x2x24-win3.bmp.source.txt
Normal file
2
tests/file-tests/db/bmp/4x2x24-win3.bmp.source.txt
Normal file
@ -0,0 +1,2 @@
|
||||
AUTHOR: Joerg Jenderek <joerg.jen.der.ek@gmx.net>
|
||||
LICENSE: BSD
|
||||
BIN
tests/file-tests/db/bmp/4x2x32-win95.bmp
Normal file
BIN
tests/file-tests/db/bmp/4x2x32-win95.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 B |
2
tests/file-tests/db/bmp/4x2x32-win95.bmp.source.txt
Normal file
2
tests/file-tests/db/bmp/4x2x32-win95.bmp.source.txt
Normal file
@ -0,0 +1,2 @@
|
||||
AUTHOR: Joerg Jenderek <joerg.jen.der.ek@gmx.net>
|
||||
LICENSE: BSD
|
||||
BIN
tests/file-tests/db/bmp/4x2x32-win98.bmp
Normal file
BIN
tests/file-tests/db/bmp/4x2x32-win98.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 170 B |
2
tests/file-tests/db/bmp/4x2x32-win98.bmp.source.txt
Normal file
2
tests/file-tests/db/bmp/4x2x32-win98.bmp.source.txt
Normal file
@ -0,0 +1,2 @@
|
||||
AUTHOR: Joerg Jenderek <joerg.jen.der.ek@gmx.net>
|
||||
LICENSE: BSD
|
||||
BIN
tests/file-tests/db/img/qcow2_v2.qcow2
Normal file
BIN
tests/file-tests/db/img/qcow2_v2.qcow2
Normal file
Binary file not shown.
3
tests/file-tests/db/img/qcow2_v2.qcow2.source.txt
Normal file
3
tests/file-tests/db/img/qcow2_v2.qcow2.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/img/qcow2_v3.qcow2
Normal file
BIN
tests/file-tests/db/img/qcow2_v3.qcow2
Normal file
Binary file not shown.
3
tests/file-tests/db/img/qcow2_v3.qcow2.source.txt
Normal file
3
tests/file-tests/db/img/qcow2_v3.qcow2.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/img/qcow_v1.qcow
Normal file
BIN
tests/file-tests/db/img/qcow_v1.qcow
Normal file
Binary file not shown.
3
tests/file-tests/db/img/qcow_v1.qcow.source.txt
Normal file
3
tests/file-tests/db/img/qcow_v1.qcow.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
1
tests/file-tests/db/json/1.json-keep
Normal file
1
tests/file-tests/db/json/1.json-keep
Normal file
@ -0,0 +1 @@
|
||||
{}
|
||||
1
tests/file-tests/db/json/2.json-keep
Normal file
1
tests/file-tests/db/json/2.json-keep
Normal file
@ -0,0 +1 @@
|
||||
{"foo": {}}
|
||||
1
tests/file-tests/db/json/3.json-keep
Normal file
1
tests/file-tests/db/json/3.json-keep
Normal file
@ -0,0 +1 @@
|
||||
{"foo": []}
|
||||
1
tests/file-tests/db/json/4.json-keep
Normal file
1
tests/file-tests/db/json/4.json-keep
Normal file
@ -0,0 +1 @@
|
||||
["foo", "bar", {}]
|
||||
1
tests/file-tests/db/json/5.json-keep
Normal file
1
tests/file-tests/db/json/5.json-keep
Normal file
@ -0,0 +1 @@
|
||||
["foo"]
|
||||
BIN
tests/file-tests/db/locale/LC_ADDRESS
Normal file
BIN
tests/file-tests/db/locale/LC_ADDRESS
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_ADDRESS.source.txt
Normal file
3
tests/file-tests/db/locale/LC_ADDRESS.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_COLLATE
Normal file
BIN
tests/file-tests/db/locale/LC_COLLATE
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_COLLATE.source.txt
Normal file
3
tests/file-tests/db/locale/LC_COLLATE.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_CTYPE
Normal file
BIN
tests/file-tests/db/locale/LC_CTYPE
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_CTYPE.source.txt
Normal file
3
tests/file-tests/db/locale/LC_CTYPE.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_IDENTIFICATION
Normal file
BIN
tests/file-tests/db/locale/LC_IDENTIFICATION
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_IDENTIFICATION.source.txt
Normal file
3
tests/file-tests/db/locale/LC_IDENTIFICATION.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_MEASUREMENT
Normal file
BIN
tests/file-tests/db/locale/LC_MEASUREMENT
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_MEASUREMENT.source.txt
Normal file
3
tests/file-tests/db/locale/LC_MEASUREMENT.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_MONETARY
Normal file
BIN
tests/file-tests/db/locale/LC_MONETARY
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_MONETARY.source.txt
Normal file
3
tests/file-tests/db/locale/LC_MONETARY.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_NAME
Normal file
BIN
tests/file-tests/db/locale/LC_NAME
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_NAME.source.txt
Normal file
3
tests/file-tests/db/locale/LC_NAME.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_NUMERIC
Normal file
BIN
tests/file-tests/db/locale/LC_NUMERIC
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_NUMERIC.source.txt
Normal file
3
tests/file-tests/db/locale/LC_NUMERIC.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_PAPER
Normal file
BIN
tests/file-tests/db/locale/LC_PAPER
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_PAPER.source.txt
Normal file
3
tests/file-tests/db/locale/LC_PAPER.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_TELEPHONE
Normal file
BIN
tests/file-tests/db/locale/LC_TELEPHONE
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_TELEPHONE.source.txt
Normal file
3
tests/file-tests/db/locale/LC_TELEPHONE.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/locale/LC_TIME
Normal file
BIN
tests/file-tests/db/locale/LC_TIME
Normal file
Binary file not shown.
3
tests/file-tests/db/locale/LC_TIME.source.txt
Normal file
3
tests/file-tests/db/locale/LC_TIME.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Ondrej Dubaj <odubaj@redhat.com>
|
||||
URL: Created it myself
|
||||
LICENSE: public domain
|
||||
BIN
tests/file-tests/db/ppc/coredump-ppc
Normal file
BIN
tests/file-tests/db/ppc/coredump-ppc
Normal file
Binary file not shown.
3
tests/file-tests/db/ppc/coredump-ppc.source.txt
Normal file
3
tests/file-tests/db/ppc/coredump-ppc.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Frantisek Sumsal <fsumsal@redhat.com>
|
||||
URL: Created if myself
|
||||
LICENSE: public domain
|
||||
1
tests/file-tests/db/py/p1.py
Normal file
1
tests/file-tests/db/py/p1.py
Normal file
@ -0,0 +1 @@
|
||||
#! /usr/bin/env python
|
||||
1
tests/file-tests/db/py/p2.py
Normal file
1
tests/file-tests/db/py/p2.py
Normal file
@ -0,0 +1 @@
|
||||
#! /usr/bin/env python
|
||||
1
tests/file-tests/db/py/p3.py
Normal file
1
tests/file-tests/db/py/p3.py
Normal file
@ -0,0 +1 @@
|
||||
#!/usr/bin/env python
|
||||
1
tests/file-tests/db/py/p4.py
Normal file
1
tests/file-tests/db/py/p4.py
Normal file
@ -0,0 +1 @@
|
||||
#!/usr/bin/env python
|
||||
2
tests/file-tests/db/py/p5.py
Normal file
2
tests/file-tests/db/py/p5.py
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
#!/usr/bin/env python
|
||||
1
tests/file-tests/db/py/p6.py
Normal file
1
tests/file-tests/db/py/p6.py
Normal file
@ -0,0 +1 @@
|
||||
#! /usr/bin/env python
|
||||
68
tests/file-tests/db/slk/excel4_sample_macro.slk
Normal file
68
tests/file-tests/db/slk/excel4_sample_macro.slk
Normal file
@ -0,0 +1,68 @@
|
||||
ID;PWXL;N;E
|
||||
P;PGeneral
|
||||
P;P0
|
||||
P;P0.00
|
||||
P;P#,##0
|
||||
P;P#,##0.00
|
||||
P;P#,##0;;\-#,##0
|
||||
P;P#,##0;;[Red]\-#,##0
|
||||
P;P#,##0.00;;\-#,##0.00
|
||||
P;P#,##0.00;;[Red]\-#,##0.00
|
||||
P;P#,##0\ "$";;\-#,##0\ "$"
|
||||
P;P#,##0\ "$";;[Red]\-#,##0\ "$"
|
||||
P;P#,##0.00\ "$";;\-#,##0.00\ "$"
|
||||
P;P#,##0.00\ "$";;[Red]\-#,##0.00\ "$"
|
||||
P;P0%
|
||||
P;P0.00%
|
||||
P;P0.00E+00
|
||||
P;P##0.0E+0
|
||||
P;P#" "?/?
|
||||
P;P#" "??/??
|
||||
P;Pdd/mm/yyyy
|
||||
P;Pdd\-mmm\-yy
|
||||
P;Pdd\-mmm
|
||||
P;Pmmm\-yy
|
||||
P;Ph:mm\ AM/PM
|
||||
P;Ph:mm:ss\ AM/PM
|
||||
P;Phh:mm
|
||||
P;Phh:mm:ss
|
||||
P;Pdd/mm/yyyy\ hh:mm
|
||||
P;Pmm:ss
|
||||
P;Pmm:ss.0
|
||||
P;P@
|
||||
P;P[h]:mm:ss
|
||||
P;P_-* #,##0\ "$"_-;;\-* #,##0\ "$"_-;;_-* "-"\ "$"_-;;_-@_-
|
||||
P;P_-* #,##0_-;;\-* #,##0_-;;_-* "-"_-;;_-@_-
|
||||
P;P_-* #,##0.00\ "$"_-;;\-* #,##0.00\ "$"_-;;_-* "-"??\ "$"_-;;_-@_-
|
||||
P;P_-* #,##0.00_-;;\-* #,##0.00_-;;_-* "-"??_-;;_-@_-
|
||||
P;FCalibri;M220;L9
|
||||
P;FCalibri;M220;L9
|
||||
P;FCalibri;M220;L9
|
||||
P;FCalibri;M220;L9
|
||||
P;ECalibri;M220;L9
|
||||
P;ECalibri Light;M360;L55
|
||||
P;ECalibri;M300;SB;L55
|
||||
P;ECalibri;M260;SB;L55
|
||||
P;ECalibri;M220;SB;L55
|
||||
P;ECalibri;M220;L18
|
||||
P;ECalibri;M220;L21
|
||||
P;ECalibri;M220;L61
|
||||
P;ECalibri;M220;L63
|
||||
P;ECalibri;M220;SB;L64
|
||||
P;ECalibri;M220;SB;L53
|
||||
P;ECalibri;M220;L53
|
||||
P;ECalibri;M220;SB;L10
|
||||
P;ECalibri;M220;L11
|
||||
P;ECalibri;M220;SI;L24
|
||||
P;ECalibri;M220;SB;L9
|
||||
P;ECalibri;M220;L10
|
||||
P;ESegoe UI;M200;L9
|
||||
F;P0;DG0G8;E;M292
|
||||
B;Y2;X1;D0 0 1 0
|
||||
O;L;E;D;V0;K47;G100 0.001
|
||||
F;W1 1 17
|
||||
F;W2 16384 9
|
||||
NN;NAuto_Open;ER1C1
|
||||
C;Y1;X1;KFALSE;EALERT("This is a sample Excel 4 macro")
|
||||
C;Y2;KTRUE;EHALT()
|
||||
E
|
||||
@ -0,0 +1,3 @@
|
||||
AUTHOR: Philippe Lagadec
|
||||
URL: http://www.decalage.info/
|
||||
LICENSE: MIT
|
||||
71
tests/file-tests/db/slk/simple-slk-file.slk
Normal file
71
tests/file-tests/db/slk/simple-slk-file.slk
Normal file
@ -0,0 +1,71 @@
|
||||
ID;PWXL;N;E
|
||||
P;PGeneral
|
||||
P;P0
|
||||
P;P0.00
|
||||
P;P#,##0
|
||||
P;P#,##0.00
|
||||
P;P#,##0;;\-#,##0
|
||||
P;P#,##0;;[Red]\-#,##0
|
||||
P;P#,##0.00;;\-#,##0.00
|
||||
P;P#,##0.00;;[Red]\-#,##0.00
|
||||
P;P#,##0\ "$";;\-#,##0\ "$"
|
||||
P;P#,##0\ "$";;[Red]\-#,##0\ "$"
|
||||
P;P#,##0.00\ "$";;\-#,##0.00\ "$"
|
||||
P;P#,##0.00\ "$";;[Red]\-#,##0.00\ "$"
|
||||
P;P0%
|
||||
P;P0.00%
|
||||
P;P0.00E+00
|
||||
P;P##0.0E+0
|
||||
P;P#" "?/?
|
||||
P;P#" "??/??
|
||||
P;Pdd/mm/yyyy
|
||||
P;Pdd\-mmm\-yy
|
||||
P;Pdd\-mmm
|
||||
P;Pmmm\-yy
|
||||
P;Ph:mm\ AM/PM
|
||||
P;Ph:mm:ss\ AM/PM
|
||||
P;Phh:mm
|
||||
P;Phh:mm:ss
|
||||
P;Pdd/mm/yyyy\ hh:mm
|
||||
P;Pmm:ss
|
||||
P;Pmm:ss.0
|
||||
P;P@
|
||||
P;P[h]:mm:ss
|
||||
P;P_-* #,##0\ "$"_-;;\-* #,##0\ "$"_-;;_-* "-"\ "$"_-;;_-@_-
|
||||
P;P_-* #,##0_-;;\-* #,##0_-;;_-* "-"_-;;_-@_-
|
||||
P;P_-* #,##0.00\ "$"_-;;\-* #,##0.00\ "$"_-;;_-* "-"??\ "$"_-;;_-@_-
|
||||
P;P_-* #,##0.00_-;;\-* #,##0.00_-;;_-* "-"??_-;;_-@_-
|
||||
P;FCalibri;M220;L9
|
||||
P;FCalibri;M220;L9
|
||||
P;FCalibri;M220;L9
|
||||
P;FCalibri;M220;L9
|
||||
P;ECalibri;M220;L9
|
||||
P;ECalibri Light;M360;L55
|
||||
P;ECalibri;M300;SB;L55
|
||||
P;ECalibri;M260;SB;L55
|
||||
P;ECalibri;M220;SB;L55
|
||||
P;ECalibri;M220;L18
|
||||
P;ECalibri;M220;L21
|
||||
P;ECalibri;M220;L61
|
||||
P;ECalibri;M220;L63
|
||||
P;ECalibri;M220;SB;L64
|
||||
P;ECalibri;M220;SB;L53
|
||||
P;ECalibri;M220;L53
|
||||
P;ECalibri;M220;SB;L10
|
||||
P;ECalibri;M220;L11
|
||||
P;ECalibri;M220;SI;L24
|
||||
P;ECalibri;M220;SB;L9
|
||||
P;ECalibri;M220;L10
|
||||
P;ESegoe UI;M200;L9
|
||||
F;P0;DG0G8;M292
|
||||
B;Y4;X2;D0 0 3 1
|
||||
O;L;D;V0;K47;G100 0.001
|
||||
F;W1 16384 9
|
||||
C;Y1;X1;K"This is a sample SLK file."
|
||||
C;Y2;K1
|
||||
C;X2;K4
|
||||
C;Y3;X1;K2
|
||||
C;X2;K5
|
||||
C;Y4;X1;K3
|
||||
C;X2;K6
|
||||
E
|
||||
3
tests/file-tests/db/slk/simple-slk-file.slk.source.txt
Normal file
3
tests/file-tests/db/slk/simple-slk-file.slk.source.txt
Normal file
@ -0,0 +1,3 @@
|
||||
AUTHOR: Philippe Lagadec
|
||||
URL: http://www.decalage.info/
|
||||
LICENSE: MIT
|
||||
11
tests/file-tests/main.fmf
Normal file
11
tests/file-tests/main.fmf
Normal 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
|
||||
@ -1,54 +1,55 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -ex
|
||||
|
||||
# Clone
|
||||
rm -rf runtest.sh db tmp
|
||||
git clone https://github.com/file/file-tests.git
|
||||
cp -a file-tests/db .
|
||||
rm -rf file-tests
|
||||
|
||||
blacklist=`python -c 'from readfile import *; print " ".join(main())'`
|
||||
blocklist="$(python3 -c 'from readfile import *; print(" ".join(main()))')"
|
||||
|
||||
printf "#!/bin/bash
|
||||
# Prepare
|
||||
printf $'#!/bin/bash
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
mkdir tmp
|
||||
cd db
|
||||
for d in * ; do
|
||||
mkdir ../tmp/\$d
|
||||
for f in \$d/* ; do
|
||||
if [[ \${f: -11} != \".source.txt\" ]]; then
|
||||
file \$1 \$f | sed -n -e \"s:\$f\: ::p\" | sed 's/,//g' > ../tmp/\$f.my
|
||||
fi
|
||||
done
|
||||
done
|
||||
compare() {
|
||||
IN="db/$1"
|
||||
OUT="$TMPDIR/out"
|
||||
rlRun "file \'$IN\' > \'$OUT\'" "0" "Run file on $1"
|
||||
sed -i "s|^$IN: ||" "$OUT"
|
||||
REF="reference/$1.ref"
|
||||
if ! rlAssertNotDiffer "$REF" "$OUT"; then
|
||||
rlRun -l "diff -u \'$REF\' \'$OUT\'" 1
|
||||
fi
|
||||
}
|
||||
|
||||
cd ..
|
||||
|
||||
. /usr/bin/rhts-environment.sh
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
PACKAGE=\"file\"
|
||||
PACKAGE="file"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm \$PACKAGE
|
||||
rlPhaseEnd\n\n" > runtest.sh
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm "$PACKAGE"
|
||||
TMPDIR="$(mktemp -d)"
|
||||
rlPhaseEnd\n\n' > runtest.sh
|
||||
|
||||
cd db
|
||||
(
|
||||
cd db
|
||||
for d in * ; do
|
||||
printf " rlPhaseStartTest '%s'\n" "$d" >> ../runtest.sh
|
||||
for f in "$d"/* ; do
|
||||
if [[ ${f: -11} != ".source.txt" && "${blocklist[*]}" != *"$f"* ]]; then
|
||||
printf " compare '%s'\n" "$f" >> ../runtest.sh
|
||||
fi
|
||||
done
|
||||
printf " rlPhaseEnd\n\n" >> ../runtest.sh
|
||||
done
|
||||
)
|
||||
|
||||
for d in * ; do
|
||||
printf " rlPhaseStartTest \"$d\"\n" >> ../runtest.sh
|
||||
for f in $d/* ; do
|
||||
if [[ ${f: -11} != ".source.txt" && "${blacklist[*]}" != *"$f"* ]]; then
|
||||
printf " rlAssertNotDiffer \"reference/$f.ref\" \"tmp/$f.my\"\n" >> ../runtest.sh
|
||||
fi
|
||||
done
|
||||
printf " rlPhaseEnd\n\n" >> ../runtest.sh
|
||||
done
|
||||
printf " rlPhaseStartCleanup
|
||||
rm -rf \"\$TMPDIR\"
|
||||
rlPhaseEnd
|
||||
|
||||
cd ..
|
||||
|
||||
printf " rlJournalPrintText
|
||||
rlJournalEnd
|
||||
rm -rf tmp" >> runtest.sh
|
||||
rlJournalPrintText
|
||||
rlJournalEnd\n" >> runtest.sh
|
||||
|
||||
chmod +x runtest.sh
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
def main():
|
||||
f = open("blacklist.txt","r")
|
||||
fl = f.readlines()
|
||||
return fl
|
||||
if __name__== "__main__":
|
||||
main()
|
||||
f = open("blocklist.txt")
|
||||
fl = f.readlines()
|
||||
return fl
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@ -1,20 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf reference db
|
||||
git clone https://github.com/file/file-tests.git
|
||||
cp -a file-tests/db .
|
||||
rm -rf file-tests
|
||||
#!/bin/bash -ex
|
||||
|
||||
rm -rf reference
|
||||
mkdir reference
|
||||
|
||||
cd db
|
||||
for d in * ; do
|
||||
mkdir ../reference/$d
|
||||
for f in $d/* ; do
|
||||
if [[ ${f: -11} != ".source.txt" ]]; then
|
||||
file $1 $f | sed -n -e "s:$f\: ::p" | sed 's/,//g' > ../reference/$f.ref
|
||||
fi
|
||||
done
|
||||
mkdir "../reference/$d"
|
||||
for f in "$d"/* ; do
|
||||
if [[ ${f: -11} != ".source.txt" ]]; then
|
||||
file "$f" | sed "s|$f: ||" > "../reference/$f.ref"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf db
|
||||
@ -1 +1 @@
|
||||
7-zip archive data version 0.3
|
||||
7-zip archive data, version 0.3
|
||||
|
||||
@ -1 +1 @@
|
||||
Composite Document File V2 Document Little Endian Os: Windows Version 5.1 Code page: 1252 Title: ms_access_project_encoded Author: ch
|
||||
Composite Document File V2 Document, Little Endian, Os: Windows, Version 5.1, Code page: 1252, Title: ms_access_project_encoded, Author: ch
|
||||
|
||||
@ -1 +1 @@
|
||||
Composite Document File V2 Document Little Endian Os: Windows Version 5.1 Code page: 1252 Title: ms_access_project Author: ch
|
||||
Composite Document File V2 Document, Little Endian, Os: Windows, Version 5.1, Code page: 1252, Title: ms_access_project, Author: ch
|
||||
|
||||
@ -1 +1 @@
|
||||
RIFF (little-endian) data animated cursor
|
||||
RIFF (little-endian) data, animated cursor
|
||||
|
||||
@ -1 +1 @@
|
||||
HTML document ASCII text
|
||||
HTML document, ASCII text
|
||||
|
||||
@ -1 +1 @@
|
||||
HTML document ASCII text
|
||||
HTML document, ASCII text
|
||||
|
||||
@ -1 +1 @@
|
||||
DOS batch file ASCII text
|
||||
DOS batch file, ASCII text
|
||||
|
||||
1
tests/file-tests/reference/bmp/4x2x24-win3.bmp.ref
Normal file
1
tests/file-tests/reference/bmp/4x2x24-win3.bmp.ref
Normal file
@ -0,0 +1 @@
|
||||
PC bitmap, Windows 3.x format, 4 x 2 x 24, image size 24, resolution 2835 x 2835 px/m, cbSize 78, bits offset 54
|
||||
1
tests/file-tests/reference/bmp/4x2x32-win95.bmp.ref
Normal file
1
tests/file-tests/reference/bmp/4x2x32-win95.bmp.ref
Normal file
@ -0,0 +1 @@
|
||||
PC bitmap, Windows 95/NT4 and newer format, 4 x 2 x 32, cbSize 154, bits offset 122
|
||||
1
tests/file-tests/reference/bmp/4x2x32-win98.bmp.ref
Normal file
1
tests/file-tests/reference/bmp/4x2x32-win98.bmp.ref
Normal file
@ -0,0 +1 @@
|
||||
PC bitmap, Windows 98/2000 and newer format, 4 x 2 x 32, cbSize 170, bits offset 138
|
||||
@ -1 +1 @@
|
||||
PC bitmap Windows 3.x format 150 x 57 x 24
|
||||
PC bitmap, Windows 3.x format, 150 x 57 x 24, image size 25764, resolution 3543 x 3543 px/m, cbSize 25818, bits offset 54
|
||||
|
||||
@ -1 +0,0 @@
|
||||
Microsoft Cabinet archive data many 345055 bytes 26 files at 0x2c +A "Bonjour.Resources_da.lproj_AboutBonjour.rtf" +A "Bonjour.Resources_de.lproj_Abo" number 1 34 datablocks 0x1503 compression
|
||||
@ -1 +1 @@
|
||||
DOS batch file ASCII text
|
||||
DOS batch file, ASCII text
|
||||
|
||||
@ -1 +1 @@
|
||||
MS Windows help file Content based "help-contents.hlp" ASCII text
|
||||
MS Windows help file Content, based "help-contents.hlp", ASCII text
|
||||
|
||||
@ -1 +1 @@
|
||||
PE32 executable (DLL) (GUI) Intel 80386 for MS Windows
|
||||
PE32 executable (DLL) (GUI) Intel 80386, for MS Windows
|
||||
|
||||
@ -1 +1 @@
|
||||
C source ASCII text
|
||||
C source, ASCII text
|
||||
|
||||
@ -1 +1 @@
|
||||
MS Windows cursor resource - 1 icon 32x32 hotspot @0x0
|
||||
MS Windows cursor resource - 1 icon, 32x32, hotspot @0x0
|
||||
|
||||
@ -1 +1 @@
|
||||
SQLite 3.x database last written using SQLite version 0
|
||||
SQLite 3.x database, last written using SQLite version 0, page size 1024, file counter 1, database pages 0, cookie 0x1, schema 1, UTF-8, version-valid-for 0
|
||||
|
||||
@ -1 +0,0 @@
|
||||
Berkeley DB (Hash version 9 native byte-order)
|
||||
@ -1 +1 @@
|
||||
Composite Document File V2 Document Cannot read section info
|
||||
Composite Document File V2 Document, Cannot read section info
|
||||
|
||||
@ -1 +1 @@
|
||||
FoxBase+/dBase III with memo .DBT DBF 92 records * 3727 update-date 06-12-5
|
||||
FoxBase+/dBase III, with memo .DBT DBF, 92 records * 3727, update-date 06-12-5
|
||||
|
||||
@ -1 +1 @@
|
||||
Debian binary package (format 2.0)
|
||||
Debian binary package (format 2.0), with control.tar.gz, data compression gz
|
||||
|
||||
@ -1 +1 @@
|
||||
PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB) for MS Windows
|
||||
PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS Windows
|
||||
|
||||
@ -1 +1 @@
|
||||
Mini DuMP crash report 6 streams Mon Feb 16 21:10:58 2009 0x0 type
|
||||
Mini DuMP crash report, 6 streams, Mon Feb 16 21:10:58 2009, 0 type
|
||||
|
||||
@ -1 +0,0 @@
|
||||
Composite Document File V2 Document Little Endian Os: Windows Version 5.1 Code page: 1252 Author: Bekrar Template: Normal.dot Last Saved By: Bekrar Revision Number: 2 Name of Creating Application: Microsoft Office Word Total Editing Time: 01:00 Create Time/Date: Tue Aug 16 09:51:00 2005 Last Saved Time/Date: Tue Aug 16 10:02:00 2005 Number of Pages: 2 Number of Words: 646 Number of Characters: 3555 Security: 0
|
||||
@ -1 +0,0 @@
|
||||
Composite Document File V2 Document Little Endian Os: Windows Version 6.1 Code page: 1252 Author: user Template: Normal.dotm Last Saved By: user Revision Number: 2 Name of Creating Application: Microsoft Office Word Create Time/Date: Wed Oct 17 12:27:00 2018 Last Saved Time/Date: Wed Oct 17 12:27:00 2018 Number of Pages: 1 Number of Words: 6 Number of Characters: 42 Security: 1
|
||||
@ -1 +1 @@
|
||||
Composite Document File V2 Document Little Endian Os: Windows Version 6.1 Code page: 1252 Author: schulung Template: Normal.dotm Last Saved By: schulung Revision Number: 2 Name of Creating Application: Microsoft Office Word Create Time/Date: Fri Mar 11 12:58:00 2016 Last Saved Time/Date: Fri Mar 11 12:58:00 2016 Number of Pages: 1 Number of Words: 33 Number of Characters: 210 Security: 0
|
||||
Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.1, Code page: 1252, Author: schulung, Template: Normal.dotm, Last Saved By: schulung, Revision Number: 2, Name of Creating Application: Microsoft Office Word, Create Time/Date: Fri Mar 11 12:58:00 2016, Last Saved Time/Date: Fri Mar 11 12:58:00 2016, Number of Pages: 1, Number of Words: 33, Number of Characters: 210, Security: 0
|
||||
|
||||
@ -1 +1 @@
|
||||
Composite Document File V2 Document Little Endian Os: Windows Version 6.1 Code page: 1252 Author: schulung Template: Normal.dotm Last Saved By: schulung Revision Number: 2 Name of Creating Application: Microsoft Office Word Create Time/Date: Fri Mar 11 10:26:00 2016 Last Saved Time/Date: Fri Mar 11 10:26:00 2016 Number of Pages: 1 Number of Words: 33 Number of Characters: 210 Security: 0
|
||||
Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.1, Code page: 1252, Author: schulung, Template: Normal.dotm, Last Saved By: schulung, Revision Number: 2, Name of Creating Application: Microsoft Office Word, Create Time/Date: Fri Mar 11 10:26:00 2016, Last Saved Time/Date: Fri Mar 11 10:26:00 2016, Number of Pages: 1, Number of Words: 33, Number of Characters: 210, Security: 0
|
||||
|
||||
@ -1 +1 @@
|
||||
Composite Document File V2 Document Little Endian Os: Windows Version 6.1 Code page: 1252 Author: schulung Template: word_document.dot Last Saved By: schulung Revision Number: 2 Name of Creating Application: Microsoft Office Word Create Time/Date: Fri Mar 11 12:59:00 2016 Last Saved Time/Date: Fri Mar 11 12:59:00 2016 Number of Pages: 1 Number of Words: 33 Number of Characters: 210 Security: 0
|
||||
Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.1, Code page: 1252, Author: schulung, Template: word_document.dot, Last Saved By: schulung, Revision Number: 2, Name of Creating Application: Microsoft Office Word, Create Time/Date: Fri Mar 11 12:59:00 2016, Last Saved Time/Date: Fri Mar 11 12:59:00 2016, Number of Pages: 1, Number of Words: 33, Number of Characters: 210, Security: 0
|
||||
|
||||
@ -1 +1 @@
|
||||
Composite Document File V2 Document Little Endian Os: Windows Version 6.1 Code page: 1252 Author: schulung Template: word_document.dot Last Saved By: schulung Revision Number: 2 Name of Creating Application: Microsoft Office Word Create Time/Date: Fri Mar 11 10:27:00 2016 Last Saved Time/Date: Fri Mar 11 10:27:00 2016 Number of Pages: 1 Number of Words: 33 Number of Characters: 210 Security: 0
|
||||
Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.1, Code page: 1252, Author: schulung, Template: word_document.dot, Last Saved By: schulung, Revision Number: 2, Name of Creating Application: Microsoft Office Word, Create Time/Date: Fri Mar 11 10:27:00 2016, Last Saved Time/Date: Fri Mar 11 10:27:00 2016, Number of Pages: 1, Number of Words: 33, Number of Characters: 210, Security: 0
|
||||
|
||||
@ -1 +0,0 @@
|
||||
new-fs dump file (big endian) This dump Mon Sep 24 07:53:12 2012 Previous dump Thu Jan 1 00:00:00 1970 Volume 1 Level zero type: tape header Label myext3fs Filesystem /mnt/myext3fs Device /dev/loop0 Host unknown.host.on.unknown.domain.com Flags 3
|
||||
@ -1 +1 @@
|
||||
ELF 64-bit LSB executable x86-64 version 1 (SYSV) dynamically linked interpreter /lib64/ld-linux-x86-64.so.2 for GNU/Linux 2.6.32 BuildID[sha1]=f382d7105a1c1d2b42db80c4202ea7a84c59b335 not stripped
|
||||
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=f382d7105a1c1d2b42db80c4202ea7a84c59b335, not stripped
|
||||
|
||||
@ -1 +1 @@
|
||||
ELF 64-bit MSB executable IBM S/390 version 1 (SYSV) dynamically linked interpreter *empty* with debug_info not stripped
|
||||
ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), dynamically linked, interpreter *empty*, with debug_info, not stripped
|
||||
|
||||
@ -1 +1 @@
|
||||
ELF 64-bit LSB executable ARM aarch64 version 1 (SYSV) dynamically linked interpreter /lib/ld-linux-aarch64.so.1 for GNU/Linux 2.6.39 with debug_info not stripped
|
||||
ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 2.6.39, with debug_info, not stripped
|
||||
|
||||
@ -1 +1 @@
|
||||
ELF 64-bit LSB shared object x86-64 version 1 (SYSV) dynamically linked for NetBSD 7.99.59 not stripped
|
||||
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, for NetBSD 7.99.59, not stripped
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user