Pure nix environment for tests
+ add missing deps for "local" test runner
This commit is contained in:
parent
be6e2a9540
commit
7ebbdfc031
|
@ -1,6 +1,6 @@
|
|||
#! /usr/bin/bash
|
||||
|
||||
DEPENDENCIES=("qbittorrent-nox" "bats" "curl" "grep" "cat" "sed")
|
||||
DEPENDENCIES=("qbittorrent-nox" "bats" "curl" "grep" "cat" "sed" "ps" "netstat" "envsubst")
|
||||
|
||||
if [[ "${QBTNOX_DIR:-plz}" = "plz" ]]; then
|
||||
export QBTNOX_DIR="$(mktemp -d)"
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
DEPENDENCIES=("nix" "nix-shell")
|
||||
# TODO: find grep package name for --pure environment
|
||||
NIX_DEPENDENCIES=("bats" "curl" "qbittorrent-nox")
|
||||
NIX_DEPENDENCIES=("bats" "curl" "qbittorrent-nox" "gnugrep" "unixtools.netstat" "envsubst" "ps")
|
||||
|
||||
if [[ "${QBTNOX_DIR:-plz}" = "plz" ]]; then
|
||||
export QBTNOX_DIR="$(mktemp -d)"
|
||||
|
@ -22,8 +21,7 @@ if [[ "$SUBCOMMAND" = "test" ]] && [[ "${IN_NIX_SHELL:-plz}" = "plz" ]]; then
|
|||
depsCheck
|
||||
fi
|
||||
# Are we in nix-shell already?
|
||||
# TODO: redo --pure when grep dep is found
|
||||
IN_NIX_SHELL=1 nix-shell -p ${NIX_DEPENDENCIES[@]} --run "\"$ORIGDIR\"/\"$0\" "$@""
|
||||
IN_NIX_SHELL=1 nix-shell --pure -p ${NIX_DEPENDENCIES[@]} --keep CFGFILE --keep BIN_PATH --keep FREEPORT --run "\"$ORIGDIR\"/\"$0\" "$@""
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user