-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathbuild-test.sh
49 lines (37 loc) · 915 Bytes
/
build-test.sh
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
if [ "$#" -lt 1 ]; then
echo "Usage: build-test.sh <target>"
exit 1
fi
set -e
# first argument must be the target
export TEST_TARGET=$1
shift
# for CI, use line-by-line test output
export PROGRESS_ARGS=l
# Clone virgil
cd ..
git clone https://github.com/titzer/virgil
cd virgil
# Set up latest version of virgil
export PATH=$PATH:"$PWD/bin:$PWD/bin/dev:$PWD/test/config"
# TODO: test configure is only needed for progress, get elsewhere?
./test/configure
make
# remaining arguments are appended to V3C_OPTS
export V3C_OPTS="$V3C_OPTS $@"
# Set up wizard
cd ../wizard-engine
make -j $TEST_TARGET
# Install Opam for specification tests
sudo apt install -y opam
opam init
# Install spec test dependencies
opam install dune
opam install menhir -y
# Make dune available in PATH
eval $(opam config env)
# Set up specification tests
./test/wasm-spec/update.sh
# Run all tests
./test/all.sh