Commit 80fc5d1d95f06ea4732717b06b42177099cc93c9
Exists in
master
and in
5 other branches
Merged in dachary/jerasure/wip-make-check (pull request #16)
run tests with make check
Showing
4 changed files
with
15 additions
and
7 deletions
Show diff stats
.gitignore
Examples/Makefile.am
@@ -25,6 +25,8 @@ bin_PROGRAMS = jerasure_01 \ | @@ -25,6 +25,8 @@ bin_PROGRAMS = jerasure_01 \ | ||
25 | encoder \ | 25 | encoder \ |
26 | decoder | 26 | decoder |
27 | 27 | ||
28 | +TESTS=test_all_gfs.sh | ||
29 | + | ||
28 | dist_noinst_SCRIPTS = test_all_gfs.sh time_all_gfs_argv_init.sh | 30 | dist_noinst_SCRIPTS = test_all_gfs.sh time_all_gfs_argv_init.sh |
29 | 31 | ||
30 | jerasure_01_SOURCES = jerasure_01.c | 32 | jerasure_01_SOURCES = jerasure_01.c |
Examples/test_all_gfs.sh
@@ -46,7 +46,7 @@ seed=1370 | @@ -46,7 +46,7 @@ seed=1370 | ||
46 | ${GF_METHODS} 8 -B -L | awk -F: '{ if ($1 == "w=8") print $2; }' | | 46 | ${GF_METHODS} 8 -B -L | awk -F: '{ if ($1 == "w=8") print $2; }' | |
47 | while read method; do | 47 | while read method; do |
48 | echo "Testing ${k} ${m} 8 $seed ${method}" | 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 | if [[ $? != "0" ]]; then | 50 | if [[ $? != "0" ]]; then |
51 | echo "Failed test for ${k} ${m} 8 $seed ${method}" | 51 | echo "Failed test for ${k} ${m} 8 $seed ${method}" |
52 | exit 1 | 52 | exit 1 |
@@ -62,7 +62,7 @@ fi | @@ -62,7 +62,7 @@ fi | ||
62 | ${GF_METHODS} 16 -B -L | awk -F: '{ if ($1 == "w=16") print $2; }' | | 62 | ${GF_METHODS} 16 -B -L | awk -F: '{ if ($1 == "w=16") print $2; }' | |
63 | while read method; do | 63 | while read method; do |
64 | echo "Testing ${k} ${m} 16 $seed ${method}" | 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 | if [[ $? != "0" ]]; then | 66 | if [[ $? != "0" ]]; then |
67 | echo "Failed test for ${k} ${m} 16 $seed ${method}" | 67 | echo "Failed test for ${k} ${m} 16 $seed ${method}" |
68 | exit 1 | 68 | exit 1 |
@@ -78,7 +78,7 @@ fi | @@ -78,7 +78,7 @@ fi | ||
78 | ${GF_METHODS} 32 -B -L | awk -F: '{ if ($1 == "w=32") print $2; }' | | 78 | ${GF_METHODS} 32 -B -L | awk -F: '{ if ($1 == "w=32") print $2; }' | |
79 | while read method; do | 79 | while read method; do |
80 | echo "Testing ${k} ${m} 32 $seed ${method}" | 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 | if [[ $? != "0" ]]; then | 82 | if [[ $? != "0" ]]; then |
83 | echo "Failed test for ${k} ${m} 32 $seed ${method}" | 83 | echo "Failed test for ${k} ${m} 32 $seed ${method}" |
84 | exit 1 | 84 | exit 1 |
README
@@ -77,10 +77,14 @@ Testing GF-Complete | @@ -77,10 +77,14 @@ Testing GF-Complete | ||
77 | 77 | ||
78 | If the GF-Complete tools are installed in /usr/local/bin | 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 | If the GF-Complete tools are installed elsewhere | 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 |