mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
nix-on-droid: allow passing args to on-device-test
This commit is contained in:
parent
3aab6a9ec4
commit
78349e4a81
2 changed files with 6 additions and 6 deletions
|
|
@ -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 \
|
||||
"<nix-on-droid/tests/on-device/.run.sh>")"
|
||||
"<nix-on-droid/tests/on-device/.run.sh>")" "$@"
|
||||
}
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue