diff --git a/bundler-unit-tests/Makefile b/bundler-unit-tests/Makefile deleted file mode 100644 index 123c1d6..0000000 --- a/bundler-unit-tests/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Description: Runs ruby upstream test suite -# Author: Iveta Senfeldova -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 Red Hat, Inc. -# -# 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=/CoreOS/rubygem-bundler/unit-tests -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE builders.patch - -.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: Iveta Senfeldova " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Runs upstream test suite" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 30m" >> $(METADATA) - @echo "RunFor: rubygem-bundler" >> $(METADATA) - @echo "Requires: rubygem-bundler rubygem-thor rubygem-rdoc rubygem-net-http-persistent rubygem-psych rubygems rubygems-devel git ruby ruby-devel" >> $(METADATA) - @echo "RhtsRequires: library(distribution/sundry)" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1194243" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/bundler-unit-tests/PURPOSE b/bundler-unit-tests/PURPOSE deleted file mode 100644 index e184c3a..0000000 --- a/bundler-unit-tests/PURPOSE +++ /dev/null @@ -1 +0,0 @@ -Test runs upstream test suite which is disabled in time of building the package because of missing dependencies (these dependencies are not shipped in CentOS/RHEL) diff --git a/bundler-unit-tests/builders.patch b/bundler-unit-tests/builders.patch deleted file mode 100644 index 1717976..0000000 --- a/bundler-unit-tests/builders.patch +++ /dev/null @@ -1,114 +0,0 @@ ---- builders.rb 2015-07-09 10:50:20.464498376 +0200 -+++ builders-new.rb 2015-07-09 11:13:58.845512475 +0200 -@@ -625,57 +631,59 @@ - end - end - -- TEST_CERT=< -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 Red Hat, Inc. -# -# 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 -[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGES=${PACKAGES:-rubygem-bundler} -REQUIRES=${REQUIRES:-rubygem-thor rubygem-net-http-persistent rubygems rubygems-devel rubygem-rdoc ruby ruby-devel} -BUNDLER=$(rpm -qf --queryformat '%{name}\n' $(which bundler)) -COLL_PATH="" -COLL="$(echo $COLLECTIONS|grep -Eo "\b(rh-)?ruby[0-9]*\b"|tail -1)" -RUN_RSPEC="rspec spec" -BUILD_INSTALLED=false - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm --all - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "cp builders.patch $TmpDir" 0 - rlRun "pushd $TmpDir" - if [[ -n "$COLLECTIONS" ]] - then - rlRun "rlImport distribution/sundry" 0 "Importing sundry library" || rlDie - rlRun "sundryFetchBuildForInstalledPackage $COLL" 0 "Fetching -build sub-package for $COLL" - rlRun "sundryFetchBuildForInstalledPackage $COLL" 0 "Fetching -build sub-package for $COLL" - rlRun "yum -y localinstall $COLL-build*.rpm && BUILD_INSTALLED=true" 0 "Installing $COLL-build package" - fi - rlRun "useradd rubyuser" 0 "Adding user rubyuser to the system" - rlRun "chown -R rubyuser:rubyuser $TmpDir" 0 - rlRun "rlFetchSrcForInstalled $BUNDLER" 0 "Fetching source package for $BUNDLER" - rlRun "su rubyuser -c \"rpm --define '_topdir $TmpDir' -i $TmpDir/*src.rpm\"" 0 \ - "Installing the source rpm" - rlRun "su rubyuser -c \"rpmbuild --nodeps --define '_topdir $TmpDir' -bc $TmpDir/SPECS/*spec\"" 0 \ - "Building package" - VERSION=$(rpm -q --qf "%{VERSION}\n" $BUNDLER | tail -1) - SRC_PATH="$TmpDir/BUILD/$BUNDLER-$VERSION" - - # if we are in collections we need to set correct path and prepare for enabling ror - if [[ -n "$COLLECTIONS" ]] - then - COLL_PATH=$(which bundler | sed 's/\/usr\/bin\/bundler//') - RUN_RSPEC="scl enable $(echo $COLLECTIONS | grep -Eo '\b(rh-)?ror[0-9]*\b'|tail -1) 'rspec spec'" - fi - rlRun "pushd $SRC_PATH$COLL_PATH/usr/share/gems/gems/bundler-$VERSION/" 0 "Go to gem install dir" - - # on RHEL6/7 without collections we need to fix valid certs - if [ -z "$COLLECTIONS" ] && rlIsRHEL '<=7' - then - rlRun "su rubyuser -c \"patch spec/support/builders.rb $TmpDir/builders.patch\"" 0 \ - "Patching builders.rb with new valid certificates so some set of tests won't fail" - else - rlRun "su rubyuser -c \"tar xzvf $TmpDir/SOURCES/*-specs.tgz\"" 0 "Unpacking specs into install directory" - fi - # SPEC file steps: - # This test does not work, since ruby is configured with --with-ruby-version='' - # https://github.com/bundler/bundler/issues/2365 - su rubyuser -c "sed -i '/\"fetches gems again after changing the version of Ruby\"/,/end$/{s/^/#/}' spec/install/gems/platform_spec.rb" - - # Test suite needs to run in initialized git repository. - # https://github.com/carlhuda/bundler/issues/2022 - su rubyuser -c "git init" - - # on RHEL6/7 without collections use additional dependencies from the system - set -x - if [ -z "$COLLECTIONS" ] && rlIsRHEL '<=7' - then - # Test with system net-http-persistent and thor - for dependency in net-http-persistent thor - do - for fileordir in \ - /usr/share/gems/gems/$dependency-*/lib/* - do - su rubyuser -c "ln -s -f $fileordir lib/bundler/vendor/$(basename $fileordir)" - done - done - # end of SPEC file steps - - # gems required to run unit tests - # older versions which should be compatible with ruby-2.0.0, but it's currently without effect, rspec fetches newer versions anyway - #GEMS="rspec-mocks3.1.0 rspec-support:3.1.0 rspec-expectations:3.1.0 rspec-core:3.1.0 rspec:3.1.0 diff-lcs rack:1.5.2 rake:10.3.2 sinatra:1.4.5" - GEMS="rspec-mocks rspec-support rspec-expectations rspec-core rspec diff-lcs" - rlRun "gem install $GEMS" 0 "Installing $GEMS" - fi - set +x - rlPhaseEnd - - rlPhaseStartTest - rlRun "su rubyuser -c \"$RUN_RSPEC | tee output.log\"" 0 "Run unit tests" - rlAssertGrep "examples, 0 failures," output.log - rlPhaseEnd - - rlPhaseStartCleanup - if [ -z "$COLLECTIONS" ] && rlIsRHEL '<=7' - then - rlRun "gem uninstall $GEMS -a -I -x --force" 0 "Removing installed gems" - fi - $BUILD_INSTALLED && rlRun "yum -y remove $COLL-build" 0 "Removing $COLL-build package" - rlRun "userdel -r rubyuser" 0 "Removing rubyuser from the system" - rlRun "popd ; popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/main.fmf b/main.fmf new file mode 100644 index 0000000..d8dccdd --- /dev/null +++ b/main.fmf @@ -0,0 +1,9 @@ +contact: Vít Ondruch +test: runtest.sh +category: integration + +/run-basic-rails-application: + component: rubygem-rails + +/systemtap-static-probes-in-ruby: + component: systemtap