aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-04-30 22:38:28 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2019-04-30 22:38:55 +0200
commit216666e45478353333909b6ec35374231ff75af7 (patch)
tree3c4d7aa4a6419f6e777ade46ec528c9e094a6f0d
parentd00bfe9410cfcaeb247ba68a88144defb5184ac9 (diff)
coverage: Allow to run coverage everywhere
Coverage presumed that an available afb-daemon without coverage instrumentation was available in the PATH. This fix that problem by compiling that requirement. Bug-AGL: SPEC-1130 Change-Id: Ic3435d73e830d630bef63dfb8e9b2ff9f1bf043c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--coverage/.gitignore1
-rw-r--r--coverage/bin/Makefile11
2 files changed, 9 insertions, 3 deletions
diff --git a/coverage/.gitignore b/coverage/.gitignore
index a5854309..f0d02b07 100644
--- a/coverage/.gitignore
+++ b/coverage/.gitignore
@@ -5,6 +5,7 @@ bin/bugs
run-test.output
bin/afb-client
bin/afb-daemon-cov
+bin/afb-daemon-nocov
bin/test-apiset
bin/test-session
bin/test-wrap-json
diff --git a/coverage/bin/Makefile b/coverage/bin/Makefile
index 28c09cca..9ebfa9d7 100644
--- a/coverage/bin/Makefile
+++ b/coverage/bin/Makefile
@@ -25,6 +25,7 @@ tests = \
test-wrap-json
targets = \
+ afb-daemon-nocov \
afb-daemon-cov \
afb-client \
$(tests) \
@@ -82,7 +83,7 @@ afb_lib_obj = $(patsubst $(srcdir)/%.c,%.o,$(afb_lib_src))
afb_lib = afb-lib.a
afb_lib_defs = $(defs)
-afb_daemon_srcs = $(srcdir)/main-afb-daemon.c $(afb_lib_obj)
+afb_daemon_srcs = $(srcdir)/main-afb-daemon.c
afb_daemon_defs = $(afb_lib_defs)
afb_client_srcs = $(srcdir)/main-afb-client-demo.c $(srcdir)/afb-ws-client.c $(afb_lib_src)
@@ -111,9 +112,13 @@ binding_flags = -shared -fPIC -Wl,--version-script=$(samdir)/export.map
@echo creation of $@
@gcc -c -o $@ $< --coverage $(afb_lib_defs) $(ccflags)
-afb-daemon-cov: $(afb_daemon_srcs)
+afb-daemon-cov: $(afb_daemon_srcs) $(afb_lib_obj)
@echo creation of $@
- @gcc -o $@ $(afb_daemon_srcs) --coverage $(afb_daemon_defs) $(cflags)
+ @gcc -o $@ $(afb_daemon_srcs) $(afb_lib_obj) --coverage $(afb_daemon_defs) $(cflags)
+
+afb-daemon-nocov: $(afb_daemon_srcs) $(afb_lib_src)
+ @echo creation of $@
+ @gcc -o $@ $(afb_daemon_srcs) $(afb_lib_src) $(afb_daemon_defs) $(cflags)
afb-client: $(afb_client_srcs)
@echo creation of $@