From 85770ea6f1dab106754675f40e1334e575e03646 Mon Sep 17 00:00:00 2001 From: Mateusz Franik <47059999+Im-Beast@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:39:28 +0100 Subject: tests: run integration and regression tests on other platforms (#93) * tests: add script to download test dependencies from fallback mirrors * tests: use the new download_deps script, run tests on macos * ci: download proper artifact for macos * chore: make download_deps script download everything to dir named `monero_c` when ran directly * tests: await downloading deps * tests download proper monero_c version in prepareMoneroC * tests: fix typos * tests: add file data for more targets * tests: print why retrieving tags failed * chore: change mirror url endpoint from `monero_c` to `download_mirror` * tests: use cached releases endpoint to prevent ratelimits * ci: remove brew@1.76 dependency * tests: fix macos dylib path * feat!(monero.ts): make `createTransactionMultDest` optionally return `null` * feat(monero.ts): make `Wallet_reconnectDevice` symbol optional * tests: don't try to extract file if out already exists * tests: remove unnecesary directory rm calls * ci: set regression tests to use canary --- tests/compare.ts | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'tests/compare.ts') diff --git a/tests/compare.ts b/tests/compare.ts index 2fd27b8..8c13fc5 100755 --- a/tests/compare.ts +++ b/tests/compare.ts @@ -1,24 +1,13 @@ import { assertEquals } from "jsr:@std/assert"; -import { - loadMoneroDylib, - loadWowneroDylib, - moneroSymbols, - WalletManager, - wowneroSymbols, -} from "../impls/monero.ts/mod.ts"; +import { WalletManager } from "../impls/monero.ts/mod.ts"; +import { loadDylib } from "./utils.ts"; const coin = Deno.args[0] as "monero" | "wownero"; const version = Deno.args[1]; const walletInfo = JSON.parse(Deno.args[2]); -if (coin === "monero") { - const dylib = Deno.dlopen(`tests/libs/${version}/monero_libwallet2_api_c.so`, moneroSymbols); - loadMoneroDylib(dylib); -} else { - const dylib = Deno.dlopen(`tests/libs/${version}/wownero_libwallet2_api_c.so`, wowneroSymbols); - loadWowneroDylib(dylib); -} +loadDylib(coin, version); const walletManager = await WalletManager.new(); const wallet = await walletManager.openWallet(walletInfo.path, walletInfo.password); -- cgit v1.2.3