Skip to content

Commit

Permalink
Merged in dachary/jerasure/wip-make-check (pull request #16)
Browse files Browse the repository at this point in the history
run tests with make check
  • Loading branch information
kmgreen2 committed Apr 3, 2014
2 parents 3f6d524 + 81f4bdd commit 80fc5d1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ Makefile.in
*.[ao]
*~
.dirstamp
*.log
*.trs
2 changes: 2 additions & 0 deletions Examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Examples/test_all_gfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 8 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 80fc5d1

Please sign in to comment.