From d85fc95c864963796e09d46c8caf04041a5c88f1 Mon Sep 17 00:00:00 2001 From: Gonzalo Martinez Lema Date: Thu, 17 Aug 2023 19:01:00 +0300 Subject: [PATCH] Revert "Use iptables equivalent in macOS" This reverts commit 8aa862f531d854f89c877d0bb7193f81200f1adb. --- client_side_tests/test_fetch_content_recompile.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/client_side_tests/test_fetch_content_recompile.sh b/client_side_tests/test_fetch_content_recompile.sh index a8affd43..c36785d1 100755 --- a/client_side_tests/test_fetch_content_recompile.sh +++ b/client_side_tests/test_fetch_content_recompile.sh @@ -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