Exchange etcd with grafana
This commit is contained in:
parent
69ba76f1b3
commit
a61079afca
@ -1,3 +0,0 @@
|
|||||||
PURPOSE of /tools/go-rpm-macros/Sanity/gobuild-etcd
|
|
||||||
Description: golang rpm macros usage building etcd
|
|
||||||
Author: Jan Kuřík <jkurik@redhat.com>
|
|
@ -1,17 +0,0 @@
|
|||||||
summary: golang rpm macros usage building etcd
|
|
||||||
description: ''
|
|
||||||
contact: Jan Kuřík <jkurik@redhat.com>
|
|
||||||
component:
|
|
||||||
- golang
|
|
||||||
test: ./runtest.sh
|
|
||||||
framework: beakerlib
|
|
||||||
recommend:
|
|
||||||
- golang
|
|
||||||
- go-rpm-macros
|
|
||||||
- go-srpm-macros
|
|
||||||
- /usr/bin/yumdownloader
|
|
||||||
- /usr/bin/yum-builddep
|
|
||||||
- /usr/bin/rpmbuild
|
|
||||||
duration: 2h
|
|
||||||
extra-summary: /tools/go-rpm-macros/Sanity/gobuild-etcd
|
|
||||||
extra-task: /tools/go-rpm-macros/Sanity/gobuild-etcd
|
|
@ -1,7 +1,7 @@
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#
|
#
|
||||||
# Makefile of /tools/go-rpm-macros/Sanity/gobuild-etcd
|
# Makefile of /tools/go-rpm-macros/Sanity/gobuild-grafana
|
||||||
# Description: golang rpm macros usage building etcd
|
# Description: golang rpm macros usage building grafana
|
||||||
# Author: Jan Kuřík <jkurik@redhat.com>
|
# Author: Jan Kuřík <jkurik@redhat.com>
|
||||||
#
|
#
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -23,7 +23,7 @@
|
|||||||
#
|
#
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
export TEST=/tools/go-rpm-macros/Sanity/gobuild-etcd
|
export TEST=/tools/go-rpm-macros/Sanity/gobuild-grafana
|
||||||
export TESTVERSION=1.0
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
BUILT_FILES=
|
BUILT_FILES=
|
||||||
@ -49,7 +49,7 @@ $(METADATA): Makefile
|
|||||||
@echo "Name: $(TEST)" >> $(METADATA)
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
@echo "Description: golang rpm macros usage building etcd" >> $(METADATA)
|
@echo "Description: golang rpm macros usage building" >> $(METADATA)
|
||||||
@echo "Type: Sanity" >> $(METADATA)
|
@echo "Type: Sanity" >> $(METADATA)
|
||||||
@echo "TestTime: 2h" >> $(METADATA)
|
@echo "TestTime: 2h" >> $(METADATA)
|
||||||
@echo "RunFor: golang" >> $(METADATA)
|
@echo "RunFor: golang" >> $(METADATA)
|
3
tests/Sanity/gobuild-grafana/PURPOSE
Normal file
3
tests/Sanity/gobuild-grafana/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PURPOSE of /tools/go-rpm-macros/Sanity/gobuild-grafana
|
||||||
|
Description: golang rpm macros usage building grafana
|
||||||
|
Author: Jan Kuřík <jkurik@redhat.com>
|
17
tests/Sanity/gobuild-grafana/main.fmf
Normal file
17
tests/Sanity/gobuild-grafana/main.fmf
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
summary: golang rpm macros usage building
|
||||||
|
description: ''
|
||||||
|
contact: Jan Kuřík <jkurik@redhat.com>
|
||||||
|
component:
|
||||||
|
- golang
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
recommend:
|
||||||
|
- golang
|
||||||
|
- go-rpm-macros
|
||||||
|
- go-srpm-macros
|
||||||
|
- /usr/bin/yumdownloader
|
||||||
|
- /usr/bin/yum-builddep
|
||||||
|
- /usr/bin/rpmbuild
|
||||||
|
duration: 2h
|
||||||
|
extra-summary: /tools/go-rpm-macros/Sanity/gobuild-grafana
|
||||||
|
extra-task: /tools/go-rpm-macros/Sanity/gobuild-grafana
|
@ -2,8 +2,8 @@
|
|||||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#
|
#
|
||||||
# runtest.sh of /tools/go-rpm-macros/Sanity/gobuild-etcd
|
# runtest.sh of /tools/go-rpm-macros/Sanity/gobuild-grafana
|
||||||
# Description: golang rpm macros usage building etcd
|
# Description: golang rpm macros usage building grafana
|
||||||
# Author: Jan Kuřík <jkurik@redhat.com>
|
# Author: Jan Kuřík <jkurik@redhat.com>
|
||||||
#
|
#
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -37,7 +37,7 @@ set -o pipefail
|
|||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartSetup
|
rlPhaseStartSetup
|
||||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
rlRun "TmpDir=\$(mktemp -d /var/tmp/XXXXXXX)" 0 "Creating tmp directory"
|
||||||
rlRun "pushd $TmpDir"
|
rlRun "pushd $TmpDir"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
@ -48,16 +48,23 @@ rlJournalStart
|
|||||||
rlAssertNotEquals "Checking if %gotest macro is defined" "$gotest_string" "%gotest"
|
rlAssertNotEquals "Checking if %gotest macro is defined" "$gotest_string" "%gotest"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStart FAIL "setup etcd sources"
|
rlPhaseStart FAIL "setup grafana sources"
|
||||||
rlRun "SRPM=\$(basename \$(yumdownloader --source --url etcd | tail -n 1))"
|
rlRun "SRPM=\$(basename \$(yumdownloader --source --url grafana | tail -n 1))"
|
||||||
rlRun "yumdownloader --source etcd"
|
rlRun "yumdownloader --source grafana"
|
||||||
rlRun "yum-builddep --enablerepo=\* -y --srpm ${SRPM}"
|
rlRun "yum-builddep --enablerepo=\* -y --srpm ${SRPM}"
|
||||||
|
rlRun "rpm -i -D '_topdir $TmpDir' ${SRPM}"
|
||||||
|
rlRun "sed -i 's/^\s*%define\s*compile_frontend\s.*/%define compile_frontend 0/g' \
|
||||||
|
SPECS/grafana.spec" 0 "Make sure we build only the golang part, no JS stuff"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "rpmbuild etcd"
|
rlPhaseStartTest "rpmbuild grafana"
|
||||||
rlRun "rpmbuild --define='_topdir $TmpDir' --rebuild --nocheck ${SRPM} \
|
rlRun "rpmbuild --showrc &> ${TmpDir}/rpm.rc"
|
||||||
|& tee etcd.rpmbuild.log"
|
rlFileSubmit "${TmpDir}/rpm.rc"
|
||||||
rlFileSubmit "etcd.rpmbuild.log"
|
rlAssertGrep "%gobuild" SPECS/grafana.spec -w
|
||||||
|
rlAssertGrep "%gotest" SPECS/grafana.spec -w
|
||||||
|
rlRun "rpmbuild -bc --define='_topdir $TmpDir' SPECS/grafana.spec \
|
||||||
|
|& tee grafana.rpmbuild.log"
|
||||||
|
rlFileSubmit "grafana.rpmbuild.log"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
rlPhaseStartCleanup
|
Loading…
Reference in New Issue
Block a user