tests: ease development in fakedroid env for on-device-tests

This commit is contained in:
Tobias Happ 2022-11-05 22:42:57 +01:00
parent 6a345626c0
commit 27c206f57a

View file

@ -90,7 +90,14 @@ function doHelp() {
function doOnDeviceTest() {
# This is for maintainer convenience only, see tests/on-device/.run.sh
nix-channel --update nix-on-droid
# /n-o-d/unpacked is available in fakedroid environment
if [[ -d "/n-o-d/unpacked" ]]; then
export NIX_PATH="nix-on-droid=/n-o-d/unpacked:$NIX_PATH"
else
nix-channel --update nix-on-droid
fi
exec "$(nix-instantiate --eval --expr \
"<nix-on-droid/tests/on-device/.run.sh>")"
}