modules/android_integration: termux-setup-storage & unsupported

This commit is contained in:
Alexander Sosedkin 2024-07-05 22:52:18 +02:00
parent 34882505a0
commit cc573e03d9
7 changed files with 265 additions and 4 deletions

View file

@ -5,6 +5,8 @@ load lib
@test 'android-integration options can be used' {
bats_require_minimum_version 1.5.0
run ! command -v am
run ! command -v termux-setup-storage
run ! command -v termux-open-url
cp \
"$ON_DEVICE_TESTS_DIR/config-android-integration.nix" \
@ -12,6 +14,17 @@ load lib
nix-on-droid switch
command -v am
command -v termux-setup-storage
run ! command -v termux-open-url
_sed \
-e "s|# unsupported.enable = false;|unsupported.enable = true;|" \
-e "s|am.enable = true;|am.enable = false;|" \
-i ~/.config/nixpkgs/nix-on-droid.nix
nix-on-droid switch
run ! command -v am
command -v termux-setup-storage
command -v termux-open-url
switch_to_default_config
}