use the system patch to test the upstream test suites

This commit is contained in:
Than Ngo 2019-03-05 09:34:48 +01:00
parent 4e0d39725c
commit a061c1d58d
7 changed files with 34 additions and 31 deletions

View File

@ -1 +0,0 @@
WORKING ON: Please don't migrate to dist-git

View File

@ -1,3 +0,0 @@
#!/bin/bash
export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined"
exec merge-standard-inventory "$@"

View File

@ -1,3 +0,0 @@
PURPOSE of /CoreOS/patch/Sanity/selftest
Description: Executes upstream test suite
Author: Miroslav Vadkerti <mvadkert@redhat.com>

View File

@ -1,14 +1,14 @@
--- ---
# This first play always runs on the local staging system # Run tests in all contexts
- hosts: localhost - hosts: localhost
roles:
- role: standard-test-beakerlib
tags: tags:
- classic - classic
roles:
- role: standard-test-beakerlib
tests: tests:
- Cannot-handle-file-names-with-integrated-spaces - Cannot-handle-file-names-with-integrated-spaces
- Regression-wrong-name-used-when-adding-new-file - Regression-wrong-name-used-when-adding-new-file
- selftest - upstream-test-suite
required_packages: required_packages:
- patch - patch
- expect - expect

View File

@ -1,12 +1,13 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# #
# Makefile of /CoreOS/patch/Sanity/selftest # Makefile of /CoreOS/patch/Sanity/upstream-test-suite
# Description: Executes upstream test suite # Description: tests upstream test suite
# Author: Miroslav Vadkerti <mvadkert@redhat.com> # Author: Miroslav Vadkerti <mvadkert@redhat.com>
# Author: Than Ngo <than@redhat.com>
# #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# #
# Copyright (c) 2010 Red Hat, Inc. All rights reserved. # Copyright (c) 2019 Red Hat, Inc. All rights reserved.
# #
# This copyrighted material is made available to anyone wishing # This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms # to use, modify, copy, or redistribute it subject to the terms
@ -24,7 +25,7 @@
# #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/patch/Sanity/selftest export TEST=/CoreOS/patch/Sanity/upstream-test-suite
export TESTVERSION=1.0 export TESTVERSION=1.0
BUILT_FILES= BUILT_FILES=
@ -59,6 +60,6 @@ $(METADATA): Makefile
@echo "License: GPLv2" >> $(METADATA) @echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA) @echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA) @echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL3 -RHEL4 -RHELServer5 -RHELClient5" >> $(METADATA) @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA) rhts-lint $(METADATA)

View File

@ -0,0 +1,7 @@
PURPOSE of /CoreOS/patch/Sanity/upstream-test-suite
Description: Tests upstream test suite
Author: Miroslav Vadkerti <mvadkert@redhat.com>
tests following scenarios:
* download source rpm and build
* use the system patch to run the upstream test suite

View File

@ -40,6 +40,7 @@ if [[ $TARGET != "" ]]; then TARGET="--target `uname -m`"; fi
TOPDIR=`mktemp -d` TOPDIR=`mktemp -d`
SPEC="$TOPDIR/SPECS/$PACKAGE*.spec" SPEC="$TOPDIR/SPECS/$PACKAGE*.spec"
TESTDIR="$TOPDIR/BUILD/$UPSTREAMPKG/" TESTDIR="$TOPDIR/BUILD/$UPSTREAMPKG/"
PATCH=/usr/bin/patch
rlJournalStart rlJournalStart
rlPhaseStartSetup rlPhaseStartSetup
@ -49,6 +50,7 @@ rlJournalStart
rlPhaseEnd rlPhaseEnd
rlPhaseStartTest rlPhaseStartTest
rlAssertExists $PATCH
rlFetchSrcForInstalled $PACKAGE rlFetchSrcForInstalled $PACKAGE
rlRun "rpm -ivh --define '_topdir $TOPDIR' $PACKAGE*.src.rpm" 0 "Installing $PACKAGE src rpm" rlRun "rpm -ivh --define '_topdir $TOPDIR' $PACKAGE*.src.rpm" 0 "Installing $PACKAGE src rpm"
echo "+ Building $PACKAGE (Log: $BUILDLOG)" echo "+ Building $PACKAGE (Log: $BUILDLOG)"
@ -63,7 +65,7 @@ rlJournalStart
if rlIsRHEL 6; then if rlIsRHEL 6; then
rlAssertGrep 'All tests succeeded!' $TESTLOG rlAssertGrep 'All tests succeeded!' $TESTLOG
else else
rlAssertNotGrep "FAILED" $TESTLOG rlAssertNotGrep "^FAIL:" $TESTLOG
fi fi
rlPhaseEnd rlPhaseEnd