add test
This commit is contained in:
parent
f757deca05
commit
bd26624c8f
5 changed files with 169 additions and 0 deletions
64
Sanity/provided_models/Makefile
Normal file
64
Sanity/provided_models/Makefile
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/c2esp/Sanity/provided_models
|
||||
# Description: \Test checks provided printer models by the package
|
||||
# Author: Zdenek Dohnal <zdohnal@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/c2esp/Sanity/provided_models
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE provided_models
|
||||
|
||||
.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: Zdenek Dohnal <zdohnal@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: \\Test checks provided printer models by the package" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 5m" >> $(METADATA)
|
||||
@echo "RunFor: c2esp" >> $(METADATA)
|
||||
@echo "Requires: c2esp" >> $(METADATA)
|
||||
@echo "Requires: cups" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: yes" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL6 -RHEL7 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
||||
3
Sanity/provided_models/PURPOSE
Normal file
3
Sanity/provided_models/PURPOSE
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
PURPOSE of /CoreOS/c2esp/Sanity/provided_models
|
||||
Description: \Test checks provided printer models by the package
|
||||
Author: Zdenek Dohnal <zdohnal@redhat.com>
|
||||
24
Sanity/provided_models/main.fmf
Normal file
24
Sanity/provided_models/main.fmf
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
summary: \Test checks provided printer models by the package
|
||||
description: ''
|
||||
contact: Petr Dancak <pdancak@redhat.com>
|
||||
component: []
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- c2esp
|
||||
- cups
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tag:
|
||||
- NoRHEL4
|
||||
- NoRHEL5
|
||||
- TIPpass
|
||||
- Tier1
|
||||
tier: '1'
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-8
|
||||
continue: false
|
||||
extra-nitrate: TC#0608013
|
||||
extra-summary: /CoreOS/c2esp/Sanity/provided_models
|
||||
extra-task: /CoreOS/c2esp/Sanity/provided_models
|
||||
24
Sanity/provided_models/provided_models
Normal file
24
Sanity/provided_models/provided_models
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_51xx_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_53xx_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_55xx_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_ESP_1.2.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_ESP_2.2.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_3.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_ESP_3.2.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_ESP_4.2.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_5.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_7.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_9.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_32xx_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_52xx_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_72xx_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_92xx_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_ESP_C11x_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_ESP_C31x_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_41xx_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_16.drv/Kodak_ESP_61xx_Series.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_Hero_3.1.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_Hero_5.1.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_Hero_6.1.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_Hero_7.1.ppd
|
||||
Model: name = drv:///c2esp/KodakESP_C_07.drv/Kodak_Hero_9.1.ppd
|
||||
54
Sanity/provided_models/runtest.sh
Executable file
54
Sanity/provided_models/runtest.sh
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/c2esp/Sanity/provided_models
|
||||
# Description: \Test checks provided printer models by the package
|
||||
# Author: Zdenek Dohnal <zdohnal@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="c2esp"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlAssertRpm cups
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "cp provided_models $TmpDir"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlServiceStart cups
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "lpinfo -l -m | grep c2esp > c2esp_models" 0 "Get c2esp models"
|
||||
rlAssertNotDiffer c2esp_models provided_models
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlServiceRestore cups
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue