From 2521e5d3451e8286118c43fd584a6c08095e0cd5 Mon Sep 17 00:00:00 2001 From: Iveta Cesalova Date: Tue, 16 Mar 2021 18:49:51 +0100 Subject: [PATCH] delete test --- core/phpinfo/TC#0058630.fmf | 17 ------ core/phpinfo/info.php | 1 - core/phpinfo/main.fmf | 22 -------- core/phpinfo/runtest.sh | 109 ------------------------------------ 4 files changed, 149 deletions(-) delete mode 100644 core/phpinfo/TC#0058630.fmf delete mode 100644 core/phpinfo/info.php delete mode 100644 core/phpinfo/main.fmf delete mode 100755 core/phpinfo/runtest.sh diff --git a/core/phpinfo/TC#0058630.fmf b/core/phpinfo/TC#0058630.fmf deleted file mode 100644 index 2f4d4d9..0000000 --- a/core/phpinfo/TC#0058630.fmf +++ /dev/null @@ -1,17 +0,0 @@ -component: -- php -contact: Jakub Heger -extra-nitrate: TC#0058630 -extra-pepa: | - PACKAGES='php php-cli' component/php - REQUIRES='httpd perl curl' component/php -extra-summary: /CoreOS/php/misc/phpinfo -relevancy: | - distro = rhel-4, rhel-5, rhel-6: False -tag: -- HttpdSclDone -- NoModularTier -- TIPfail_Security -- TIPpass_Apps -- TestParametrized -- Tier1 diff --git a/core/phpinfo/info.php b/core/phpinfo/info.php deleted file mode 100644 index c9f5eeb..0000000 --- a/core/phpinfo/info.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/core/phpinfo/main.fmf b/core/phpinfo/main.fmf deleted file mode 100644 index 84a7d0f..0000000 --- a/core/phpinfo/main.fmf +++ /dev/null @@ -1,22 +0,0 @@ -component: -- php -description: '' -duration: 5m -enabled: true -extra-task: /CoreOS/php/misc/phpinfo -require: -- php -- php-fpm -- php-cli -- perl -- perl-interpreter -- curl -- httpd -- httpd -- curl -- sed -- grep -- library(php/utils) -- library(httpd/http) -summary: Simple test for phpinfo() -test: ./runtest.sh diff --git a/core/phpinfo/runtest.sh b/core/phpinfo/runtest.sh deleted file mode 100755 index 53e1229..0000000 --- a/core/phpinfo/runtest.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/php/misc/phpinfo -# Description: Simple test for phpinfo() -# Author: David Kutalek -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2013 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -# Packages to be tested -PACKAGES=${PACKAGES:-php php-cli} -# Other required packages -REQUIRES=${REQUIRES:-httpd perl curl} - -# Use php-fpm instead of mod_php on RHEL8 and later -rlIsRHEL "<=7" && phpUsePhpFpm="no" - -REPRODUCER="info.php" -URL="http://localhost/$REPRODUCER" -TESTDIR=$(pwd) - -set -o pipefail - -rlJournalStart - rlPhaseStartSetup - rlRun "rlImport httpd/http" 0 "Import httpd library" - rlImport "php/utils" - rlAssertRpm --all - - phpPopulateSources # needed for phpAssertFileOrigin - phpMainPackage - if [ "$phpUsePhpFpm" == 'no' ]; then - phpChooseModPhpConfig - else - PHP_FPM_RPM=$(rpm -qf $(which php-fpm) --qf '%{NAME}') - rlServiceStart "$PHP_FPM_RPM" - fi - - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "cp $REPRODUCER ${httpROOTDIR}" - rlRun "pushd $TmpDir" - - rlRun "httpStart" 0 "Start httpd" - - if [ "$phpUsePhpFpm" == "no" ]; then - phpAssertModPhpLoaded - phpAssertFileOrigin $(phpPrintLoadedModPhpLibs) - php_lib=$(phpPrintLoadedModPhpLibs | grep '\/libphp\|fileinfo.so$' | head -1) - else - phpAssertFileOrigin $(phpPrintLoadedPhpFpmLibs) - php_lib=$(phpPrintLoadedPhpFpmLibs | grep '\/libphp\|fileinfo.so$' | head -1) - fi - rlPhaseEnd - - rlPhaseStartTest "php-cli" - # Test that the phpinfo() function has produced some useful output - rlRun "php $TESTDIR/$REPRODUCER | sed -n '/PHP Version/{s/.*Version[^0-9]*\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;p;}' | head -1 | tee output" 0 - rlRun "rpm -q --qf '%{version}\n' $(rpm -qf $(which php)) | sed 1q | tee rpmoutput" 0 - rlAssertNotDiffer output rpmoutput - rlPhaseEnd - - if [ -n "$phpUsePhpFpm" ]; then - rlPhaseStartTest "mod_php" - else - rlPhaseStartTest "php-fpm" - fi - # Test that the phpinfo() function has produced some useful output - rlRun "curl $URL | sed -n '/PHP Version/{s/.*Version[^0-9]*\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;p;}' | head -1 | tee curloutput" 0 - rlRun "rpm -q --qf '%{version}\n' $(rpm -qf $php_BIN) | sed 1q | tee rpmoutput" 0 - rlRun "rpm -q --qf '%{version}\n' $(rpm -qf $php_lib) | sed 1q | tee rpmoutput2" 0 - rlAssertNotDiffer curloutput rpmoutput - rlAssertNotDiffer curloutput rpmoutput2 - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "rm ${httpROOTDIR}/$REPRODUCER" - rlFileRestore - if [ -n "$phpUsePhpFpm" ]; then - rlServiceRestore "$PHP_FPM_RPM" - fi - rlRun "httpStop" 0 "Stop httpd" - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd