public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2014-09-04 14:52 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2014-09-04 14:52 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/09/04 14:52:58

  Modified:             python-utils-r1.sh
  Log:
  Preserve all whitespace in shebangs, and add regression test for that. Also, prevent filename expansion when word-splitting it. Bug #522080.

Revision  Changes    Path
1.10                 eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.9&r2=1.10

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- python-utils-r1.sh	4 Sep 2014 14:00:43 -0000	1.9
+++ python-utils-r1.sh	4 Sep 2014 14:52:58 -0000	1.10
@@ -134,6 +134,9 @@
 	'#!/mnt/python2/usr/bin/python2.7 python2' --force
 test_fix_shebang '#!/usr/bin/foo' python2.7 FAIL
 
+# regression test for bug #522080
+test_fix_shebang '#!/usr/bin/python ' python2.7 '#!/usr/bin/python2.7 '
+
 # make sure we don't break pattern matching
 test_is "_python_impl_supported python2_5" 1
 test_is "_python_impl_supported python2_6" 1





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2014-12-21 14:30 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2014-12-21 14:30 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/12/21 14:30:08

  Modified:             python-utils-r1.sh
  Log:
  Update tests for unsupported python3.2.

Revision  Changes    Path
1.12                 eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.11&r2=1.12

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- python-utils-r1.sh	5 Nov 2014 23:03:01 -0000	1.11
+++ python-utils-r1.sh	21 Dec 2014 14:30:08 -0000	1.12
@@ -151,7 +151,7 @@
 test_is "_python_impl_supported python2_6" 1
 test_is "_python_impl_supported python2_7" 0
 test_is "_python_impl_supported python3_1" 1
-test_is "_python_impl_supported python3_2" 0
+test_is "_python_impl_supported python3_2" 1
 test_is "_python_impl_supported python3_3" 0
 test_is "_python_impl_supported python3_4" 0
 test_is "_python_impl_supported pypy1_8" 1





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2014-11-05 23:03 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2014-11-05 23:03 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/11/05 23:03:01

  Modified:             python-utils-r1.sh
  Log:
  Add support for PyPy3.

Revision  Changes    Path
1.11                 eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.10&r2=1.11

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- python-utils-r1.sh	4 Sep 2014 14:52:58 -0000	1.10
+++ python-utils-r1.sh	5 Nov 2014 23:03:01 -0000	1.11
@@ -87,15 +87,24 @@
 test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0='
 test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy
 
+test_var EPYTHON pypy3 pypy3
+test_var PYTHON pypy3 /usr/bin/pypy3
+test_var PYTHON_SITEDIR pypy3 /usr/lib/pypy3/site-packages
+test_var PYTHON_INCLUDEDIR pypy3 /usr/lib/pypy3/include
+test_var PYTHON_PKG_DEP pypy3 '*virtual/pypy3*:0='
+test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3
+
 test_is "python_is_python3 python2.7" 1
 test_is "python_is_python3 python3.2" 0
 test_is "python_is_python3 jython2.7" 1
 test_is "python_is_python3 pypy" 1
+test_is "python_is_python3 pypy3" 0
 
 # generic shebangs
 test_fix_shebang '#!/usr/bin/python' python2.7 '#!/usr/bin/python2.7'
 test_fix_shebang '#!/usr/bin/python' python3.4 '#!/usr/bin/python3.4'
 test_fix_shebang '#!/usr/bin/python' pypy '#!/usr/bin/pypy'
+test_fix_shebang '#!/usr/bin/python' pypy3 '#!/usr/bin/pypy3'
 test_fix_shebang '#!/usr/bin/python' jython2.7 '#!/usr/bin/jython2.7'
 
 # python2/python3 matching
@@ -149,6 +158,7 @@
 test_is "_python_impl_supported pypy1_9" 1
 test_is "_python_impl_supported pypy2_0" 1
 test_is "_python_impl_supported pypy" 0
+test_is "_python_impl_supported pypy3" 0
 test_is "_python_impl_supported jython2_5" 0
 test_is "_python_impl_supported jython2_7" 0
 





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2014-09-04 14:00 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2014-09-04 14:00 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/09/04 14:00:43

  Modified:             python-utils-r1.sh
  Log:
  Fix tests for python_is_python3.

Revision  Changes    Path
1.9                  eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.8&r2=1.9

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- python-utils-r1.sh	6 Jul 2014 17:13:14 -0000	1.8
+++ python-utils-r1.sh	4 Sep 2014 14:00:43 -0000	1.9
@@ -87,10 +87,10 @@
 test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0='
 test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy
 
-test_is "EPYTHON=python2.7 python_is_python3" 1
-test_is "EPYTHON=python3.2 python_is_python3" 0
-test_is "EPYTHON=jython2.7 python_is_python3" 1
-test_is "EPYTHON=pypy python_is_python3" 1
+test_is "python_is_python3 python2.7" 1
+test_is "python_is_python3 python3.2" 0
+test_is "python_is_python3 jython2.7" 1
+test_is "python_is_python3 pypy" 1
 
 # generic shebangs
 test_fix_shebang '#!/usr/bin/python' python2.7 '#!/usr/bin/python2.7'





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2014-07-06 17:13 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2014-07-06 17:13 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/07/06 17:13:14

  Modified:             python-utils-r1.sh
  Log:
  Add tests for _python_impl_supported.

Revision  Changes    Path
1.8                  eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.7&r2=1.8

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- python-utils-r1.sh	19 Jun 2014 08:08:10 -0000	1.7
+++ python-utils-r1.sh	6 Jul 2014 17:13:14 -0000	1.8
@@ -19,10 +19,9 @@
 
 test_is() {
 	local func=${1}
-	local EPYTHON=${2}
-	local expect=${3}
+	local expect=${2}
 
-	tbegin "${func} for ${EPYTHON} (expecting: ${3})"
+	tbegin "${func} (expecting: ${expect})"
 
 	${func}
 	[[ ${?} == ${expect} ]]
@@ -88,10 +87,10 @@
 test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0='
 test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy
 
-test_is python_is_python3 python2.7 1
-test_is python_is_python3 python3.2 0
-test_is python_is_python3 jython2.7 1
-test_is python_is_python3 pypy 1
+test_is "EPYTHON=python2.7 python_is_python3" 1
+test_is "EPYTHON=python3.2 python_is_python3" 0
+test_is "EPYTHON=jython2.7 python_is_python3" 1
+test_is "EPYTHON=pypy python_is_python3" 1
 
 # generic shebangs
 test_fix_shebang '#!/usr/bin/python' python2.7 '#!/usr/bin/python2.7'
@@ -135,6 +134,21 @@
 	'#!/mnt/python2/usr/bin/python2.7 python2' --force
 test_fix_shebang '#!/usr/bin/foo' python2.7 FAIL
 
+# make sure we don't break pattern matching
+test_is "_python_impl_supported python2_5" 1
+test_is "_python_impl_supported python2_6" 1
+test_is "_python_impl_supported python2_7" 0
+test_is "_python_impl_supported python3_1" 1
+test_is "_python_impl_supported python3_2" 0
+test_is "_python_impl_supported python3_3" 0
+test_is "_python_impl_supported python3_4" 0
+test_is "_python_impl_supported pypy1_8" 1
+test_is "_python_impl_supported pypy1_9" 1
+test_is "_python_impl_supported pypy2_0" 1
+test_is "_python_impl_supported pypy" 0
+test_is "_python_impl_supported jython2_5" 0
+test_is "_python_impl_supported jython2_7" 0
+
 rm "${tmpfile}"
 
 texit





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2014-06-19  8:08 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2014-06-19  8:08 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/06/19 08:08:10

  Modified:             python-utils-r1.sh
  Log:
  Improve handling of corner cases in python_fix_shebang. Support --force and --quiet options, bug #505354. Add tests.

Revision  Changes    Path
1.7                  eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.6&r2=1.7

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- python-utils-r1.sh	8 Apr 2014 16:05:30 -0000	1.6
+++ python-utils-r1.sh	19 Jun 2014 08:08:10 -0000	1.7
@@ -30,6 +30,33 @@
 	tend ${?}
 }
 
+test_fix_shebang() {
+	local from=${1}
+	local to=${2}
+	local expect=${3}
+	local args=( "${@:4}" )
+
+	tbegin "python_fix_shebang${args[@]+ ${args[*]}} from ${from} to ${to} (exp: ${expect})"
+
+	echo "${from}" > "${tmpfile}"
+	output=$( EPYTHON=${to} python_fix_shebang "${args[@]}" -q "${tmpfile}" 2>&1 )
+
+	if [[ ${?} != 0 ]]; then
+		if [[ ${expect} != FAIL ]]; then
+			echo "${output}"
+			tend 1
+		else
+			tend 0
+		fi
+	else
+		[[ $(<"${tmpfile}") == ${expect} ]] \
+			|| eerror "${from} -> ${to}: $(<"${tmpfile}") != ${expect}"
+		tend ${?}
+	fi
+}
+
+tmpfile=$(mktemp)
+
 inherit python-utils-r1
 
 test_var EPYTHON python2_7 python2.7
@@ -66,4 +93,48 @@
 test_is python_is_python3 jython2.7 1
 test_is python_is_python3 pypy 1
 
+# generic shebangs
+test_fix_shebang '#!/usr/bin/python' python2.7 '#!/usr/bin/python2.7'
+test_fix_shebang '#!/usr/bin/python' python3.4 '#!/usr/bin/python3.4'
+test_fix_shebang '#!/usr/bin/python' pypy '#!/usr/bin/pypy'
+test_fix_shebang '#!/usr/bin/python' jython2.7 '#!/usr/bin/jython2.7'
+
+# python2/python3 matching
+test_fix_shebang '#!/usr/bin/python2' python2.7 '#!/usr/bin/python2.7'
+test_fix_shebang '#!/usr/bin/python3' python2.7 FAIL
+test_fix_shebang '#!/usr/bin/python3' python2.7 '#!/usr/bin/python2.7' --force
+test_fix_shebang '#!/usr/bin/python3' python3.4 '#!/usr/bin/python3.4'
+test_fix_shebang '#!/usr/bin/python2' python3.4 FAIL
+test_fix_shebang '#!/usr/bin/python2' python3.4 '#!/usr/bin/python3.4' --force
+
+# pythonX.Y matching (those mostly test the patterns)
+test_fix_shebang '#!/usr/bin/python2.7' python2.7 '#!/usr/bin/python2.7'
+test_fix_shebang '#!/usr/bin/python2.7' python3.2 FAIL
+test_fix_shebang '#!/usr/bin/python2.7' python3.2 '#!/usr/bin/python3.2' --force
+test_fix_shebang '#!/usr/bin/python3.2' python3.2 '#!/usr/bin/python3.2'
+test_fix_shebang '#!/usr/bin/python3.2' python2.7 FAIL
+test_fix_shebang '#!/usr/bin/python3.2' python2.7 '#!/usr/bin/python2.7' --force
+test_fix_shebang '#!/usr/bin/pypy' pypy '#!/usr/bin/pypy'
+test_fix_shebang '#!/usr/bin/pypy' python2.7 FAIL
+test_fix_shebang '#!/usr/bin/pypy' python2.7 '#!/usr/bin/python2.7' --force
+test_fix_shebang '#!/usr/bin/jython2.7' jython2.7 '#!/usr/bin/jython2.7'
+test_fix_shebang '#!/usr/bin/jython2.7' jython3.2 FAIL
+test_fix_shebang '#!/usr/bin/jython2.7' jython3.2 '#!/usr/bin/jython3.2' --force
+
+# fancy path handling
+test_fix_shebang '#!/mnt/python2/usr/bin/python' python3.4 \
+	'#!/mnt/python2/usr/bin/python3.4'
+test_fix_shebang '#!/mnt/python2/usr/bin/python2' python2.7 \
+	'#!/mnt/python2/usr/bin/python2.7'
+test_fix_shebang '#!/mnt/python2/usr/bin/env python' python2.7 \
+	'#!/mnt/python2/usr/bin/env python2.7'
+test_fix_shebang '#!/mnt/python2/usr/bin/python2 python2' python2.7 \
+	'#!/mnt/python2/usr/bin/python2.7 python2'
+test_fix_shebang '#!/mnt/python2/usr/bin/python3 python2' python2.7 FAIL
+test_fix_shebang '#!/mnt/python2/usr/bin/python3 python2' python2.7 \
+	'#!/mnt/python2/usr/bin/python2.7 python2' --force
+test_fix_shebang '#!/usr/bin/foo' python2.7 FAIL
+
+rm "${tmpfile}"
+
 texit





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2014-04-08 16:05 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2014-04-08 16:05 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/04/08 16:05:31

  Modified:             python-utils-r1.sh
  Log:
  Disable pypy2_0 and clean up after it.

Revision  Changes    Path
1.6                  eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.5&r2=1.6

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- python-utils-r1.sh	1 Apr 2014 15:22:40 -0000	1.5
+++ python-utils-r1.sh	8 Apr 2014 16:05:30 -0000	1.6
@@ -54,13 +54,6 @@
 test_var PYTHON_PKG_DEP jython2_7 '*dev-java/jython*:2.7'
 test_var PYTHON_SCRIPTDIR jython2_7 /usr/lib/python-exec/jython2.7
 
-test_var EPYTHON pypy2_0 pypy-c2.0
-test_var PYTHON pypy2_0 /usr/bin/pypy-c2.0
-test_var PYTHON_SITEDIR pypy2_0 /usr/lib/pypy2.0/site-packages
-test_var PYTHON_INCLUDEDIR pypy2_0 /usr/lib/pypy2.0/include
-test_var PYTHON_PKG_DEP pypy2_0 '*virtual/pypy*:2.0'
-test_var PYTHON_SCRIPTDIR pypy2_0 /usr/lib/python-exec/pypy-c2.0
-
 test_var EPYTHON pypy pypy
 test_var PYTHON pypy /usr/bin/pypy
 test_var PYTHON_SITEDIR pypy /usr/lib/pypy/site-packages
@@ -71,7 +64,6 @@
 test_is python_is_python3 python2.7 1
 test_is python_is_python3 python3.2 0
 test_is python_is_python3 jython2.7 1
-test_is python_is_python3 pypy2.0 1
 test_is python_is_python3 pypy 1
 
 texit





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2014-04-01 15:22 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2014-04-01 15:22 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/04/01 15:22:40

  Modified:             python-utils-r1.sh
  Log:
  Add slot op to expected PyPy dependency string.

Revision  Changes    Path
1.5                  eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.4&r2=1.5

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- python-utils-r1.sh	12 Mar 2014 09:23:39 -0000	1.4
+++ python-utils-r1.sh	1 Apr 2014 15:22:40 -0000	1.5
@@ -65,7 +65,7 @@
 test_var PYTHON pypy /usr/bin/pypy
 test_var PYTHON_SITEDIR pypy /usr/lib/pypy/site-packages
 test_var PYTHON_INCLUDEDIR pypy /usr/lib/pypy/include
-test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0'
+test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0='
 test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy
 
 test_is python_is_python3 python2.7 1





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2014-03-12  9:23 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-12  9:23 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/12 09:23:39

  Modified:             python-utils-r1.sh
  Log:
  Add non-slotted pypy to the eclass.

Revision  Changes    Path
1.4                  eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.3&r2=1.4

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- python-utils-r1.sh	3 Nov 2013 07:58:16 -0000	1.3
+++ python-utils-r1.sh	12 Mar 2014 09:23:39 -0000	1.4
@@ -61,9 +61,17 @@
 test_var PYTHON_PKG_DEP pypy2_0 '*virtual/pypy*:2.0'
 test_var PYTHON_SCRIPTDIR pypy2_0 /usr/lib/python-exec/pypy-c2.0
 
+test_var EPYTHON pypy pypy
+test_var PYTHON pypy /usr/bin/pypy
+test_var PYTHON_SITEDIR pypy /usr/lib/pypy/site-packages
+test_var PYTHON_INCLUDEDIR pypy /usr/lib/pypy/include
+test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0'
+test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy
+
 test_is python_is_python3 python2.7 1
 test_is python_is_python3 python3.2 0
 test_is python_is_python3 jython2.7 1
 test_is python_is_python3 pypy2.0 1
+test_is python_is_python3 pypy 1
 
 texit





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2013-11-03  7:58 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2013-11-03  7:58 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/11/03 07:58:16

  Modified:             python-utils-r1.sh
  Log:
  Fix python-utils-r1 tests to accomodate versions in PYTHON_PKG_DEP.

Revision  Changes    Path
1.3                  eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.2&r2=1.3

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- python-utils-r1.sh	17 Sep 2013 13:25:58 -0000	1.2
+++ python-utils-r1.sh	3 Nov 2013 07:58:16 -0000	1.3
@@ -37,7 +37,7 @@
 test_var PYTHON_SITEDIR python2_7 /usr/lib/python2.7/site-packages
 test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
 test_var PYTHON_LIBPATH python2_7 /usr/lib/libpython2.7$(get_libname)
-test_var PYTHON_PKG_DEP python2_7 dev-lang/python:2.7
+test_var PYTHON_PKG_DEP python2_7 '*dev-lang/python*:2.7'
 test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
 
 test_var EPYTHON python3_3 python3.3
@@ -45,20 +45,20 @@
 test_var PYTHON_SITEDIR python3_3 /usr/lib/python3.3/site-packages
 test_var PYTHON_INCLUDEDIR python3_3 /usr/include/python3.3
 test_var PYTHON_LIBPATH python3_3 /usr/lib/libpython3.3$(get_libname)
-test_var PYTHON_PKG_DEP python3_3 dev-lang/python:3.3
+test_var PYTHON_PKG_DEP python3_3 '*dev-lang/python*:3.3'
 test_var PYTHON_SCRIPTDIR python3_3 /usr/lib/python-exec/python3.3
 
 test_var EPYTHON jython2_7 jython2.7
 test_var PYTHON jython2_7 /usr/bin/jython2.7
 test_var PYTHON_SITEDIR jython2_7 /usr/share/jython-2.7/Lib/site-packages
-test_var PYTHON_PKG_DEP jython2_7 dev-java/jython:2.7
+test_var PYTHON_PKG_DEP jython2_7 '*dev-java/jython*:2.7'
 test_var PYTHON_SCRIPTDIR jython2_7 /usr/lib/python-exec/jython2.7
 
 test_var EPYTHON pypy2_0 pypy-c2.0
 test_var PYTHON pypy2_0 /usr/bin/pypy-c2.0
 test_var PYTHON_SITEDIR pypy2_0 /usr/lib/pypy2.0/site-packages
 test_var PYTHON_INCLUDEDIR pypy2_0 /usr/lib/pypy2.0/include
-test_var PYTHON_PKG_DEP pypy2_0 virtual/pypy:2.0
+test_var PYTHON_PKG_DEP pypy2_0 '*virtual/pypy*:2.0'
 test_var PYTHON_SCRIPTDIR pypy2_0 /usr/lib/python-exec/pypy-c2.0
 
 test_is python_is_python3 python2.7 1





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2013-09-17 13:25 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-17 13:25 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/17 13:25:58

  Modified:             python-utils-r1.sh
  Log:
  Introduce PYTHON_SCRIPTDIR for python-exec:2 script location.

Revision  Changes    Path
1.2                  eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?r1=1.1&r2=1.2

Index: python-utils-r1.sh
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/tests/python-utils-r1.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- python-utils-r1.sh	8 Sep 2013 14:53:55 -0000	1.1
+++ python-utils-r1.sh	17 Sep 2013 13:25:58 -0000	1.2
@@ -38,6 +38,7 @@
 test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
 test_var PYTHON_LIBPATH python2_7 /usr/lib/libpython2.7$(get_libname)
 test_var PYTHON_PKG_DEP python2_7 dev-lang/python:2.7
+test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
 
 test_var EPYTHON python3_3 python3.3
 test_var PYTHON python3_3 /usr/bin/python3.3
@@ -45,17 +46,20 @@
 test_var PYTHON_INCLUDEDIR python3_3 /usr/include/python3.3
 test_var PYTHON_LIBPATH python3_3 /usr/lib/libpython3.3$(get_libname)
 test_var PYTHON_PKG_DEP python3_3 dev-lang/python:3.3
+test_var PYTHON_SCRIPTDIR python3_3 /usr/lib/python-exec/python3.3
 
 test_var EPYTHON jython2_7 jython2.7
 test_var PYTHON jython2_7 /usr/bin/jython2.7
 test_var PYTHON_SITEDIR jython2_7 /usr/share/jython-2.7/Lib/site-packages
 test_var PYTHON_PKG_DEP jython2_7 dev-java/jython:2.7
+test_var PYTHON_SCRIPTDIR jython2_7 /usr/lib/python-exec/jython2.7
 
 test_var EPYTHON pypy2_0 pypy-c2.0
 test_var PYTHON pypy2_0 /usr/bin/pypy-c2.0
 test_var PYTHON_SITEDIR pypy2_0 /usr/lib/pypy2.0/site-packages
 test_var PYTHON_INCLUDEDIR pypy2_0 /usr/lib/pypy2.0/include
 test_var PYTHON_PKG_DEP pypy2_0 virtual/pypy:2.0
+test_var PYTHON_SCRIPTDIR pypy2_0 /usr/lib/python-exec/pypy-c2.0
 
 test_is python_is_python3 python2.7 1
 test_is python_is_python3 python3.2 0





^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh
@ 2013-09-08 14:53 Michal Gorny (mgorny)
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-08 14:53 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/08 14:53:55

  Added:                python-utils-r1.sh
  Log:
  Introduce tests for python-utils-r1.

Revision  Changes    Path
1.1                  eclass/tests/python-utils-r1.sh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/tests/python-utils-r1.sh?rev=1.1&content-type=text/plain

Index: python-utils-r1.sh
===================================================================
#!/bin/bash

EAPI=5
source tests-common.sh

test_var() {
	local var=${1}
	local impl=${2}
	local expect=${3}

	tbegin "${var} for ${impl}"

	local ${var}
	python_export ${impl} ${var}
	[[ ${!var} == ${expect} ]] || eerror "(${impl}: ${var}: ${!var} != ${expect}"

	tend ${?}
}

test_is() {
	local func=${1}
	local EPYTHON=${2}
	local expect=${3}

	tbegin "${func} for ${EPYTHON} (expecting: ${3})"

	${func}
	[[ ${?} == ${expect} ]]

	tend ${?}
}

inherit python-utils-r1

test_var EPYTHON python2_7 python2.7
test_var PYTHON python2_7 /usr/bin/python2.7
test_var PYTHON_SITEDIR python2_7 /usr/lib/python2.7/site-packages
test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
test_var PYTHON_LIBPATH python2_7 /usr/lib/libpython2.7$(get_libname)
test_var PYTHON_PKG_DEP python2_7 dev-lang/python:2.7

test_var EPYTHON python3_3 python3.3
test_var PYTHON python3_3 /usr/bin/python3.3
test_var PYTHON_SITEDIR python3_3 /usr/lib/python3.3/site-packages
test_var PYTHON_INCLUDEDIR python3_3 /usr/include/python3.3
test_var PYTHON_LIBPATH python3_3 /usr/lib/libpython3.3$(get_libname)
test_var PYTHON_PKG_DEP python3_3 dev-lang/python:3.3

test_var EPYTHON jython2_7 jython2.7
test_var PYTHON jython2_7 /usr/bin/jython2.7
test_var PYTHON_SITEDIR jython2_7 /usr/share/jython-2.7/Lib/site-packages
test_var PYTHON_PKG_DEP jython2_7 dev-java/jython:2.7

test_var EPYTHON pypy2_0 pypy-c2.0
test_var PYTHON pypy2_0 /usr/bin/pypy-c2.0
test_var PYTHON_SITEDIR pypy2_0 /usr/lib/pypy2.0/site-packages
test_var PYTHON_INCLUDEDIR pypy2_0 /usr/lib/pypy2.0/include
test_var PYTHON_PKG_DEP pypy2_0 virtual/pypy:2.0

test_is python_is_python3 python2.7 1
test_is python_is_python3 python3.2 0
test_is python_is_python3 jython2.7 1
test_is python_is_python3 pypy2.0 1

texit





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

end of thread, other threads:[~2014-12-21 14:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-04 14:52 [gentoo-commits] gentoo-x86 commit in eclass/tests: python-utils-r1.sh Michal Gorny (mgorny)
  -- strict thread matches above, loose matches on Subject: below --
2014-12-21 14:30 Michal Gorny (mgorny)
2014-11-05 23:03 Michal Gorny (mgorny)
2014-09-04 14:00 Michal Gorny (mgorny)
2014-07-06 17:13 Michal Gorny (mgorny)
2014-06-19  8:08 Michal Gorny (mgorny)
2014-04-08 16:05 Michal Gorny (mgorny)
2014-04-01 15:22 Michal Gorny (mgorny)
2014-03-12  9:23 Michal Gorny (mgorny)
2013-11-03  7:58 Michal Gorny (mgorny)
2013-09-17 13:25 Michal Gorny (mgorny)
2013-09-08 14:53 Michal Gorny (mgorny)

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