summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-11-25 08:10:52 +0000
committerMichał Górny <mgorny@gentoo.org>2012-11-25 08:10:52 +0000
commit7869c6975ec8ad91221ff61d5324ab2fed6257b4 (patch)
tree998016aaf942bbb3c780659e6af147f1514afb68 /eclass/tests
parentAdding msieve support (diff)
downloadgentoo-2-7869c6975ec8ad91221ff61d5324ab2fed6257b4.tar.gz
gentoo-2-7869c6975ec8ad91221ff61d5324ab2fed6257b4.tar.bz2
gentoo-2-7869c6975ec8ad91221ff61d5324ab2fed6257b4.zip
Add a simple test to make sure that functions do not collide with sub-phase names (python_compile).
Diffstat (limited to 'eclass/tests')
-rwxr-xr-xeclass/tests/distutils-r1.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/eclass/tests/distutils-r1.sh b/eclass/tests/distutils-r1.sh
new file mode 100755
index 000000000000..6c11e7d3581a
--- /dev/null
+++ b/eclass/tests/distutils-r1.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+EAPI=4
+PYTHON_COMPAT=( python2_7 )
+source tests-common.sh
+
+test-phase_name_free() {
+ local ph=${1}
+
+ if declare -f "${ph}"; then
+ die "${ph} function declared while name reserved for phase!"
+ fi
+ if declare -f "${ph}_all"; then
+ die "${ph}_all function declared while name reserved for phase!"
+ fi
+}
+
+inherit distutils-r1
+
+tbegin "sane function names"
+
+test-phase_name_free python_prepare
+test-phase_name_free python_configure
+test-phase_name_free python_compile
+test-phase_name_free python_test
+test-phase_name_free python_install
+
+tend ${failed}
+
+texit