-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·45 lines (35 loc) · 792 Bytes
/
run.sh
File metadata and controls
executable file
·45 lines (35 loc) · 792 Bytes
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
#!/bin/sh -xe
docker_build="docker build --progress=plain suite/ -t simple-web-benchmark"
docker_run="docker run -it --rm -v $PWD:/src --network=\"host\" simple-web-benchmark"
exit_trap_command=""
tear_down() {
eval "$exit_trap_command"
}
trap tear_down EXIT
add_exit_trap() {
to_add=$1
if [ "$exit_trap_command" ]; then
exit_trap_command="$exit_trap_command; $to_add"
else
exit_trap_command="$to_add"
fi
}
build() {
eval "$docker_build"
}
rebuild() {
eval "$docker_build --no-cache"
}
shell() {
eval "$docker_run"
}
run() {
cargo run --manifest-path suite/Cargo.toml -- all
}
versions() {
cargo run --manifest-path suite/Cargo.toml --bin versions
}
lint() {
docker run --rm -i hadolint/hadolint < suite/Dockerfile
}
"$@"