Skip to content

Commit

Permalink
Revert "Use iptables equivalent in macOS"
Browse files Browse the repository at this point in the history
This reverts commit 8aa862f.
  • Loading branch information
gonzaponte committed Aug 17, 2023
1 parent e68a1e9 commit d85fc95
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions client_side_tests/test_fetch_content_recompile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,14 @@ cmake --build build
rm -f build/client_exe # Make sure the executable does not exist unless we recompile

# Block network access temporarily
if [[ $OSTYPE == "darwin"* ]]; then
sudo pfctl -e
echo "block out all" | sudo pfctl -f -
else
sudo iptables -A OUTPUT -j DROP
fi
sudo iptables -A OUTPUT -j DROP

cmake -S $test_dir/client_fetch_content -B build; status1=$?
cmake --build build; status2=$?
./build/client_exe; status3=$?

# Restore network access
if [[ $OSTYPE == "darwin"* ]]; then
sudo pfctl -d
else
sudo iptables -A OUTPUT -j DROP
fi
sudo iptables -D OUTPUT -j DROP

(( status = status1 | status2 | status3 ))
exit $status

0 comments on commit d85fc95

Please sign in to comment.