]> git-server-git.apps.pok.os.sepia.ceph.com Git - jerasure.git/commitdiff
run tests with make check
authorLoic Dachary <loic@dachary.org>
Wed, 2 Apr 2014 16:22:53 +0000 (18:22 +0200)
committerLoic Dachary <loic@dachary.org>
Wed, 2 Apr 2014 16:22:53 +0000 (18:22 +0200)
* 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>
.gitignore
Examples/Makefile.am
Examples/test_all_gfs.sh
README

index a356bf321a24564e5cfbc845582ef30cdc7a9540..6c46716f16317d8965729a4d59f51a4d1a2d0d1e 100644 (file)
@@ -24,3 +24,5 @@ Makefile.in
 *.[ao]
 *~
 .dirstamp
+*.log
+*.trs
index 033f7d5951ad227d91abac619160d85b353357e4..182cc31fd8dacffec583e3e0a3ed4bb63cda3679 100644 (file)
@@ -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
index a9268c1d93fbddc3c2f900b4e445ae6adb1c825a..a03ee9c409303e7c30e5beec40f6d662edde1252 100755 (executable)
@@ -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 f48b3dc6932af8e528a29a62076597fe5b58e708..cf1d3a609bdb8de33343a44d8cee8df5d026f30a 100644 (file)
--- 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