Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH 3/3] mkrelease: add a --runtests shortcut
Date: Sun, 05 Jan 2014 18:27:33
Message-Id: 1388946218.17870.2.camel@big_daddy.dol-sen.ca
In Reply to: [gentoo-portage-dev] [PATCH 3/3] mkrelease: add a --runtests shortcut by Mike Frysinger
1 On Sun, 2014-01-05 at 10:50 -0500, Mike Frysinger wrote:
2 > This automates the release+test cycle a bit so people don't have to do
3 > it all by hand.
4 > ---
5 > DEVELOPING | 7 ++-----
6 > mkrelease.sh | 15 +++++++++++++--
7 > 2 files changed, 15 insertions(+), 7 deletions(-)
8 >
9 > diff --git a/DEVELOPING b/DEVELOPING
10 > index 7aac81b..b704a50 100644
11 > --- a/DEVELOPING
12 > +++ b/DEVELOPING
13 > @@ -167,11 +167,8 @@ Releases
14 > First create a git tag for this release:
15 > git tag v2.2.8
16 >
17 > -Then create the tarball:
18 > - ./mkrelease.sh --changelog-rev v2.2.7 --tag 2.2.8
19 > -
20 > -Unpack the tarball and run tests:
21 > - ./runtests.sh --python-versions=supported
22 > +Then create the tarball and run the tests:
23 > + ./mkrelease.sh --changelog-rev v2.2.7 --tag --runtests 2.2.8
24 > Make sure you have all supported python versions installed first
25 > (see PYTHON_SUPPORTED_VERSIONS in runtests.sh).
26 >
27 > diff --git a/mkrelease.sh b/mkrelease.sh
28 > index 50bdb3c..334b4fb 100755
29 > --- a/mkrelease.sh
30 > +++ b/mkrelease.sh
31 > @@ -8,9 +8,10 @@ BRANCH=${BRANCH:-master}
32 > USE_TAG=false
33 > CHANGELOG_REVISION=
34 > UPLOAD_LOCATION=
35 > +RUNTESTS=false
36 >
37 > usage() {
38 > - echo "Usage: ${0##*/} [--changelog-rev <tree-ish>] [-t|--tag] [-u|--upload <location>] <version>"
39 > + echo "Usage: ${0##*/} [--changelog-rev <tree-ish>] [-t|--tag] [-u|--upload <location>] [--runtests] <version>"
40 > exit ${1:-0}
41 > }
42 >
43 > @@ -19,7 +20,7 @@ die() {
44 > usage 1
45 > }
46 >
47 > -ARGS=$(getopt -o htu: --long help,changelog-rev:,tag,upload: \
48 > +ARGS=$(getopt -o htu: --long help,changelog-rev:,runtests,tag,upload: \
49 > -n "${0##*/}" -- "$@")
50 > [ $? != 0 ] && die "initialization error"
51 >
52 > @@ -42,6 +43,10 @@ while true; do
53 > -h|--help)
54 > usage
55 > ;;
56 > + --runtests)
57 > + RUNTESTS=true
58 > + shift
59 > + ;;
60 > --)
61 > shift
62 > break
63 > @@ -78,6 +83,12 @@ cp -a "${SOURCE_DIR}/"{bin,cnf,doc,man,misc,pym} "${RELEASE_DIR}/" || die "direc
64 > cp "${SOURCE_DIR}/"{DEVELOPING,LICENSE,Makefile,NEWS,README,RELEASE-NOTES,TEST-NOTES} \
65 > "${RELEASE_DIR}/" || die "file copy failed"
66 >
67 > +if [[ ${RUNTESTS} == "true" ]] ; then
68 > + pushd "${SOURCE_DIR}" >/dev/null
69 > + ./runtests.sh --python-versions=supported || die "tests failed"
70 > + popd >/dev/null
71 > +fi
72 > +
73 > rm -rf "${SOURCE_DIR}" || die "directory cleanup failed"
74 >
75 > echo ">>> Setting portage.VERSION"
76
77
78 I've added them to my checkout and running it now.
79
80 If it all works as it should, I'll push them all with the 2.2.8 release.
81 They do not affect portage/emerge, so shouldn't need more testing time.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies