Adding test to fedora

This commit is contained in:
Petr Sklenar 2021-10-14 14:11:14 +02:00
commit 25f63d3e95
14 changed files with 32248 additions and 0 deletions

View file

@ -0,0 +1,65 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/ghostscript/Smoke/ghostscript-x11
# Description: it tries basics for x11
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2020 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# 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, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/ghostscript/Smoke/ghostscript-x11
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE dummy.pdf
#dummy.pdf from https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
.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: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: it tries basics for x11" >> $(METADATA)
@echo "Type: Smoke" >> $(METADATA)
@echo "TestTime: 15m" >> $(METADATA)
@echo "RunFor: ghostscript" >> $(METADATA)
@echo "Requires: ghostscript xorg-x11-server-Xvfb ghostscript-x11" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1713413" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/ghostscript/Smoke/ghostscript-x11
Description: it tries basics for x11
Author: Petr Sklenar <psklenar@redhat.com>

Binary file not shown.

View file

@ -0,0 +1,33 @@
summary: it tries basics for x11
description: ''
component:
- ghostscript
test: ./runtest.sh
framework: beakerlib
recommend:
- ghostscript
- xorg-x11-server-Xvfb
- ghostscript-x11
duration: 15m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIPpass
- Tier1
tier: '1'
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1713413
adjust:
- enabled: false
when: distro < rhel-8
continue: false
- enabled: false
when: purpose == gating and distro ~< rhel-8.3
continue: false
- enabled: false
when: arch == s390x
continue: false
extra-nitrate: TC#0606329
extra-summary: /CoreOS/ghostscript/Smoke/ghostscript-x11
extra-task: /CoreOS/ghostscript/Smoke/ghostscript-x11

View file

@ -0,0 +1,46 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/ghostscript/Smoke/ghostscript-x11
# Description: it tries basics for x11
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2020 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# 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, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="ghostscript"
rlJournalStart
rlPhaseStartTest
rlRun "rpm -q rpm | grep el7 || rpm -q ghostscript-x11"
rlRun "xvfb-run timeout --preserve-status 10 gs -dBATCH -dNOPAUSE -sDEVICE=x11 dummy.pdf"
rlPhaseEnd
rlPhaseStartTest
for i in $(gs -h | grep "\w*x11\w*" -oh);do
rlLog "trying $i from gs -h"
rlRun "xvfb-run timeout --preserve-status 10 gs -dBATCH -dNOPAUSE -sDEVICE=$i dummy.pdf"
done
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,69 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/ghostscript/Smoke/start-stop-all-binaries
# Description: it starts and stops all binaries
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# 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, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/ghostscript/Smoke/start-stop-all-binaries
export TESTVERSION=1.0
BUILT_FILES=
# EXAMPLES sources:
# https://www.ibm.com/investor/att/pdf/IBM-RED-HAT-Press-Release-10-2018.pdf
# https://www.ghostscript.com/doc/examples/tiger.eps
# http://www.paradise.caltech.edu/~mikel/papers/theta_SICOMP.ps
# https://alum.mit.edu/www/toms/ftp/testprinter.ps
FILES=$(METADATA) runtest.sh Makefile PURPOSE tiger.eps theta_SICOMP.ps testprinter.ps IBM-RED-HAT-Press-Release-10-2018.pdf
.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: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: it starts and stops all binaries" >> $(METADATA)
@echo "Type: Smoke" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: ghostscript" >> $(METADATA)
@echo "Requires: ghostscript" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1647450" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/ghostscript/Smoke/start-stop-all-binaries
Description: it starts and stops all binaries
Author: Petr Sklenar <psklenar@redhat.com>

View file

@ -0,0 +1,28 @@
summary: it starts and stops all binaries
description: |+
NOTES:
ps2epsi: expected fail on rhel77 : but run it there ! and see the rest
rhel8: always pass
component:
- ghostscript
test: ./runtest.sh
framework: beakerlib
recommend:
- ghostscript
duration: 10m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIP_fedora_pass
- TIPpass
- test
tier: '1'
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1647450
adjust: []
extra-nitrate: TC#0588663
extra-summary: /CoreOS/ghostscript/Smoke/start-stop-all-binaries
extra-task: /CoreOS/ghostscript/Smoke/start-stop-all-binaries

View file

@ -0,0 +1,122 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/ghostscript/Smoke/start-stop-all-binaries
# Description: it starts and stops all binaries
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# 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, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="ghostscript"
# EXAMPLES sources:
# https://www.ibm.com/investor/att/pdf/IBM-RED-HAT-Press-Release-10-2018.pdf
# https://www.ghostscript.com/doc/examples/tiger.eps
# http://www.paradise.caltech.edu/~mikel/papers/theta_SICOMP.ps
LOG=$(mktemp)
LOGCFF=$(mktemp)
echo 'log from cff' > $LOGCFF
cff() {
#_C_HECK_F_OR_F_AILURES
R=0
grep -i fault $1 && R=1
grep -i error $1 && R=1
rlLog "`echo LOG;tail -c600 $1`"
tail -c600 $1 >> $LOGCFF
return $R
}
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp * $TmpDir"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "eps2eps"
rlRun "eps2eps tiger.eps tiger2.eps &> $LOG"
rlRun "file tiger2.eps|grep EPS"
rlRun "eps2eps theta_SICOMP.ps theta_%d.eps"
rlRun "cff $LOG"
rlPhaseEnd
for i in "ghostscript" "gs" "gsnd" "ps2ascii";do
rlPhaseStartTest "$i"
rlRun "echo ''| GS_DEVICE=display $i &> $LOG"
rlRun "cff $LOG"
rlPhaseEnd
done
rlPhaseStartTest 'pdf2dsc'
rlRun "pdf2dsc IBM-RED-HAT-Press-Release-10-2018.pdf &> $LOG"
rlRun "cff $LOG"
rlRun "file IBM-RED-HAT-Press-Release-10-2018.dsc|grep DSC"
rlPhaseEnd
rlPhaseStartTest 'pdf2ps'
rlRun "pdf2ps IBM-RED-HAT-Press-Release-10-2018.pdf &> $LOG "
rlRun "cff $LOG"
rlRun "file IBM-RED-HAT-Press-Release-10-2018.ps | grep 'PostScript'"
rlRun "pdf2ps IBM-RED-HAT-Press-Release-10-2018.pdf IBM-Press-Release_%d.ps"
rlPhaseEnd
for i in 'ps2pdf' 'ps2pdf12' 'ps2pdf13' 'ps2pdf14' 'ps2pdfwr';do
rlPhaseStartTest $i
#there is file 'IBM-RED-HAT-Press-Release-10-2018.ps' created before
rlRun "$i IBM-RED-HAT-Press-Release-10-2018.ps &> $LOG"
rlRun "cff $LOG"
rlRun "$i IBM-RED-HAT-Press-Release-10-2018.ps IBM-Press-Release_${i}_%d.pdf &> $LOG"
rlRun "cff $LOG"
rlPhaseEnd
done
rlPhaseStartTest 'ps2epsi'
rlRun "ps2epsi IBM-RED-HAT-Press-Release-10-2018.ps 2>&1 | grep 'EPS files may not contain multiple pages' "
rlRun "ps2epsi testprinter.ps &> $LOG"
rlRun "cff $LOG"
rlPhaseEnd
rlPhaseStartTest ps2ascii
rlRun "ps2ascii IBM-RED-HAT-Press-Release-10-2018.ps &> $LOG"
rlRun "cff $LOG"
rlPhaseEnd
rlPhaseStartCleanup
echo '--------------------------'
cat $LOGCFF
echo '--------------------------'
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,77 @@
%!PS-Adobe-2.0 EPSF-2.0
%%Title: version = 1.03 of testprinter.ps 2005 May 18
%%Creator: Tom Schneider, toms@alum.mit.edu
%%BoundingBox: 100 300 500 700
%%Pages: (atend)
%%DocumentFonts:
%%EndComments
%%EndProlog
%%Page: 1 1
% history:
% 2005 May 18, 1.03: added '()' around atend
% thanks to Axel Boldt axelboldt@yahoo.com for
% pointing this out!
% 2003 Feb 20, 1.02: add bounding box and mk eps
% 1996 Feb 8, 1.01: origin was before this date.
% This is a small file for testing color and other PostScript printers
% It produces the word "printer" several times in a circle,
% changing color each time.
% Dr. Thomas D. Schneider
% toms@alum.mit.edu
% permanent email: toms@alum.mit.edu (use only if first address fails)
% https://alum.mit.edu/www/toms/
% source:
% PostScript Language Tutorial and Cookbook, p. 49
/Times-Roman findfont 30 scalefont setfont
/steps 16 def
/hue 0 def
/huestep 1 steps div def % rate of hue change (0.01 is nice)
/angle 360 steps div def
/changecolor {
% change the color
/hue hue huestep add dup 1 gt {pop 0} if def % modify the hue
hue % this is the hue
1.0 % this is the saturation
1.0 % this is the brightness
sethsbcolor % reset the color
} def
/square
{newpath
angle rotate
changecolor
0 0 moveto
90 0 lineto
90 90 lineto
0 90 lineto
closepath stroke
6 92 moveto % label the box
(printer) show } def
/circlesymbol { % x y radius circlesymbol - (path)
newpath 0 360 arc closepath} bind def
300 500 translate
/size 15 def
15 {
/size size 1 sub def
size 15 div setgray
0 0 size 10 mul circlesymbol stroke
} repeat
steps {square} repeat
showpage
%%Trailer
%%Pages: 1

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

2
main.fmf Normal file
View file

@ -0,0 +1,2 @@
# QE owner
contact: Petr Sklenar <psklenar@redhat.com>