From 0d6660d4f3f3210979a348bfb11520beff42cc35 Mon Sep 17 00:00:00 2001 From: Kamil Lepek Date: Wed, 8 Jan 2020 11:00:07 +0100 Subject: [PATCH] Enable code coverage tracking in pyocf --- README.md | 2 +- tests/functional/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6515151..bb02128 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ To run functional tests you need to install the following: - python3 (>=3.6.7) - pytest (Install with `pip3 install pytest`) -To run all functional tests (in compliance with the configuration file) use the following command: +To run all functional tests (in compliance with the configuration file) compile using makefile located in `./tests/functional/Makefile` and then use the following command: ~~~{.sh} pytest diff --git a/tests/functional/Makefile b/tests/functional/Makefile index 71a77dc..c074d23 100755 --- a/tests/functional/Makefile +++ b/tests/functional/Makefile @@ -23,11 +23,11 @@ all: | sync config_random $(OCFLIB): $(OBJS) @echo "Building $@" - @$(CC) -shared -o $@ $(CFLAGS) $^ -fPIC $(LDFLAGS) + @$(CC) -coverage -shared -o $@ $(CFLAGS) $^ -fPIC $(LDFLAGS) %.o: %.c @echo "Compiling $@" - @$(CC) -c $(CFLAGS) -o $@ -fPIC $^ $(LDFLAGS) + @$(CC) -coverage -c $(CFLAGS) -o $@ -fPIC $^ $(LDFLAGS) sync: @echo "Syncing OCF sources"