mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-09 03:56:06 +01:00
WIP: tests/emulator/test_channels_shell: investigate what happens to $PATH
This commit is contained in:
parent
598fa1f995
commit
f95fb313ff
3 changed files with 6 additions and 2 deletions
|
|
@ -13,6 +13,8 @@ writeText "login-inner" ''
|
||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
|
echo login-inner PATH=$PATH
|
||||||
|
|
||||||
${lib.optionalString (config.environment.motd != null) ''
|
${lib.optionalString (config.environment.motd != null) ''
|
||||||
if [ "$#" -eq 0 ]; then # if script is called from within Nix-on-Droid app
|
if [ "$#" -eq 0 ]; then # if script is called from within Nix-on-Droid app
|
||||||
echo "${lib.removeSuffix "\n" config.environment.motd}"
|
echo "${lib.removeSuffix "\n" config.environment.motd}"
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ writeScript "login" ''
|
||||||
# This file is generated by Nix-on-Droid. DO NOT EDIT.
|
# This file is generated by Nix-on-Droid. DO NOT EDIT.
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
echo login PATH=$PATH
|
||||||
|
|
||||||
export USER="${config.user.userName}"
|
export USER="${config.user.userName}"
|
||||||
export HOME="${config.user.home}"
|
export HOME="${config.user.home}"
|
||||||
export PROOT_TMP_DIR=${installationDir}/tmp
|
export PROOT_TMP_DIR=${installationDir}/tmp
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@ def run(d):
|
||||||
('cd /data/data/com.termux.nix/files/home; '
|
('cd /data/data/com.termux.nix/files/home; '
|
||||||
'pwd; '
|
'pwd; '
|
||||||
'id; '
|
'id; '
|
||||||
'/data/data/com.termux.nix/files/usr/bin/login '
|
'env PATH= /data/data/com.termux.nix/files/usr/bin/login '
|
||||||
' nix-on-droid on-device-test')
|
' nix-on-droid on-device-test'),
|
||||||
]:
|
]:
|
||||||
print(f'running {cmd} as {user} with capture:')
|
print(f'running {cmd} as {user} with capture:')
|
||||||
p = subprocess.Popen(['adb', 'shell', 'su', '0', 'su', user,
|
p = subprocess.Popen(['adb', 'shell', 'su', '0', 'su', user,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue