Skip to content

Commit

Permalink
Fix tests on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Jul 19, 2023
1 parent c707e91 commit 8463e99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ teardown() {
run R-4.1 -q -s -e 'pak::lib_status()'
[[ "$status" -eq 0 ]]

if ! rig ls | grep -q '^[* ] 3.4'; then
run sudo rig add -a x86_64 3.4
if ! rig ls | grep -q '^[* ] 3.5'; then
run sudo rig add -a x86_64 3.5
[[ "$status" -eq 0 ]]
run rig ls
echo "$output" | grep -q "[* ] 3[.]4"
fi

libdir=`R-3.4 -s -e 'cat(path.expand(Sys.getenv("R_LIBS_USER")))'`
libdir=`R-3.5 -s -e 'cat(path.expand(Sys.getenv("R_LIBS_USER")))'`
[[ "$libdir" == "" ]] && false
run sudo rm -rf "$libdir"
run sudo rig system add-pak 3.4
run sudo rig system add-pak 3.5
[[ "$status" -eq 0 ]]
uid=`stat -f "%u" "$libdir"`
[[ "$uid" -eq "`id -u`" ]]
Expand Down

0 comments on commit 8463e99

Please sign in to comment.