forked from radixdlt/radixdlt-scrypto
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·49 lines (41 loc) · 2.18 KB
/
test.sh
File metadata and controls
executable file
·49 lines (41 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -x
set -e
cd "$(dirname "$0")"
echo "Testing with std..."
(cd sbor; cargo test)
(cd sbor-derive; cargo test)
(cd sbor-tests; cargo test)
(cd scrypto; cargo test)
(cd scrypto-derive; cargo test)
(cd scrypto-tests; cargo test)
(cd radix-engine; cargo test)
(cd transaction-manifest; cargo test)
echo "Testing with no_std..."
(cd sbor; cargo test --no-default-features --features alloc)
(cd sbor-tests; cargo test --no-default-features --features alloc)
(cd scrypto; cargo test --no-default-features --features alloc)
(cd scrypto-abi; cargo test --no-default-features --features alloc)
(cd scrypto-tests; cargo test --no-default-features --features alloc)
(cd radix-engine; cargo test --no-default-features --features alloc)
echo "Building examples..."
(cd assets/account; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
(cd assets/system; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
(cd examples/core/cross-blueprint-call; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
(cd examples/core/flat-admin; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
(cd examples/core/gumball-machine; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
(cd examples/core/hello-nft; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
(cd examples/core/hello-world; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
(cd examples/core/managed-access; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
(cd examples/core/no-std-lib; cargo build --target wasm32-unknown-unknown --release)
(cd examples/defi; ./demo.sh)
(cd examples/nft/magic-card; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
(cd examples/nft/sporting-event; cargo build --target wasm32-unknown-unknown --release; cargo test --release)
echo "Running simulator..."
(cd simulator; bash ./tests/resim.sh)
(cd simulator; bash ./tests/scrypto.sh)
(cd simulator; bash ./tests/manifest.sh)
echo "Running benchmark..."
(cd sbor-tests; cargo bench)
(cd radix-engine; cargo bench)
echo "Congrats! All tests passed."