summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Dachary <loic@dachary.org>2014-04-02 18:22:53 +0200
committerLoic Dachary <loic@dachary.org>2014-04-02 18:22:53 +0200
commit81f4bdd6f5ded33d18ef55c01f9c4edb196e41bf (patch)
tree5c4f7367b7c6d81a6270ca48079031341b4dc8b5
parentfcd867d01bfec7c6c1a2bdc4639f1a6b924e4fff (diff)
downloadjerasure-81f4bdd6f5ded33d18ef55c01f9c4edb196e41bf.tar.gz
run tests with make check
* Update the README accordingly * Add the VALGRIND variable to run thru valgrind where possible * Add the make check files administrative files to .gitignore Signed-off-by: Loic Dachary <loic@dachary.org>
-rw-r--r--.gitignore2
-rw-r--r--Examples/Makefile.am2
-rwxr-xr-xExamples/test_all_gfs.sh6
-rw-r--r--README12
4 files changed, 15 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index a356bf3..6c46716 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,5 @@ Makefile.in
*.[ao]
*~
.dirstamp
+*.log
+*.trs
diff --git a/Examples/Makefile.am b/Examples/Makefile.am
index 033f7d5..182cc31 100644
--- a/Examples/Makefile.am
+++ b/Examples/Makefile.am
@@ -25,6 +25,8 @@ bin_PROGRAMS = jerasure_01 \
encoder \
decoder
+TESTS=test_all_gfs.sh
+
dist_noinst_SCRIPTS = test_all_gfs.sh time_all_gfs_argv_init.sh
jerasure_01_SOURCES = jerasure_01.c
diff --git a/Examples/test_all_gfs.sh b/Examples/test_all_gfs.sh
index a9268c1..a03ee9c 100755
--- a/Examples/test_all_gfs.sh
+++ b/Examples/test_all_gfs.sh
@@ -46,7 +46,7 @@ seed=1370
${GF_METHODS} 8 -B -L | awk -F: '{ if ($1 == "w=8") print $2; }' |
while read method; do
echo "Testing ${k} ${m} 8 $seed ${method}"
- ./reed_sol_test_gf ${k} ${m} 8 $seed ${method} | tail -n 1
+ $VALGRIND ./reed_sol_test_gf ${k} ${m} 8 $seed ${method} | tail -n 1
if [[ $? != "0" ]]; then
echo "Failed test for ${k} ${m} 8 $seed ${method}"
exit 1
@@ -62,7 +62,7 @@ fi
${GF_METHODS} 16 -B -L | awk -F: '{ if ($1 == "w=16") print $2; }' |
while read method; do
echo "Testing ${k} ${m} 16 $seed ${method}"
- ./reed_sol_test_gf ${k} ${m} 16 $seed ${method} | tail -n 1
+ $VALGRIND ./reed_sol_test_gf ${k} ${m} 16 $seed ${method} | tail -n 1
if [[ $? != "0" ]]; then
echo "Failed test for ${k} ${m} 16 $seed ${method}"
exit 1
@@ -78,7 +78,7 @@ fi
${GF_METHODS} 32 -B -L | awk -F: '{ if ($1 == "w=32") print $2; }' |
while read method; do
echo "Testing ${k} ${m} 32 $seed ${method}"
- ./reed_sol_test_gf ${k} ${m} 32 $seed ${method} | tail -n 1
+ $VALGRIND ./reed_sol_test_gf ${k} ${m} 32 $seed ${method} | tail -n 1
if [[ $? != "0" ]]; then
echo "Failed test for ${k} ${m} 32 $seed ${method}"
exit 1
diff --git a/README b/README
index f48b3dc..cf1d3a6 100644
--- a/README
+++ b/README
@@ -77,10 +77,14 @@ Testing GF-Complete
If the GF-Complete tools are installed in /usr/local/bin
-cd Examples
-./test_all_gfs.sh
+ make check
If the GF-Complete tools are installed elsewhere
-cd Examples
-GF_COMPLETE_DIR=../../gf-complete/tools ./test_all_gfs.sh
+ make GF_COMPLETE_DIR=$(pwd)/../gf-complete/tools check
+
+To run some tests with valgrind
+
+ make VALGRIND='valgrind --tool=memcheck --quiet' \
+ GF_COMPLETE_DIR=$(pwd)/../gf-complete/tools \
+ check