Skip to content

Commit

Permalink
WIP: tests/emulator/test_channels_shell: investigate what happens to …
Browse files Browse the repository at this point in the history
…$PATH
  • Loading branch information
t184256 committed Jul 10, 2024
1 parent 598fa1f commit f95fb31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions modules/environment/login/login-inner.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ writeText "login-inner" ''
set -eo pipefail
echo login-inner PATH=$PATH
${lib.optionalString (config.environment.motd != null) ''
if [ "$#" -eq 0 ]; then # if script is called from within Nix-on-Droid app
echo "${lib.removeSuffix "\n" config.environment.motd}"
Expand Down
2 changes: 2 additions & 0 deletions modules/environment/login/login.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ writeScript "login" ''
# This file is generated by Nix-on-Droid. DO NOT EDIT.
set -eu -o pipefail
echo login PATH=$PATH
export USER="${config.user.userName}"
export HOME="${config.user.home}"
export PROOT_TMP_DIR=${installationDir}/tmp
Expand Down
4 changes: 2 additions & 2 deletions tests/emulator/test_channels_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def run(d):
('cd /data/data/com.termux.nix/files/home; '
'pwd; '
'id; '
'/data/data/com.termux.nix/files/usr/bin/login '
' nix-on-droid on-device-test')
'env PATH= /data/data/com.termux.nix/files/usr/bin/login '
' nix-on-droid on-device-test'),
]:
print(f'running {cmd} as {user} with capture:')
p = subprocess.Popen(['adb', 'shell', 'su', '0', 'su', user,
Expand Down

0 comments on commit f95fb31

Please sign in to comment.