Skip to content

Commit d64582d

Browse files
committed
updated test and coverage
1 parent 3d6e300 commit d64582d

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ script:
3333

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

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![Build Status](https://travis-ci.org/deftio/travis-ci-cpp-example.svg?branch=master)](https://travis-ci.org/deftio/travis-ci-cpp-example)
22
[![Coverage Status](https://coveralls.io/repos/github/deftio/travis-ci-cpp-example/badge.svg?branch=master)](https://coveralls.io/github/deftio/travis-ci-cpp-example?branch=master)
3+
[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
34

45
# Travis-CI Simple Stand Alone Example for C/C++
56

@@ -10,7 +11,7 @@ version 1.0 M. A. Chatterjee
1011

1112
## About
1213

13-
Travis-CI is a test coverage service common for open source projects. This repo is just a stand alone example of how to call it for small C/C++ libraries.
14+
Travis-CI is a test coverage service common for open source projects. This repo is just a stand alone example of how to call it for small C/C++ libraries
1415

1516

1617
## Features
@@ -33,7 +34,7 @@ Code coverage is achieved using gcov from the gcc test suite. The example.out
3334
```
3435
make clean
3536
make
36-
./example.out
37+
./test-library.out
3738
gcov lib.c
3839
```
3940

makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
CC=gcc
88
CFLAGS=-I. -Wall -ftest-coverage -fprofile-arcs
99
DEPS = lib.h
10-
OBJ = lib.o main.o
10+
OBJ = lib.o test-library.o
1111

1212
%.o: %.c $(DEPS)
1313
$(CC) -c -o $@ $< $(CFLAGS)
1414

15-
example.out: $(OBJ)
15+
test-library.out: $(OBJ)
1616
gcc -o $@ $^ $(CFLAGS) -lm -lncurses -Os
1717

1818
clean :
File renamed without changes.

0 commit comments

Comments
 (0)