Skip to content

Commit 81f4bdd

Browse files
author
Loic Dachary
committed
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 <[email protected]>
1 parent fcd867d commit 81f4bdd

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ Makefile.in
2424
*.[ao]
2525
*~
2626
.dirstamp
27+
*.log
28+
*.trs

Examples/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ bin_PROGRAMS = jerasure_01 \
2525
encoder \
2626
decoder
2727

28+
TESTS=test_all_gfs.sh
29+
2830
dist_noinst_SCRIPTS = test_all_gfs.sh time_all_gfs_argv_init.sh
2931

3032
jerasure_01_SOURCES = jerasure_01.c

Examples/test_all_gfs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ seed=1370
4646
${GF_METHODS} 8 -B -L | awk -F: '{ if ($1 == "w=8") print $2; }' |
4747
while read method; do
4848
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
5050
if [[ $? != "0" ]]; then
5151
echo "Failed test for ${k} ${m} 8 $seed ${method}"
5252
exit 1
@@ -62,7 +62,7 @@ fi
6262
${GF_METHODS} 16 -B -L | awk -F: '{ if ($1 == "w=16") print $2; }' |
6363
while read method; do
6464
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
6666
if [[ $? != "0" ]]; then
6767
echo "Failed test for ${k} ${m} 16 $seed ${method}"
6868
exit 1
@@ -78,7 +78,7 @@ fi
7878
${GF_METHODS} 32 -B -L | awk -F: '{ if ($1 == "w=32") print $2; }' |
7979
while read method; do
8080
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
8282
if [[ $? != "0" ]]; then
8383
echo "Failed test for ${k} ${m} 32 $seed ${method}"
8484
exit 1

README

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,14 @@ Testing GF-Complete
7777

7878
If the GF-Complete tools are installed in /usr/local/bin
7979

80-
cd Examples
81-
./test_all_gfs.sh
80+
make check
8281

8382
If the GF-Complete tools are installed elsewhere
8483

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

0 commit comments

Comments
 (0)