Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/
Date: Mon, 27 Jun 2016 05:58:30
Message-Id: 1467007094.831e3f05df898a0d3df1bbff8914ca28f08a95cb.mgorny@gentoo
1 commit: 831e3f05df898a0d3df1bbff8914ca28f08a95cb
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 27 05:57:42 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 27 05:58:14 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=831e3f05
7
8 eclass/tests: Remove KV_* functions from tests-common.sh
9
10 eclass/tests/tests-common.sh | 41 -----------------------------------------
11 1 file changed, 41 deletions(-)
12
13 diff --git a/eclass/tests/tests-common.sh b/eclass/tests/tests-common.sh
14 index d3095e5..faca39d 100644
15 --- a/eclass/tests/tests-common.sh
16 +++ b/eclass/tests/tests-common.sh
17 @@ -65,47 +65,6 @@ has_version() {
18 portageq has_version / "$@"
19 }
20
21 -KV_major() {
22 - [[ -z $1 ]] && return 1
23 -
24 - local KV=$@
25 - echo "${KV%%.*}"
26 -}
27 -
28 -KV_minor() {
29 - [[ -z $1 ]] && return 1
30 -
31 - local KV=$@
32 - KV=${KV#*.}
33 - echo "${KV%%.*}"
34 -}
35 -
36 -KV_micro() {
37 - [[ -z $1 ]] && return 1
38 -
39 - local KV=$@
40 - KV=${KV#*.*.}
41 - echo "${KV%%[^[:digit:]]*}"
42 -}
43 -
44 -KV_to_int() {
45 - [[ -z $1 ]] && return 1
46 -
47 - local KV_MAJOR=$(KV_major "$1")
48 - local KV_MINOR=$(KV_minor "$1")
49 - local KV_MICRO=$(KV_micro "$1")
50 - local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
51 -
52 - # We make version 2.2.0 the minimum version we will handle as
53 - # a sanity check ... if its less, we fail ...
54 - if [[ ${KV_int} -ge 131584 ]] ; then
55 - echo "${KV_int}"
56 - return 0
57 - fi
58 -
59 - return 1
60 -}
61 -
62 tret=0
63 tbegin() {
64 ebegin "Testing $*"