use the system patch to test the upstream test suites
This commit is contained in:
parent
4e0d39725c
commit
a061c1d58d
@ -1 +0,0 @@
|
||||
WORKING ON: Please don't migrate to dist-git
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined"
|
||||
exec merge-standard-inventory "$@"
|
@ -1,3 +0,0 @@
|
||||
PURPOSE of /CoreOS/patch/Sanity/selftest
|
||||
Description: Executes upstream test suite
|
||||
Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
@ -1,14 +1,14 @@
|
||||
---
|
||||
# This first play always runs on the local staging system
|
||||
# Run tests in all contexts
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- Cannot-handle-file-names-with-integrated-spaces
|
||||
- Regression-wrong-name-used-when-adding-new-file
|
||||
- selftest
|
||||
- upstream-test-suite
|
||||
required_packages:
|
||||
- patch
|
||||
- expect
|
||||
|
@ -1,12 +1,13 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/patch/Sanity/selftest
|
||||
# Description: Executes upstream test suite
|
||||
# Makefile of /CoreOS/patch/Sanity/upstream-test-suite
|
||||
# Description: tests upstream test suite
|
||||
# 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
|
||||
# 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
|
||||
|
||||
BUILT_FILES=
|
||||
@ -59,6 +60,6 @@ $(METADATA): Makefile
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL3 -RHEL4 -RHELServer5 -RHELClient5" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
7
tests/upstream-test-suite/PURPOSE
Normal file
7
tests/upstream-test-suite/PURPOSE
Normal 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
|
@ -40,15 +40,17 @@ if [[ $TARGET != "" ]]; then TARGET="--target `uname -m`"; fi
|
||||
TOPDIR=`mktemp -d`
|
||||
SPEC="$TOPDIR/SPECS/$PACKAGE*.spec"
|
||||
TESTDIR="$TOPDIR/BUILD/$UPSTREAMPKG/"
|
||||
PATCH=/usr/bin/patch
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
for PKG in $PACKAGES; do
|
||||
rlAssertRpm $PKG
|
||||
done
|
||||
rlPhaseEnd
|
||||
rlPhaseStartSetup
|
||||
for PKG in $PACKAGES; do
|
||||
rlAssertRpm $PKG
|
||||
done
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlPhaseStartTest
|
||||
rlAssertExists $PATCH
|
||||
rlFetchSrcForInstalled $PACKAGE
|
||||
rlRun "rpm -ivh --define '_topdir $TOPDIR' $PACKAGE*.src.rpm" 0 "Installing $PACKAGE src rpm"
|
||||
echo "+ Building $PACKAGE (Log: $BUILDLOG)"
|
||||
@ -60,16 +62,16 @@ rlJournalStart
|
||||
rlRun "cd $TESTDIR"
|
||||
rlRun "make check &> $TESTLOG"
|
||||
cat $TESTLOG
|
||||
if rlIsRHEL 6; then
|
||||
rlAssertGrep 'All tests succeeded!' $TESTLOG
|
||||
else
|
||||
rlAssertNotGrep "FAILED" $TESTLOG
|
||||
fi
|
||||
rlPhaseEnd
|
||||
if rlIsRHEL 6; then
|
||||
rlAssertGrep 'All tests succeeded!' $TESTLOG
|
||||
else
|
||||
rlAssertNotGrep "^FAIL:" $TESTLOG
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -rf $PACKAGE*.src.rpm" 0 "Removing source rpm"
|
||||
rlPhaseEnd
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
Loading…
Reference in New Issue
Block a user