Commit 80fc5d1d95f06ea4732717b06b42177099cc93c9

Authored by KMG
2 parents 3f6d524d 81f4bdd6
Exists in master

Merged in dachary/jerasure/wip-make-check (pull request #16)

run tests with make check
.gitignore
... ... @@ -24,3 +24,5 @@ Makefile.in
24 24 *.[ao]
25 25 *~
26 26 .dirstamp
  27 +*.log
  28 +*.trs
... ...
Examples/Makefile.am
... ... @@ -25,6 +25,8 @@ bin_PROGRAMS = jerasure_01 \
25 25 encoder \
26 26 decoder
27 27  
  28 +TESTS=test_all_gfs.sh
  29 +
28 30 dist_noinst_SCRIPTS = test_all_gfs.sh time_all_gfs_argv_init.sh
29 31  
30 32 jerasure_01_SOURCES = jerasure_01.c
... ...
Examples/test_all_gfs.sh
... ... @@ -46,7 +46,7 @@ seed=1370
46 46 ${GF_METHODS} 8 -B -L | awk -F: '{ if ($1 == "w=8") print $2; }' |
47 47 while read method; do
48 48 echo "Testing ${k} ${m} 8 $seed ${method}"
49   - ./reed_sol_test_gf ${k} ${m} 8 $seed ${method} | tail -n 1
  49 + $VALGRIND ./reed_sol_test_gf ${k} ${m} 8 $seed ${method} | tail -n 1
50 50 if [[ $? != "0" ]]; then
51 51 echo "Failed test for ${k} ${m} 8 $seed ${method}"
52 52 exit 1
... ... @@ -62,7 +62,7 @@ fi
62 62 ${GF_METHODS} 16 -B -L | awk -F: '{ if ($1 == "w=16") print $2; }' |
63 63 while read method; do
64 64 echo "Testing ${k} ${m} 16 $seed ${method}"
65   - ./reed_sol_test_gf ${k} ${m} 16 $seed ${method} | tail -n 1
  65 + $VALGRIND ./reed_sol_test_gf ${k} ${m} 16 $seed ${method} | tail -n 1
66 66 if [[ $? != "0" ]]; then
67 67 echo "Failed test for ${k} ${m} 16 $seed ${method}"
68 68 exit 1
... ... @@ -78,7 +78,7 @@ fi
78 78 ${GF_METHODS} 32 -B -L | awk -F: '{ if ($1 == "w=32") print $2; }' |
79 79 while read method; do
80 80 echo "Testing ${k} ${m} 32 $seed ${method}"
81   - ./reed_sol_test_gf ${k} ${m} 32 $seed ${method} | tail -n 1
  81 + $VALGRIND ./reed_sol_test_gf ${k} ${m} 32 $seed ${method} | tail -n 1
82 82 if [[ $? != "0" ]]; then
83 83 echo "Failed test for ${k} ${m} 32 $seed ${method}"
84 84 exit 1
... ...
README
... ... @@ -77,10 +77,14 @@ Testing GF-Complete
77 77  
78 78 If the GF-Complete tools are installed in /usr/local/bin
79 79  
80   -cd Examples
81   -./test_all_gfs.sh
  80 + make check
82 81  
83 82 If the GF-Complete tools are installed elsewhere
84 83  
85   -cd Examples
86   -GF_COMPLETE_DIR=../../gf-complete/tools ./test_all_gfs.sh
  84 + make GF_COMPLETE_DIR=$(pwd)/../gf-complete/tools check
  85 +
  86 +To run some tests with valgrind
  87 +
  88 + make VALGRIND='valgrind --tool=memcheck --quiet' \
  89 + GF_COMPLETE_DIR=$(pwd)/../gf-complete/tools \
  90 + check
... ...