-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.am
84 lines (70 loc) · 2.9 KB
/
Makefile.am
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
SUBDIRS = test/zfs-tests/tests/functional/ctime
SUBDIRS += test/zfs-tests/tests/functional/exec
SUBDIRS += test/zfs-tests/cmd/chg_usr_exec
SUBDIRS += test/zfs-tests/cmd/mktree
SUBDIRS += test/zfs-tests/cmd/file_write
SUBDIRS += test/zfs-tests/cmd/mkbusy
SUBDIRS += test/zfs-tests/cmd/randfree_file
SUBDIRS += test/zfs-tests/cmd/largest_file
SUBDIRS += test/zfs-tests/cmd/rm_lnkcnt_zero_file
SUBDIRS += test/zfs-tests/cmd/readmmap
SUBDIRS += test/zfs-tests/cmd/mmapwrite
SUBDIRS += test/zfs-tests/cmd/file_trunc
SUBDIRS += test/zfs-tests/cmd/file_check
abs_top_srcdir = @abs_top_srcdir@
SHELL = /bin/bash
AUTOMAKE_OPTIONS = foreign
ctags:
$(RM) $(top_srcdir)/tags
find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
etags:
$(RM) $(top_srcdir)/TAGS
find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a
test: test_verify test/zfs-tests/cmd
@KEEP="`zpool list -H -oname`" \
STF_TOOLS=$(abs_top_srcdir)/test/test-runner/stf \
STF_SUITE=$(abs_top_srcdir)/test/zfs-tests \
DISKS="$(shell for i in {1..3}; do \
rm -f /var/tmp/zfs_test-$$i; \
$(abs_top_srcdir)/scripts/mkfile 25000m /var/tmp/zfs_test-$$i; \
echo "/var/tmp/zfs_test-$$i "; \
done)" \
su zfs-tests -c "ksh $(abs_top_srcdir)/test/zfs-tests/cmd/scripts/zfstest.ksh $$RUNFILE"
test_hw: test_verify test/zfs-tests/cmd
@KEEP="`zpool list -H -oname`" \
STF_TOOLS=$(abs_top_srcdir)/test/test-runner/stf \
STF_SUITE=$(abs_top_srcdir)/test/zfs-tests \
DISKS="/dev/disk1 /dev/disk2 /dev/disk3" \
su zfs-tests -c "ksh $(abs_top_srcdir)/test/zfs-tests/cmd/scripts/zfstest.ksh $$RUNFILE"
test_existing: test_verify test/zfs-tests/cmd
@KEEP="`zpool list -H -oname`" \
STF_TOOLS=$(abs_top_srcdir)/test/test-runner/stf \
STF_SUITE=$(abs_top_srcdir)/test/zfs-tests \
DISKS="/var/tmp/zfs_test-1 /var/tmp/zfs_test-2 /var/tmp/zfs_test-3" \
su zfs-tests -c "ksh $(abs_top_srcdir)/test/zfs-tests/cmd/scripts/zfstest.ksh $$RUNFILE"
test_verify:
@# -------------------------------------------------------------------
@# adduser --home /var/tmp/test_results --shell /usr/bin/ksh --gecos "ZFS Test Suite" --disabled-password zfs-tests
@# echo 'zfs-tests ALL = (ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
@# -------------------------------------------------------------------
@( if ! id zfs-tests > /dev/null 2>&1; then \
echo "ERROR: You must create a 'zfs-tests' user to run the test as."; \
exit 1; \
fi; \
if ! su - zfs-tests -c "sudo ls" > /dev/null 2>&1; then \
echo "ERROR: User zfs-tests is not allowed to run sudo without password."; \
exit 1; \
fi)
test/zfs-tests/cmd:
@(for subdir in $(SUBDIRS); do \
make -C $$subdir all; \
done)
clean:
@(for subdir in $(SUBDIRS); do \
make -C $$subdir clean; \
done)
tags: ctags etags
.PHONY: test test/zfs-tests/cmd
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: