Complete Python 3 runtime port of installed tools
Debian Trixie package bundle / packages (push) Successful in 22m2s
Debian Trixie package bundle / packages (push) Successful in 22m2s
This commit is contained in:
Executable
+74
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env bash
|
||||
# /****************************************************************************
|
||||
# * <Novell-copyright>
|
||||
# * Copyright (c) 2001 Novell, Inc. All Rights Reserved.
|
||||
# *
|
||||
# * This program is free software; you can redistribute it and/or
|
||||
# * modify it under the terms of version 2 of the GNU General Public License
|
||||
# * as published by the Free Software Foundation.
|
||||
# *
|
||||
# * This program is distributed in the hope that it will be useful,
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# * GNU General Public License for more details.
|
||||
# *
|
||||
# * You should have received a copy of the GNU General Public License
|
||||
# * along with this program; if not, contact Novell, Inc.
|
||||
# *
|
||||
# * To contact Novell about this file by physical or electronic mail, you
|
||||
# * may find current contact information at www.novell.com.
|
||||
# * </Novell-copyright>
|
||||
# ****************************************************************************/
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
temporary=$(mktemp -d "${TMPDIR:-/tmp}/bongo-python-runtime.XXXXXX")
|
||||
trap 'rm -rf -- "$temporary"' EXIT
|
||||
export PYTHONPYCACHEPREFIX="${temporary}/pycache"
|
||||
|
||||
python3 -m compileall -q \
|
||||
"$(python3 -c 'import sysconfig; print(sysconfig.get_path("purelib"))')/bongo" \
|
||||
"$(python3 -c 'import sysconfig; print(sysconfig.get_path("purelib"))')/bongo_web"
|
||||
|
||||
python3 - <<'PY'
|
||||
import io
|
||||
|
||||
from bongo import table
|
||||
from bongo.Console import wrap
|
||||
from bongo.external.simpletal import simpleTAL, simpleTALES
|
||||
from bongo.external.simpletal.simpleElementTree import parseFile
|
||||
from bongo.storetool import BackupCommands, CalendarCommands, MailCommands
|
||||
|
||||
assert isinstance(wrap("Grüße 世界", width=8), str)
|
||||
assert "Müller" in table.format_table(["Name"], [["Müller"]])
|
||||
|
||||
context = simpleTALES.Context()
|
||||
context.addGlobal("name", "A&B")
|
||||
template = simpleTAL.compileHTMLTemplate(
|
||||
'<p tal:content="name">placeholder</p>')
|
||||
output = io.StringIO()
|
||||
template.expand(context, output)
|
||||
assert output.getvalue() == "<p>A&B</p>"
|
||||
|
||||
root = parseFile(io.StringIO("<root><child>value</child></root>"))
|
||||
assert root.find("child").text == "value"
|
||||
PY
|
||||
|
||||
bongo-admin --help >"${temporary}/bongo-admin.help"
|
||||
bongo-storetool --help >"${temporary}/bongo-storetool.help"
|
||||
bongo-queuetool --help >"${temporary}/bongo-queuetool.help"
|
||||
bongo-web --help >"${temporary}/bongo-web.help"
|
||||
/usr/libexec/bongo/bongo-sa-update --help \
|
||||
>"${temporary}/bongo-sa-update.help"
|
||||
|
||||
set +e
|
||||
/usr/libexec/bongo/bongo-acme-dns-provider \
|
||||
--config "${temporary}/missing.json" --provider audit --type nsupdate \
|
||||
--operation present --record _acme-challenge.example.test \
|
||||
--value audit --ttl 60 >"${temporary}/bongo-acme.json"
|
||||
status=$?
|
||||
set -e
|
||||
test "${status}" -eq 1
|
||||
grep -q '"ok":false' "${temporary}/bongo-acme.json"
|
||||
|
||||
echo "PYTHON-3 PASS compileall=installed imports=storetool,template,xml cli=6"
|
||||
Reference in New Issue
Block a user