-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0acd5d8
commit 667ac4a
Showing
5 changed files
with
106 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,36 @@ | ||
#!/bin/bash | ||
WASMTIME_BACKTRACE_DETAILS=1 RUSTFLAGS='-C link-args=--initial-memory=67108864' cargo wasi test -- --show-output --nocapture | ||
|
||
rm ../../target/wasm32-wasip1/debug/deps/quickjs_rust_near_minimum_web4-*.wasm | ||
# Compile the test without running it | ||
echo "Compiling tests for wasm32-wasip1 target..." | ||
RUSTFLAGS='-C link-args=--initial-memory=67108864' cargo test --target=wasm32-wasip1 --no-run | ||
|
||
# Check if the compilation was successful | ||
if [ $? -ne 0 ]; then | ||
echo "Compilation failed. Exiting." | ||
exit 1 | ||
fi | ||
|
||
# Locate the test file in the target/wasm32-wasip1/debug/deps directory | ||
echo "Locating test file..." | ||
TEST_FILE=$(find ../../target/wasm32-wasip1/debug/deps -name "quickjs_rust_near_minimum_web4-*.wasm" -print -quit) | ||
|
||
# Check if the test file was found | ||
if [ -z "$TEST_FILE" ]; then | ||
echo "No test file found. Exiting." | ||
exit 1 | ||
fi | ||
|
||
echo "Found test file: $TEST_FILE" | ||
|
||
# Run the test file using wasmtime | ||
echo "Running tests with wasmtime..." | ||
wasmtime "$TEST_FILE" | ||
|
||
# Check if the tests ran successfully | ||
if [ $? -eq 0 ]; then | ||
echo "Tests ran successfully!" | ||
else | ||
echo "Tests failed." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,36 @@ | ||
#!/bin/bash | ||
WASMTIME_BACKTRACE_DETAILS=1 RUSTFLAGS='-C link-args=--initial-memory=67108864' cargo wasi test -- --show-output --nocapture | ||
|
||
rm ../../target/wasm32-wasip1/debug/deps/quickjs_rust_near_nft-*.wasm | ||
# Compile the test without running it | ||
echo "Compiling tests for wasm32-wasip1 target..." | ||
RUSTFLAGS='-C link-args=--initial-memory=67108864' cargo test --target=wasm32-wasip1 --no-run | ||
|
||
# Check if the compilation was successful | ||
if [ $? -ne 0 ]; then | ||
echo "Compilation failed. Exiting." | ||
exit 1 | ||
fi | ||
|
||
# Locate the test file in the target/wasm32-wasip1/debug/deps directory | ||
echo "Locating test file..." | ||
TEST_FILE=$(find ../../target/wasm32-wasip1/debug/deps -name "quickjs_rust_near_nft-*.wasm" -print -quit) | ||
|
||
# Check if the test file was found | ||
if [ -z "$TEST_FILE" ]; then | ||
echo "No test file found. Exiting." | ||
exit 1 | ||
fi | ||
|
||
echo "Found test file: $TEST_FILE" | ||
|
||
# Run the test file using wasmtime | ||
echo "Running tests with wasmtime..." | ||
wasmtime "$TEST_FILE" | ||
|
||
# Check if the tests ran successfully | ||
if [ $? -eq 0 ]; then | ||
echo "Tests ran successfully!" | ||
else | ||
echo "Tests failed." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,36 @@ | ||
#!/bin/bash | ||
RUSTFLAGS='-C link-args=--initial-memory=67108864' cargo wasi test -- --show-output --nocapture | ||
|
||
rm ../target/wasm32-wasip1/debug/deps/quickjs_rust_near_testenv-*.wasm | ||
# Compile the test without running it | ||
echo "Compiling tests for wasm32-wasip1 target..." | ||
cargo test --target=wasm32-wasip1 --no-run | ||
|
||
# Check if the compilation was successful | ||
if [ $? -ne 0 ]; then | ||
echo "Compilation failed. Exiting." | ||
exit 1 | ||
fi | ||
|
||
# Locate the test file in the target/wasm32-wasip1/debug/deps directory | ||
echo "Locating test file..." | ||
TEST_FILE=$(find ../target/wasm32-wasip1/debug/deps -name "quickjs_rust_near_testenv-*.wasm" -print -quit) | ||
|
||
# Check if the test file was found | ||
if [ -z "$TEST_FILE" ]; then | ||
echo "No test file found. Exiting." | ||
exit 1 | ||
fi | ||
|
||
echo "Found test file: $TEST_FILE" | ||
|
||
# Run the test file using wasmtime | ||
echo "Running tests with wasmtime..." | ||
wasmtime "$TEST_FILE" | ||
|
||
# Check if the tests ran successfully | ||
if [ $? -eq 0 ]; then | ||
echo "Tests ran successfully!" | ||
else | ||
echo "Tests failed." | ||
exit 1 | ||
fi |