From a34da6ff75d81ac92c25e0240f975f387a579b7b Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 27 Nov 2022 11:27:06 -0500 Subject: [PATCH] clean up tests --- veilid-tools/run_tests.sh | 9 +++++++++ veilid-tools/src/spawn.rs | 1 + veilid-tools/webdriver.json | 15 +++++++++++++++ 3 files changed, 25 insertions(+) create mode 100755 veilid-tools/run_tests.sh create mode 100644 veilid-tools/webdriver.json diff --git a/veilid-tools/run_tests.sh b/veilid-tools/run_tests.sh new file mode 100755 index 00000000..065ec2ed --- /dev/null +++ b/veilid-tools/run_tests.sh @@ -0,0 +1,9 @@ +#!/bin/bash +if [[ "$1" == "wasm" ]]; then + WASM_BINDGEN_TEST_TIMEOUT=120 wasm-pack test --chrome --headless +else + cargo test --features=rt-tokio + cargo test --features=rt-async-std + cargo test --features=rt-tokio,log --no-default-features + cargo test --features=rt-async-std,log --no-default-features +fi diff --git a/veilid-tools/src/spawn.rs b/veilid-tools/src/spawn.rs index 0ee5497a..8d85b01c 100644 --- a/veilid-tools/src/spawn.rs +++ b/veilid-tools/src/spawn.rs @@ -99,6 +99,7 @@ cfg_if! { } } + #[allow(unused_variables)] pub async fn blocking_wrapper(blocking_task: F, err_result: R) -> R where F: FnOnce() -> R + Send + 'static, diff --git a/veilid-tools/webdriver.json b/veilid-tools/webdriver.json new file mode 100644 index 00000000..c2d6865e --- /dev/null +++ b/veilid-tools/webdriver.json @@ -0,0 +1,15 @@ +{ + "moz:firefoxOptions": { + "prefs": { + "media.navigator.streams.fake": true, + "media.navigator.permission.disabled": true + }, + "args": [] + }, + "goog:chromeOptions": { + "args": [ + "--use-fake-device-for-media-stream", + "--use-fake-ui-for-media-stream" + ] + } +}