update_repo $REPONAME "${COLLECTION_ID}"
}
-setup_python2_repo () {
- REPONAME=${1:-test}
- if [ x${USE_COLLECTIONS_IN_SERVER-} == xyes ] ; then
- COLLECTION_ID=${2:-org.test.Collection.${REPONAME}}
- else
- COLLECTION_ID=""
- fi
-
- GPGARGS="${GPGARGS:-${FL_GPGARGS}}" . $(dirname $0)/make-test-runtime.sh ${REPONAME} org.test.PythonPlatform "${COLLECTION_ID}" bash python2 ls cat echo rm readlink > /dev/null
- GPGARGS="${GPGARGS:-${FL_GPGARGS}}" . $(dirname $0)/make-test-runtime.sh ${REPONAME} org.test.PythonSdk "${COLLECTION_ID}" python2 bash ls cat echo rm readlink make mkdir cp touch > /dev/null
- update_repo $REPONAME "${COLLECTION_ID}"
-}
-
install_repo () {
REPONAME=${1:-test}
${FLATPAK} ${U} install -y ${REPONAME}-repo org.test.Platform master
${FLATPAK} ${U} install -y ${REPONAME}-repo org.test.Sdk master
}
-install_python2_repo () {
- REPONAME=${1:-test}
- ${FLATPAK} ${U} install -y ${REPONAME}-repo org.test.PythonPlatform master
- ${FLATPAK} ${U} install -y ${REPONAME}-repo org.test.PythonSdk master
-}
-
run () {
${CMD_PREFIX} flatpak run "$@"
fi
}
-skip_without_python2 () {
- if ! test -f /usr/bin/python2 || ! /usr/bin/python2 -c "import sys; sys.exit(0 if sys.version_info >= (2, 7) else 1)" ; then
- echo "1..0 # SKIP this test requires /usr/bin/python2 (2.7) support"
- exit 0
- fi
-}
-
sed s#@testdir@#${test_builddir}# ${test_srcdir}/session.conf.in > session.conf
dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
3> dbus-session-bus-address 4> dbus-session-bus-pid
for i in $@; do
I=`which $i`
add_bin $I
- if test $i == python2; then
- mkdir -p ${DIR}/usr/lib/python2.7/lib-dynload
- # This is a hardcoded minimal set of modules we need in the current tests.
- # Pretty hacky stuff. Add modules as needed.
- PYDIR=/usr/lib/python2.7
- if test -d /usr/lib64/python2.7; then PYDIR=/usr/lib64/python2.7; fi
- for py in site os stat posixpath genericpath warnings \
- linecache types UserDict abc _abcoll \
- _weakrefset copy_reg traceback sysconfig \
- re sre_compile sre_parse sre_constants \
- _sysconfigdata ; do
- cp ${PYDIR}/$py.py ${DIR}/usr/lib/python2.7
- done
- # These might not exist, depending how Python was configured; and the
- # part after ${so} might be "module" or ".x86_64-linux-gnu" or
- # something else
- for so in _locale strop ; do
- cp ${PYDIR}/lib-dynload/${so}*.so ${DIR}/usr/lib/python2.7/lib-dynload || :
- done
- for plat in $( cd ${PYDIR} && echo plat-* ); do
- test -e ${PYDIR}/${plat} || continue
- mkdir -p ${DIR}/usr/lib/python2.7/${plat}
- cp ${PYDIR}/${plat}/*.py ${DIR}/usr/lib/python2.7/${plat}/
- done
- fi
done
for i in `cat $BINS`; do
echo Adding binary $i 1>&2