-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
88 lines (69 loc) · 2.48 KB
/
justfile
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
default := "default"
config := "config.toml"
benchmark := "ecall_benchmark"
spike := "./config/spike.toml"
qemu_virt := "./config/test/qemu-virt.toml"
spike_virt_benchmark := "./config/test/spike-virt-benchmark.toml"
spike_latency_benchmark := "./config/test/spike-latency-benchmark.toml"
benchmark_folder := "./benchmark-out"
default_iterations := "1"
# Print the list of commands
help:
@just --list --unsorted
# Format all code
fmt:
cargo fmt
# Run all the tests
test:
# Running unit tests...
@just unit-test
# Checking formatting...
cargo fmt --all -- --check
# Checking configs...
cargo run -q -- check-config ./config
# Run linter...
cargo clippy --features userspace -p miralis
cargo clippy -p runner
cargo clippy -p benchmark_analyzer
# Run integration tests...
cargo run -- test --strict
# Test firmware build
just build-firmware default {{qemu_virt}}
spike-benchmarks:
cargo run -- run --config {{spike_latency_benchmark}} --firmware tracing_firmware
cargo run -- run --config {{spike_virt_benchmark}} --firmware csr_write
cargo run -- run --config {{spike_virt_benchmark}} --firmware ecall_benchmark
# Run unit tests
unit-test:
cargo test --features userspace --lib \
-p miralis \
-p model_checking
# Run Miralis
run firmware=default config=config:
cargo run -- --verbose run --config {{config}} --firmware {{firmware}}
# Build Miralis with the provided config
build config:
cargo run -- build --config {{config}}
# Build a given firmware with the provided config
build-firmware firmware config=config:
cargo run -- --verbose build --config {{config}} --firmware {{firmware}}
# Run Miralis but wait for a debugger to connect
debug firmware=default:
cargo run -- --verbose run --firmware {{firmware}} --debug --stop
# Connect a debugger to a running Miralis instance
gdb:
cargo run -- gdb
# Install the rust toolchain and required components
install-toolchain:
rustup toolchain install $(cat rust-toolchain)
rustup component add rustfmt --toolchain "$(cat rust-toolchain)"
rustup component add rust-src --toolchain "$(cat rust-toolchain)"
rustup component add llvm-tools-preview --toolchain "$(cat rust-toolchain)"
rustup component add clippy --toolchain "$(cat rust-toolchain)"
cargo install cargo-binutils
cargo install --locked kani-verifier
cargo kani setup
analyze-benchmark input_path:
cargo run --package benchmark_analyzer -- {{input_path}}
# The following line gives highlighting on vim
# vim: set ft=make :