19 lines
512 B
Bash
Executable File
19 lines
512 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Run p256k1 tests using Node.js WASM runtime
|
|
# This script builds the test binary and runs it in Node.js
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
TESTDATA_DIR="$SCRIPT_DIR/testdata"
|
|
WASM_FILE="$TESTDATA_DIR/p256k1_test.wasm"
|
|
|
|
# Build the test binary
|
|
echo "Building WASM test binary..."
|
|
GOOS=js GOARCH=wasm CGO_ENABLED=0 go test -c -o "$WASM_FILE" "$SCRIPT_DIR"
|
|
|
|
# Run the tests
|
|
echo "Running tests in Node.js..."
|
|
node "$TESTDATA_DIR/run_wasm_tests.mjs" "$WASM_FILE" "$@"
|