mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46: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
|
#!@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
|
PATH=@coreutils@/bin:@nix@/bin:${PATH:+:}$PATH
|
||||||
|
|
||||||
|
|
@ -97,7 +97,7 @@ function doOnDeviceTest() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$(nix-instantiate --eval --expr \
|
exec "$(nix-instantiate --eval --expr \
|
||||||
"<nix-on-droid/tests/on-device/.run.sh>")"
|
"<nix-on-droid/tests/on-device/.run.sh>")" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSwitch() {
|
function doSwitch() {
|
||||||
|
|
@ -180,7 +180,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
case $COMMAND in
|
case $COMMAND in
|
||||||
switch-generation)
|
switch-generation|on-device-test)
|
||||||
COMMAND_ARGS+=("$opt")
|
COMMAND_ARGS+=("$opt")
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
@ -211,7 +211,7 @@ case $COMMAND in
|
||||||
doHelp
|
doHelp
|
||||||
;;
|
;;
|
||||||
on-device-test)
|
on-device-test)
|
||||||
doOnDeviceTest
|
doOnDeviceTest "${COMMAND_ARGS[@]}"
|
||||||
;;
|
;;
|
||||||
rollback)
|
rollback)
|
||||||
if [[ $(readlink $PROFILE_DIRECTORY) =~ ^nix-on-droid-([0-9]+)-link$ ]]; then
|
if [[ $(readlink $PROFILE_DIRECTORY) =~ ^nix-on-droid-([0-9]+)-link$ ]]; then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#! nix-shell -i bash -p bats ncurses
|
#! 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
|
set -ueo pipefail
|
||||||
|
|
||||||
|
|
@ -41,6 +41,6 @@ fi
|
||||||
|
|
||||||
mkdir -p ~/.config/nixpkgs
|
mkdir -p ~/.config/nixpkgs
|
||||||
|
|
||||||
bats "${SCRIPT_DIR}" --verbose-run --timing --pretty
|
bats "${SCRIPT_DIR}" --verbose-run --timing --pretty "$@"
|
||||||
|
|
||||||
_cleanup
|
_cleanup
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue