forked from Mirror/pmbootstrap
chroot: combine user.py and root.py into run.py (MR 2252)
These are small related utility functions, combine them together. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
1d9bbd613e
commit
cf651e56d5
9 changed files with 52 additions and 64 deletions
|
@ -6,8 +6,7 @@ from pmb.core.types import Env, PmbArgs
|
|||
import pytest
|
||||
|
||||
import pmb_test # noqa
|
||||
import pmb.chroot.root
|
||||
import pmb.chroot.user
|
||||
import pmb.chroot.run
|
||||
import pmb.helpers.run
|
||||
import pmb.helpers.run_core
|
||||
import pmb.helpers.logging
|
||||
|
@ -47,7 +46,7 @@ def test_shell_escape(args: PmbArgs):
|
|||
assert expected == root
|
||||
assert cmd == copy
|
||||
|
||||
chroot_root = pmb.chroot.root(args, cmd, output_return=True)
|
||||
chroot_root = pmb.chroot.run(args, cmd, output_return=True)
|
||||
assert expected == chroot_root
|
||||
assert cmd == copy
|
||||
|
||||
|
@ -72,7 +71,7 @@ def test_shell_escape_env(args: PmbArgs):
|
|||
assert func(args, cmd, output_return=True, env=env) == ret
|
||||
assert cmd == copy
|
||||
|
||||
func = pmb.chroot.root
|
||||
func = pmb.chroot.run
|
||||
assert func(args, cmd, output_return=True, env=env) == ret
|
||||
assert cmd == copy
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue