Skip to content

Commit

Permalink
Fix coverage script
Browse files Browse the repository at this point in the history
  • Loading branch information
fede1024 committed Dec 30, 2017
1 parent 26a0a76 commit 60d9bf9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -9,7 +9,7 @@
A fully asynchronous, [futures]-based Kafka client library for Rust based on [librdkafka].

## The library
`rust-rdkafka` provides a safe Rust interface to librdkafka. The master branch is currently based on librdkafka 0.11.1.
`rust-rdkafka` provides a safe Rust interface to librdkafka. The master branch is currently based on librdkafka 0.11.3.

### Documentation

Expand Down
41 changes: 28 additions & 13 deletions coverage.sh
Expand Up @@ -26,23 +26,38 @@ echo -e "${GREEN}*** Rebuilding tests ***${NC}"
cargo test --no-run
pushd rdkafka-sys && cargo test --no-run && popd

echo -e "${GREEN}*** Run coverage on unit tests ***${NC}"
kcov $KCOV_ARGS "$RDKAFKA_UNIT_TESTS"*
if [ "$?" != "0" ]; then
echo -e "${RED}*** Failure during unit test converage ***${NC}"
exit 1
fi

kcov $KCOV_ARGS "$RDKAFKASYS_UNIT_TESTS"*
if [ "$?" != "0" ]; then
echo -e "${RED}*** Failure during rdkafka-sys unit test converage ***${NC}"
exit 1
fi
echo -e "${GREEN}*** Run coverage on rdkafka unit tests ***${NC}"
for test_file in `ls "$RDKAFKA_UNIT_TESTS"*`
do
if [[ ! -x "$test_file" ]]; then
continue
fi
kcov $KCOV_ARGS "$test_file"
if [ "$?" != "0" ]; then
echo -e "${RED}*** Failure during unit test converage ***${NC}"
exit 1
fi
done

echo -e "${GREEN}*** Run coverage on integration tests ***${NC}"
echo -e "${GREEN}*** Run coverage on rdkafka-sys unit tests ***${NC}"
for test_file in `ls "$RDKAFKASYS_UNIT_TESTS"*`
do
if [[ ! -x "$test_file" ]]; then
continue
fi
kcov $KCOV_ARGS "$test_file"
if [ "$?" != "0" ]; then
echo -e "${RED}*** Failure during rdkafka-sys unit test converage ***${NC}"
exit 1
fi
done

echo -e "${GREEN}*** Run coverage on rdkafka integration tests ***${NC}"
for test_file in `ls "$INTEGRATION_TESTS"*`
do
if [[ ! -x "$test_file" ]]; then
continue
fi
echo -e "${GREEN}Executing "$test_file"${NC}"
kcov $KCOV_ARGS "$test_file"
if [ "$?" != "0" ]; then
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -2,7 +2,7 @@
//! A fully asynchronous, [futures]-based Kafka client library for Rust based on [librdkafka].
//!
//! ## The library
//! `rust-rdkafka` provides a safe Rust interface to librdkafka. The master branch is currently based on librdkafka 0.11.1.
//! `rust-rdkafka` provides a safe Rust interface to librdkafka. The master branch is currently based on librdkafka 0.11.3.
//!
//! ### Documentation
//!
Expand Down

0 comments on commit 60d9bf9

Please sign in to comment.