-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·51 lines (39 loc) · 1.42 KB
/
test.sh
File metadata and controls
executable file
·51 lines (39 loc) · 1.42 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
50
51
#!/bin/bash
set -e
source /root/.docker_bashrc
export PATH=~/.cargo/bin:$PATH
export SGX_MODE=HW
export RUSTFLAGS=-Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3
dirpath=$(cd $(dirname $0) && pwd)
cd "${dirpath}/.."
solc -o contract-build --bin --abi --optimize --overwrite contracts/Anonify.sol
cd frame/types
cargo build
cd ../../scripts
# Generate a `enclave.signed.so` in `$HOME/.anonify`
make DEBUG=1 ENCLAVE_DIR=example/erc20/enclave
# Testings
echo "Integration testing..."
cd ../tests/integration
RUST_BACKTRACE=1 RUST_LOG=debug cargo test -- --nocapture
cd ../../example/erc20/server
# RUST_BACKTRACE=1 RUST_LOG=debug cargo test test_deploy_post -- --nocapture
# sleep 1
# RUST_BACKTRACE=1 RUST_LOG=debug cargo test test_multiple_messages -- --nocapture
# sleep 1
# RUST_BACKTRACE=1 RUST_LOG=debug cargo test test_skip_invalid_event -- --nocapture
# sleep 1
# RUST_BACKTRACE=1 RUST_LOG=debug cargo test test_node_recovery -- --nocapture
# sleep 1
# RUST_BACKTRACE=1 RUST_LOG=debug cargo test test_join_group_then_handshake -- --nocapture
echo "Unit testing..."
cd ../../../scripts
make DEBUG=1 TEST=1 ENCLAVE_DIR=tests/units/enclave
cd ..
RUST_BACKTRACE=1 RUST_LOG=debug TEST=1 cargo test -p unit-tests-host -p anonify-eth-driver -p frame-runtime -- --nocapture
# Buildings
export ANONIFY_URL=http://172.28.1.1:8080
./scripts/build-cli.sh
echo "Building ERC20 server..."
cd example/erc20/server
RUST_BACKTRACE=1 RUST_LOG=debug cargo build