diff --git a/Makefile b/Makefile index 191524f..222a058 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,14 @@ build: release: cargo build --release -test-rust: build - cargo test --verbose +build-all: + cargo build --workspace + +release-all: + cargo build --release --workspace + +test-rust: + cargo test --workspace --verbose install: echo "Installing pay-respects core. Use `install-all` to install all modules." diff --git a/tests/cases/privilege b/tests/cases/privilege index d1e7d22..38f85a0 100644 --- a/tests/cases/privilege +++ b/tests/cases/privilege @@ -2,3 +2,5 @@ case="privilege" command="pacman -Syu" error="you cannot perform this operation unless you are root" expect="sudo pacman -Syu" + +export _PR_EXECUTABLES="sudo doas" diff --git a/tests/main.sh b/tests/main.sh old mode 100644 new mode 100755 index 5820e01..8266a09 --- a/tests/main.sh +++ b/tests/main.sh @@ -28,8 +28,10 @@ run_test() { } run_case() { - source $1 - run_test "$case" "$command" "$error" "$expect" + ( + source $1 + run_test "$case" "$command" "$error" "$expect" + ) if [[ $? == 0 ]]; then PASSED=$((PASSED + 1))