Skip to content

Commit

Permalink
add filtering (such as grep) support via $FILTER, untested, looks OK
Browse files Browse the repository at this point in the history
From Simon Ruderich
  • Loading branch information
vext01 committed Feb 5, 2012
1 parent 64d8ae3 commit 3bc9db5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#!/do/not/execute

run_test() {
r2args="${r2} -e scr.color=0 -n -q -i ${rad} ${ARGS} ${FILE} > ${out} 2>&1"
r2args="${r2} -e scr.color=0 -n -q -i ${rad} ${ARGS} ${FILE}"

# ${FILTER} can be used to filter out random results to create stable
# tests.
if [ -n "${FILTER}" ]; then
r2args="${r2args} 2>&1 | ${FILTER} > ${out}"
else
r2args="${r2args} > ${out} 2>&1"
fi

if [ -n "${VALGRIND}" ]; then
cmd="valgrind --error-exitcode=47 --log-file=${val} ${r2args}"
Expand Down

0 comments on commit 3bc9db5

Please sign in to comment.