-
Notifications
You must be signed in to change notification settings - Fork 15
/
justfile
32 lines (24 loc) · 1.3 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
workspace := "~/libzetta-rs"
ubuntu_host := "zetta-ubuntu"
freebsd13_host := "zetta-freebsd13"
freebsd14_host := "zetta-freebsd14"
rsync_exclude := "--exclude .git --exclude .idea --exclude target --exclude libzfs_core-sys/target"
set positional-arguments
test-freebsd14 args='':
just delete-test-pool-on {{freebsd14_host}}
just copy-code-to {{freebsd14_host}}
-ssh {{freebsd14_host}} "sudo sh -c 'mdconfig -d -u 1; mdconfig -a -s 96m -u1'"
ssh {{freebsd14_host}} '. "$HOME/.cargo/env";cd {{workspace}} && sudo env PATH=$PATH cargo test {{args}}'
test-freebsd13 args='':
just delete-test-pool-on {{freebsd13_host}}
just copy-code-to {{freebsd13_host}}
-ssh {{freebsd13_host}} "sudo sh -c 'mdconfig -d -u 1; mdconfig -a -s 96m -u1'"
ssh {{freebsd13_host}} '. "$HOME/.cargo/env";cd {{workspace}} && sudo env PATH=$PATH LD_PRELOAD=/usr/local/lib/libzfs_core.so cargo test {{args}}'
test-ubuntu args='':
just delete-test-pool-on {{ubuntu_host}}
just copy-code-to {{ubuntu_host}}
ssh {{ubuntu_host}} '. "$HOME/.cargo/env";cd {{workspace}} && sudo env PATH=$PATH cargo test {{args}}'
delete-test-pool-on host:
-ssh {{host}} "sudo sh -c 'zpool list -H -oname | grep test | xargs zpool destroy'"
copy-code-to host:
rsync -az -e "ssh" {{rsync_exclude}} --progress ./ {{host}}:{{workspace}}