diff --git a/nix-on-droid/nix-on-droid.sh b/nix-on-droid/nix-on-droid.sh index f1b34fb..d858598 100644 --- a/nix-on-droid/nix-on-droid.sh +++ b/nix-on-droid/nix-on-droid.sh @@ -1,6 +1,6 @@ #!@bash@/bin/bash -# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. PATH=@coreutils@/bin:@nix@/bin:${PATH:+:}$PATH @@ -97,7 +97,7 @@ function doOnDeviceTest() { fi exec "$(nix-instantiate --eval --expr \ - "")" + "")" "$@" } function doSwitch() { @@ -180,7 +180,7 @@ while [[ $# -gt 0 ]]; do ;; *) case $COMMAND in - switch-generation) + switch-generation|on-device-test) COMMAND_ARGS+=("$opt") ;; *) @@ -211,7 +211,7 @@ case $COMMAND in doHelp ;; on-device-test) - doOnDeviceTest + doOnDeviceTest "${COMMAND_ARGS[@]}" ;; rollback) if [[ $(readlink $PROFILE_DIRECTORY) =~ ^nix-on-droid-([0-9]+)-link$ ]]; then diff --git a/tests/on-device/.run.sh b/tests/on-device/.run.sh index 9081e48..9de3032 100755 --- a/tests/on-device/.run.sh +++ b/tests/on-device/.run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env nix-shell #! nix-shell -i bash -p bats ncurses -# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE. set -ueo pipefail @@ -41,6 +41,6 @@ fi mkdir -p ~/.config/nixpkgs -bats "${SCRIPT_DIR}" --verbose-run --timing --pretty +bats "${SCRIPT_DIR}" --verbose-run --timing --pretty "$@" _cleanup