-
Notifications
You must be signed in to change notification settings - Fork 11
/
check-all.sh
executable file
·101 lines (81 loc) · 2.97 KB
/
check-all.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#! /usr/bin/env bash
# This script is meant to run any and all tests or verification steps
# present in this repository as a top-level check all. If you add
# tests in a new location remember to add them here!
set -e
dir=$(pwd)
echo "====================== download toolchains =================================="
toolchains_dir="${dir}/target/toolchains"
mkdir -p $toolchains_dir
armv7_toolchain="gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabihf"
armv7_toolchain_url="https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/arm-linux-gnueabihf/${armv7_toolchain}.tar.xz"
armv7_toolchain_dir="${toolchains_dir}/${armv7_toolchain}"
if [ ! -d "${armv7_toolchain_dir}" ]; then
(
cd target/toolchains
curl -LO $armv7_toolchain_url
tar xf "${armv7_toolchain}.tar.xz"
)
else
echo "Using existing armv7 toolchain at ${armv7_toolchain_dir}"
fi
armv8_toolchain="gcc-linaro-7.4.1-2019.02-i686_aarch64-linux-gnu"
armv8_toolchain_url="https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/${armv8_toolchain}.tar.xz"
armv8_toolchain_dir="${toolchains_dir}/${armv8_toolchain}"
if [ ! -d "${armv8_toolchain_dir}" ]; then
(
cd target/toolchains
curl -LO $armv8_toolchain_url
tar xf "${armv8_toolchain}.tar.xz"
)
else
echo "Using existing aarch64 toolchain at ${armv8_toolchain_dir}"
fi
echo "========================= build aarch64 (tx1) =================================="
(
export PATH="${armv8_toolchain_dir}/bin:${PATH}"
SEL4_PLATFORM=tx1 \
SEL4_CONFIG_PATH="$dir/sel4.toml" \
cargo xbuild --target aarch64-unknown-linux-gnu --features "test_support"
)
echo "======================== build aarch32 (sabre) ================================="
(
export PATH="${armv7_toolchain_dir}/bin:${PATH}"
SEL4_PLATFORM=sabre \
SEL4_CONFIG_PATH="$dir/sel4.toml" \
cargo xbuild --target armv7-unknown-linux-gnueabihf --features "test_support"
)
echo "==================== ./ferros-test/test-macro-impl ==========================="
(
cd ferros-test/test-macro-impl
cargo test
)
echo "==================== ./ferros-test/examples/minimal =========================="
(
export PATH="${armv7_toolchain_dir}/bin:${PATH}"
cd ferros-test/examples/minimal
# We can't simulate this because `selfe` waits for a SIGINT to
# free the caller from QEMU.
selfe build --platform sabre --sel4_arch aarch32
)
echo "====================== ./ferros-test/examples/mock ==========================="
(
cd ferros-test/examples/mock
cargo build
)
echo "====================== ./smart_alloc ==========================="
(
cd smart_alloc
cargo test
)
echo "====================== ./cross_queue ==========================="
(
cd cross_queue
cargo test
)
echo "============================= ./qemu-test ===================================="
(
export PATH="${armv7_toolchain_dir}/bin:${armv8_toolchain_dir}/bin:${PATH}"
cd qemu-test
cargo test
)