From 5bcff0228ba6d1d8c8f718ed5355d337ab2194e2 Mon Sep 17 00:00:00 2001 From: Allen Ding Date: Tue, 3 Sep 2024 15:37:38 -0700 Subject: [PATCH] disable unneeded protocols in curl and fix unit tests on arm64 --- client/tests/run.sh | 1 + client/tests/run_tests.py | 9 ++++++++- client/tools/curl.sh | 10 +++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/client/tests/run.sh b/client/tests/run.sh index 62b74b6..cacfa51 100755 --- a/client/tests/run.sh +++ b/client/tests/run.sh @@ -23,4 +23,5 @@ echo sleep 1 echo "wisp server ready, running tests" +export SE_AVOID_STATS=true #turn of selenium telemetry python3 tests/run_tests.py diff --git a/client/tests/run_tests.py b/client/tests/run_tests.py index 7ad511e..6b12122 100644 --- a/client/tests/run_tests.py +++ b/client/tests/run_tests.py @@ -1,5 +1,7 @@ import unittest +import shutil +import selenium.common.exceptions from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.common.by import By @@ -18,7 +20,12 @@ class JSTest(unittest.TestCase): options.add_argument("--disable-gpu") options.set_capability("goog:loggingPrefs", {"browser": "ALL"}) - self.browser = webdriver.Chrome(options=options) + try: + self.browser = webdriver.Chrome(options=options) + except selenium.common.exceptions.NoSuchDriverException: + chromedriver_path = shutil.which("chromedriver") + service = webdriver.ChromeService(executable_path=chromedriver_path) + self.browser = webdriver.Chrome(options=options, service=service) def tearDown(self): self.browser.quit() diff --git a/client/tools/curl.sh b/client/tools/curl.sh index 155b502..4b9255a 100755 --- a/client/tools/curl.sh +++ b/client/tools/curl.sh @@ -18,7 +18,15 @@ git clone -b curl-8_9_1 --depth=1 https://github.com/curl/curl cd curl autoreconf -fi -emconfigure ./configure --host i686-linux --disable-shared --disable-threaded-resolver --without-libpsl --disable-netrc --disable-ipv6 --disable-tftp --disable-ntlm-wb --enable-websockets --with-wolfssl=$WOLFSSL_PREFIX --with-zlib=$ZLIB_PREFIX --with-brotli=$BROTLI_PREFIX --with-nghttp2=$NGHTTP2_PREFIX +emconfigure ./configure --host i686-linux \ + --disable-shared --disable-threaded-resolver --without-libpsl \ + --disable-netrc --disable-ipv6 --disable-tftp --disable-ntlm-wb \ + --enable-websockets --disable-ftp --disable-file --disable-gopher \ + --disable-imap --disable-mqtt --disable-pop3 --disable-rtsp \ + --disable-smb --disable-smtp --disable-telnet --disable-dict \ + --with-wolfssl=$WOLFSSL_PREFIX --with-zlib=$ZLIB_PREFIX \ + --with-brotli=$BROTLI_PREFIX --with-nghttp2=$NGHTTP2_PREFIX + emmake make -j$CORE_COUNT CFLAGS="-Oz" LIBS="-lbrotlicommon" rm -rf $PREFIX