-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
37 lines (29 loc) · 1.08 KB
/
makefile
File metadata and controls
37 lines (29 loc) · 1.08 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
.PHONY: test bench docs check test-all test-replica kill-dfx
check:
find bench -type f -name 'txs.bench.mo' -print0 | \
xargs -0 $(shell mops toolchain bin moc) -r $(shell mops sources) -Werror -wasi-system-api
docs:
$(MocvPath)/mo-doc
$(MocvPath)/mo-doc --format plain
bench:
mops bench --gc incremental --replica dfx $(name).bench
test:
mops test $(name).test -r verbose
test-replica:
mops test --mode replica --replica pocket-ic .replica
# Create temp directory for pipes if needed
PIPE_DIR := $(shell mkdir -p ./tests/.pipes)
test-all:
@mkfifo ./tests/.pipes/pipe1 ./tests/.pipes/pipe2 2>/dev/null || true
@mops test > ./tests/.pipes/pipe1 & \
mops test --mode replica --replica pocket-ic .replica > ./tests/.pipes/pipe2 & \
cat ./tests/.pipes/pipe1 && \
cat ./tests/.pipes/pipe2; \
wait; \
rm -f -r ./tests/.pipes/pipe1 ./tests/.pipes/pipe2 ./tests/.pipes
kill-dfx:
@echo "Found these processes:"
@ps aux | grep -E 'dfx' | grep -v grep
@echo "Killing processes..."
@ps aux | grep -E 'dfx' | grep -v grep | awk '{print $$2}' | xargs kill -9 2>/dev/null || true
@echo "Done"