public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/
@ 2014-03-15  6:09 Mike Frysinger
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2014-03-15  6:09 UTC (permalink / raw
  To: gentoo-commits

commit:     243c6187e605b92cd55db830582cc6a766c912dc
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 15 06:08:55 2014 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Mar 15 06:08:55 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commit;h=243c6187

tests: qdepends: add a -Q test

---
 tests/qdepends/dotest | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index d723228..49d5950 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -7,8 +7,8 @@ set -e
 mktmpdir
 
 test() {
-	local num=$1 dep=$2 exp=${3:-0} ret
-	local cmd=( qdepends -f "${dep}" )
+	local num=$1 exp=$2 ret
+	local cmd=( qdepends "${@:3}" )
 
 	"${cmd[@]}" >& list && ret=0 || ret=$?
 	if [[ ${ret} -ne ${exp} ]] ; then
@@ -26,18 +26,25 @@ test() {
 	tend $? "${cmd[*]}"
 }
 
+testf() { test "$1" "${3:-0}" -f "$2"; }
+
 # basic sanity checks
-test 00 '|' 1
-test 01 ''
-test 02 'a/b'
-test 03 'foo? ( a/b )'
-test 04 '|| ( a/b )'
+testf 00 '|' 1
+testf 01 ''
+testf 02 'a/b'
+testf 03 'foo? ( a/b )'
+testf 04 '|| ( a/b )'
 
 # a bit more complicated with or deps
-test 05 '|| ( || ( || ( x ) a ) )'
+testf 05 '|| ( || ( || ( x ) a ) )'
 
 # hande use deps on atoms #470180
-test 06 'a[foo(+)]'
+testf 06 'a[foo(+)]'
+
+testQ() { test "$1" "${3:-0}" -Q "$2"; }
+
+# reverse checks #504636
+testQ 07 xinit
 
 cleantmpdir
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/
@ 2019-04-08  9:02 Fabian Groffen
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Groffen @ 2019-04-08  9:02 UTC (permalink / raw
  To: gentoo-commits

commit:     1ff2dedfee5b06d1ee67faf56938b3dc7b683907
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 09:00:56 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 09:00:56 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=1ff2dedf

tests: avoid string comparison in qdepends

Travis seems to not match this, so rewrite using a case-switch.  Perhaps
the shell used isn't bash or some version which doesn't grok the use I
envisioned.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qdepends/dotest | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index ab5e2d3..11f7aad 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -24,13 +24,16 @@ test() {
 	# qdepends output is based on a hash, which may differ based on
 	# endiannes, so sort the output so we get a deterministic set
 	while IFS= read -r line ; do
-		if [[ ${line} == *:* ]] ; then
+		case "${line}" in
+		*:*)
 			pkg=${line%%:*}
 			env LC_ALL=C \
 				echo "${pkg}: $(echo ${line#*:} | xargs -n1 | sort | xargs)"
-		else
+			;;
+		*)
 			echo "${line}"
-		fi
+			;;
+		esac
 	done < list | diff list - | patch -s list
 
 	local good="${as}/list${num}.good"


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/
@ 2019-04-08  9:02 Fabian Groffen
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Groffen @ 2019-04-08  9:02 UTC (permalink / raw
  To: gentoo-commits

commit:     2f1506290aa5ad0023bc204dd43f72a20bc1405e
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 08:18:20 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 08:18:20 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=2f150629

tests: try and get qdepends test to clear regarding order changes

Travis for some reason sorts differently, try forcing explict C locale,
even though Travis should be using that already.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qdepends/dotest | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index 41a4edd..ab5e2d3 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -26,7 +26,8 @@ test() {
 	while IFS= read -r line ; do
 		if [[ ${line} == *:* ]] ; then
 			pkg=${line%%:*}
-			echo "${pkg}: $(echo ${line#*:} | xargs -n1 | sort | xargs)"
+			env LC_ALL=C \
+				echo "${pkg}: $(echo ${line#*:} | xargs -n1 | sort | xargs)"
 		else
 			echo "${line}"
 		fi


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/
@ 2019-04-08  9:20 Fabian Groffen
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Groffen @ 2019-04-08  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     519ea2292367f3fc2cab6ec357d613cb6bb00bba
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 09:19:09 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 09:19:09 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=519ea229

tests: last attempt (?) to get qdepends test running on Travis

Perhaps old bash, or perhaps using dash (even though it shouldn't), well
maybe the greedy matches aren't supported well, replace with old cut to
split up strings.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qdepends/dotest | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index 11f7aad..6378fc7 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -26,9 +26,11 @@ test() {
 	while IFS= read -r line ; do
 		case "${line}" in
 		*:*)
-			pkg=${line%%:*}
+			# dinosaur style for Travis' /bin/bash (or /bin/sh?)
+			pkg="$(echo "${line}" | cut -d':' -f1)"
+			line="$(echo "${line}" | cut -d':' -f2-)"
 			env LC_ALL=C \
-				echo "${pkg}: $(echo ${line#*:} | xargs -n1 | sort | xargs)"
+				echo "${pkg}: $(echo "${line}" | xargs -n1 | sort | xargs)"
 			;;
 		*)
 			echo "${line}"


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/
@ 2019-04-08  9:50 Fabian Groffen
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Groffen @ 2019-04-08  9:50 UTC (permalink / raw
  To: gentoo-commits

commit:     5a792fca6a20b83adaa1cfa6994bd019509c5a56
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 09:27:11 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 09:30:43 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=5a792fca

travis: generate debug messages to perhaps get a glimpse of the problem

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qdepends/dotest | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index 6378fc7..fb1c694 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -24,11 +24,14 @@ test() {
 	# qdepends output is based on a hash, which may differ based on
 	# endiannes, so sort the output so we get a deterministic set
 	while IFS= read -r line ; do
+		echo "I read: ${line} with ${SHELL}/${BASH}"
 		case "${line}" in
-		*:*)
+		*":"*)
+			echo "I found a :"
 			# dinosaur style for Travis' /bin/bash (or /bin/sh?)
 			pkg="$(echo "${line}" | cut -d':' -f1)"
 			line="$(echo "${line}" | cut -d':' -f2-)"
+			echo "I think pkg=${pkg}, line=${line}"
 			env LC_ALL=C \
 				echo "${pkg}: $(echo "${line}" | xargs -n1 | sort | xargs)"
 			;;


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/
@ 2019-04-08  9:50 Fabian Groffen
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Groffen @ 2019-04-08  9:50 UTC (permalink / raw
  To: gentoo-commits

commit:     93279f2848d01437bf203c11ec0a7a14d43e3ad1
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 09:38:05 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 09:38:05 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=93279f28

travis: try line splitting for xargs

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qdepends/dotest | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index 8971d6e..516d793 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -24,16 +24,12 @@ test() {
 	# qdepends output is based on a hash, which may differ based on
 	# endiannes, so sort the output so we get a deterministic set
 	while IFS= read -r line ; do
-		echo "I read: ${line} with ${SHELL}/${BASH}"
 		case "${line}" in
-		*":"*)
-			echo "I found a :"
-			# dinosaur style for Travis' /bin/bash (or /bin/sh?)
-			pkg="$(echo "${line}" | cut -d':' -f1)"
-			line="$(echo "${line}" | cut -d':' -f2-)"
-			echo "I think pkg=${pkg}, line=${line}"
+		*:*)
+			pkg=${line%%:*}
+			line=${line#*:}
 			env LC_ALL=C \
-				echo "${pkg}: $(echo "${line}" | xargs -n1 | sort | xargs)"
+				echo "${pkg}: $(echo "${line}" | tr ' ' '\n' | sort | xargs)"
 			;;
 		*)
 			echo "${line}"
@@ -51,7 +47,6 @@ test() {
 
 testf() { test "$1" "${3:-0}" -f "$2"; }
 
-if false ; then
 # basic sanity checks
 testf 00 '|' 1
 testf 01 ''
@@ -64,7 +59,6 @@ testf 05 '|| ( || ( || ( x ) a ) )'
 
 # hande use deps on atoms #470180
 testf 06 'a[foo(+)]'
-fi
 
 testQ() { test "$1" "${3:-0}" -Q "$2"; }
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/
@ 2019-04-08  9:50 Fabian Groffen
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Groffen @ 2019-04-08  9:50 UTC (permalink / raw
  To: gentoo-commits

commit:     dfaa42c80bb27b73ab826e5f949f76c12a2739ad
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 09:31:16 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 09:31:16 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=dfaa42c8

travis: skip over to interesting test

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qdepends/dotest | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index fb1c694..8971d6e 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -51,6 +51,7 @@ test() {
 
 testf() { test "$1" "${3:-0}" -f "$2"; }
 
+if false ; then
 # basic sanity checks
 testf 00 '|' 1
 testf 01 ''
@@ -63,6 +64,7 @@ testf 05 '|| ( || ( || ( x ) a ) )'
 
 # hande use deps on atoms #470180
 testf 06 'a[foo(+)]'
+fi
 
 testQ() { test "$1" "${3:-0}" -Q "$2"; }
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/
@ 2019-04-08  9:50 Fabian Groffen
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Groffen @ 2019-04-08  9:50 UTC (permalink / raw
  To: gentoo-commits

commit:     f61e96c0883459f29679e736cd136e63a60c1b92
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 09:44:46 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 09:44:46 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f61e96c0

travis: see if sort is called

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qdepends/dotest | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index 516d793..c507f08 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -28,8 +28,7 @@ test() {
 		*:*)
 			pkg=${line%%:*}
 			line=${line#*:}
-			env LC_ALL=C \
-				echo "${pkg}: $(echo "${line}" | tr ' ' '\n' | sort | xargs)"
+			echo "${pkg}: sort? $(echo "${line}" | tr ' ' '\n' | LC_ALL=C sort | xargs)"
 			;;
 		*)
 			echo "${line}"


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/
@ 2019-04-08  9:50 Fabian Groffen
  0 siblings, 0 replies; 9+ messages in thread
From: Fabian Groffen @ 2019-04-08  9:50 UTC (permalink / raw
  To: gentoo-commits

commit:     04cffcbb0e1b109ab8f36cd304798c1727c22082
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 09:47:37 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 09:47:37 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=04cffcbb

travis: remove debug marker, see if output matches without

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qdepends/dotest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index c507f08..6a8c3d6 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -28,7 +28,7 @@ test() {
 		*:*)
 			pkg=${line%%:*}
 			line=${line#*:}
-			echo "${pkg}: sort? $(echo "${line}" | tr ' ' '\n' | LC_ALL=C sort | xargs)"
+			echo "${pkg}: $(echo "${line}" | tr ' ' '\n' | LC_ALL=C sort | xargs)"
 			;;
 		*)
 			echo "${line}"


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-04-08  9:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-08  9:02 [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/ Fabian Groffen
  -- strict thread matches above, loose matches on Subject: below --
2019-04-08  9:50 Fabian Groffen
2019-04-08  9:50 Fabian Groffen
2019-04-08  9:50 Fabian Groffen
2019-04-08  9:50 Fabian Groffen
2019-04-08  9:50 Fabian Groffen
2019-04-08  9:20 Fabian Groffen
2019-04-08  9:02 Fabian Groffen
2014-03-15  6:09 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox