Skip to content

Commit ff4fdf3

Browse files
committed
updated coverage tests
1 parent d64582d commit ff4fdf3

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ script:
3333

3434
after_success:
3535
- cd ${TRAVIS_BUILD_DIR}
36-
#- lcov --directory . --capture --output-file coverage.info # capture coverage info
37-
lcov lib.c . --capture --output-file coverage.info
38-
- lcov --remove coverage.info 'tests/*' '/usr/*' 'example*' --output-file coverage.info # filter out system and test code
36+
- lcov --directory . --capture --output-file coverage.info # capture coverage info
37+
- lcov --remove coverage.info 'tests/*' '/usr/*' 'test-library*' --output-file coverage.info # filter out system and test code
3938
- lcov --list coverage.info # debug before upload
4039
#- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info # uploads to coveralls.. for a private repo using a token
4140
- coveralls-lcov coverage.info #for open source

makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# this is done with the flags -ftest-coverage -fprofile-arcs
66
# see run_coverage_test.sh to see how to call code coverage tests
77
CC=gcc
8-
CFLAGS=-I. -Wall -ftest-coverage -fprofile-arcs
9-
DEPS = lib.h
10-
OBJ = lib.o test-library.o
8+
CFLAGS = -I. -Wall -ftest-coverage -fprofile-arcs
9+
DEPS = lib.h
10+
OBJ = lib.o test-library.o
1111

1212
%.o: %.c $(DEPS)
1313
$(CC) -c -o $@ $< $(CFLAGS)
@@ -16,5 +16,5 @@ test-library.out: $(OBJ)
1616
gcc -o $@ $^ $(CFLAGS) -lm -lncurses -Os
1717

1818
clean :
19-
rm *.o *.asm *.lst *.sym *.rel *.s *.gc* -f
19+
rm *.o *.asm *.lst *.sym *.rel *.s *.gc* -f *.info
2020

run_coverage_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ make clean
99
make
1010

1111
# run the example.out program ... with test coverage (see makefile for flags)
12-
./example.out
12+
./test-library.out
1313

1414
# gcov is the gcc suite test coverage program. We're interested in the coverage
1515
# the lib.c file.

0 commit comments

Comments
 (0)