ref: e58f5242cb191c17943de3db3ae5cf9368d2cfa3
parent: 571d5147f9136200463b421846c2669ee8b22a00
author: lieff <[email protected]>
date: Sun Jan 14 13:23:27 EST 2018
add gcov
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
fate-suite.ffmpeg.org
-minimp3
\ No newline at end of file
+minimp3
+*.gcda
+*.gcno
+*.gcov
\ No newline at end of file
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,4 +10,7 @@
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install -y wget; fi
script:
- - scripts/build.sh
\ No newline at end of file
+ - scripts/build.sh
+
+after_success:
+ - bash <(curl -s https://codecov.io/bash)
--- a/README.md
+++ b/README.md
@@ -6,6 +6,7 @@
<img alt="Coverity Scan Build Status"
src="https://scan.coverity.com/projects/14844/badge.svg"/>
</a>
+[![codecov](https://codecov.io/gh/lieff/minimp3/branch/master/graph/badge.svg)](https://codecov.io/gh/lieff/minimp3)
Minimalistic, single-header library for decoding MP3. minimp3 is designed to be
small, fast (with SSE and NEON support), and accurate (ISO conformant). You can
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -6,17 +6,12 @@
set -e
+gcc -coverage -O0 -o minimp3 minimp3_test.c -lm
+gcov minimp3_test.c
+
+scripts/test.sh
+
gcc -O2 -g -Wall -Wextra -fno-asynchronous-unwind-tables -fno-stack-protector -ffunction-sections \
-fdata-sections -Wl,--gc-sections -o minimp3 minimp3_test.c -lm
-APP=./minimp3
-
-set +e
-for i in vectors/*.bit; do
-$APP $i ${i%.*}.pcm
-retval=$?
-echo $i exited with code=$retval
-if [ ! $retval -eq 0 ]; then
- exit 1
-fi
-done
+scripts/test.sh
--- /dev/null
+++ b/scripts/test.sh
@@ -1,0 +1,17 @@
+_FILENAME=${0##*/}
+CUR_DIR=${0/${_FILENAME}}
+CUR_DIR=$(cd $(dirname ${CUR_DIR}); pwd)/$(basename ${CUR_DIR})/
+
+pushd $CUR_DIR/..
+
+APP=./minimp3
+
+set +e
+for i in vectors/*.bit; do
+$APP $i ${i%.*}.pcm
+retval=$?
+echo $i exited with code=$retval
+if [ ! $retval -eq 0 ]; then
+ exit 1
+fi
+done