]>
Commit | Line | Data |
---|---|---|
75b07eca FG |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Brian Behlendorf <behlendorf1@llnl.gov> | |
3 | Date: Fri, 15 Sep 2017 10:24:13 -0700 | |
4 | Subject: [PATCH] Add configure option to enable gcov analysis | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | * Add configure option to enable gcov analysis. | |
10 | * Includes a few minor ctime fixes. | |
11 | * Add codecov.yml configuration. | |
12 | ||
13 | Reviewed-by: Prakash Surya <prakash.surya@delphix.com> | |
14 | Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> | |
15 | Closes #6642 | |
16 | (cherry picked from commit 184087f822ef178d6f5c155681ee7c3d90f23321) | |
17 | Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> | |
18 | --- | |
19 | configure.ac | 1 + | |
20 | Makefile.am | 8 +++--- | |
21 | .github/codecov.yml | 9 +++++++ | |
22 | config/zfs-build.m4 | 31 ++++++++++++++++++++++ | |
23 | .../tests/functional/ctime/ctime_001_pos.ksh | 0 | |
24 | 5 files changed, 45 insertions(+), 4 deletions(-) | |
25 | create mode 100644 .github/codecov.yml | |
26 | mode change 100644 => 100755 tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh | |
27 | ||
28 | diff --git a/configure.ac b/configure.ac | |
29 | index e145aa370..ee754fd38 100644 | |
30 | --- a/configure.ac | |
31 | +++ b/configure.ac | |
32 | @@ -56,6 +56,7 @@ ZFS_AC_PACKAGE | |
33 | ZFS_AC_CONFIG | |
34 | ZFS_AC_DEBUG | |
35 | ZFS_AC_DEBUGINFO | |
36 | +ZFS_AC_GCOV | |
37 | ||
38 | AC_CONFIG_FILES([ | |
39 | Makefile | |
40 | diff --git a/Makefile.am b/Makefile.am | |
41 | index 508d3f40e..732a373bd 100644 | |
42 | --- a/Makefile.am | |
43 | +++ b/Makefile.am | |
44 | @@ -29,10 +29,10 @@ distclean-local:: | |
45 | -o -name .pc -o -name .hg -o -name .git \) -prune -o \ | |
46 | \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ | |
47 | -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ | |
48 | - -o -name '.*.rej' -o -name '.script-config' -o -size 0 \ | |
49 | - -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ | |
50 | - -o -name 'Makefile' -o -name 'Module.symvers' \ | |
51 | - -o -name '*.order' -o -name '*.markers' \) \ | |
52 | + -o -name '.*.rej' -o -size 0 -o -name '*%' -o -name '.*.cmd' \ | |
53 | + -o -name 'core' -o -name 'Makefile' -o -name 'Module.symvers' \ | |
54 | + -o -name '*.order' -o -name '*.markers' -o -name '*.gcda' \ | |
55 | + -o -name '*.gcno' \) \ | |
56 | -type f -print | xargs $(RM) | |
57 | ||
58 | dist-hook: | |
59 | diff --git a/.github/codecov.yml b/.github/codecov.yml | |
60 | new file mode 100644 | |
61 | index 000000000..f36be39cb | |
62 | --- /dev/null | |
63 | +++ b/.github/codecov.yml | |
64 | @@ -0,0 +1,9 @@ | |
65 | +codecov: | |
66 | + strict_yaml_branch: master # only use the latest copy on master branch | |
67 | + | |
68 | +comment: off | |
69 | + | |
70 | +coverage: | |
71 | + status: | |
72 | + project: off | |
73 | + patch: off | |
74 | diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 | |
75 | index a8609b829..b84658a64 100644 | |
76 | --- a/config/zfs-build.m4 | |
77 | +++ b/config/zfs-build.m4 | |
78 | @@ -75,6 +75,37 @@ AC_DEFUN([ZFS_AC_DEBUGINFO], [ | |
79 | AC_MSG_RESULT([$enable_debuginfo]) | |
80 | ]) | |
81 | ||
82 | +AC_DEFUN([ZFS_AC_GCOV_KERNEL], [ | |
83 | +]) | |
84 | + | |
85 | +AC_DEFUN([ZFS_AC_GCOV_USER], [ | |
86 | + DEBUG_CFLAGS="$DEBUG_CFLAGS -fprofile-arcs -ftest-coverage" | |
87 | +]) | |
88 | + | |
89 | +AC_DEFUN([ZFS_AC_GCOV], [ | |
90 | + AC_MSG_CHECKING([whether gcov profiling will be enabled]) | |
91 | + AC_ARG_ENABLE([gcov], | |
92 | + [AS_HELP_STRING([--enable-gcov], | |
93 | + [Enable gcov profiling @<:@default=no@:>@])], | |
94 | + [], | |
95 | + [enable_gcov=no]) | |
96 | + | |
97 | + AS_CASE(["x$enable_gcov"], | |
98 | + ["xyes"], | |
99 | + [ZFS_AC_GCOV_KERNEL | |
100 | + ZFS_AC_GCOV_USER], | |
101 | + ["xkernel"], | |
102 | + [ZFS_AC_GCOV_KERNEL], | |
103 | + ["xuser"], | |
104 | + [ZFS_AC_GCOV_USER], | |
105 | + ["xno"], | |
106 | + [], | |
107 | + [AC_MSG_ERROR([Unknown option $enable_gcov])]) | |
108 | + | |
109 | + AC_SUBST(DEBUG_CFLAGS) | |
110 | + AC_MSG_RESULT([$enable_gcov]) | |
111 | +]) | |
112 | + | |
113 | AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [ | |
114 | ZFS_AC_CONFIG_ALWAYS_NO_UNUSED_BUT_SET_VARIABLE | |
115 | ZFS_AC_CONFIG_ALWAYS_NO_BOOL_COMPARE | |
116 | diff --git a/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh b/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh | |
117 | old mode 100644 | |
118 | new mode 100755 | |
119 | -- | |
120 | 2.14.2 | |
121 |