hack for testing in lxd

This commit is contained in:
Michael Hudson-Doyle 2020-04-02 11:11:25 +13:00
parent 9a68ce91c1
commit 467257ff9a
2 changed files with 5 additions and 2 deletions

View File

@ -20,7 +20,7 @@ for answers in examples/answers*.yaml; do
done
timeout --foreground 60 sh -c "LANG=C.UTF-8 python3 -m subiquity.cmd.tui --autoinstall examples/autoinstall.yaml \
--dry-run --machine-config examples/simple.json \
--kernel-cmdline 'autoinstall console=$(tty)'"
--kernel-cmdline 'autoinstall console=\"$(tty)\"'"
python3 scripts/validate-yaml.py .subiquity/subiquity-curtin-install.conf \
debconf_selections.subiquity='"eek"'
grep 'finish: subiquity/InstallProgress/postinstall/install_package1: SUCCESS: installing package1' \

View File

@ -184,7 +184,10 @@ class Subiquity(Application):
with open(self.opts.autoinstall) as fp:
self.autoinstall_config = yaml.safe_load(fp)
primary_tty = self.get_primary_tty()
our_tty = os.ttyname(0)
try:
our_tty = os.ttyname(0)
except OSError:
our_tty = "not a tty"
if not self.interactive() and our_tty != primary_tty:
print(
_("the installer running on {} will perform the "