intpips: correct pushdb at end

Signed-off-by: John McMaster <johndmcmaster@gmail.com>
This commit is contained in:
John McMaster 2018-12-11 16:46:05 -08:00
parent 35a473ffed
commit 3d50e89dcd
2 changed files with 12 additions and 7 deletions

View File

@ -37,7 +37,7 @@ build/todo.txt: build/pips_int_l.txt maketodo.py
# XXX: conider moving to script # XXX: conider moving to script
run: run:
$(MAKE) clean $(MAKE) clean
XRAY_DIR=${XRAY_DIR} MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" QUICK=$(QUICK) $(XRAY_DIR)/fuzzers/int_loop.sh --check-args "$(CHECK_ARGS)" --pushdb XRAY_DIR=${XRAY_DIR} MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" QUICK=$(QUICK) $(XRAY_DIR)/fuzzers/int_loop.sh --check-args "$(CHECK_ARGS)" --iter-pushdb
touch run.ok touch run.ok
clean: clean:

View File

@ -6,11 +6,12 @@ usage() {
echo "--check-args <args> int_loop_check.py args" echo "--check-args <args> int_loop_check.py args"
# intpips ingests all segbits files at once and does a push at the end # intpips ingests all segbits files at once and does a push at the end
# other loopers do a push every pass # other loopers do a push every pass
echo "--pushdb make pushdb after successful make database" echo "--iter-pushdb make pushdb after successful make database as opposed to end"
} }
check_args= check_args=
pushdb=false iter_pushdb=false
end_pushdb=true
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case "$1" in case "$1" in
--check-args) --check-args)
@ -18,8 +19,9 @@ while [[ $# -gt 0 ]]; do
shift shift
shift shift
;; ;;
--pushdb) --iter-pushdb)
pushdb=true iter_pushdb=true
end_pushdb=false
shift shift
;; ;;
-h|--help) -h|--help)
@ -55,13 +57,16 @@ while true; do
cp build/todo.txt todo/${i}.txt; cp build/todo.txt todo/${i}.txt;
cp build/todo_all.txt todo/${i}_all.txt; cp build/todo_all.txt todo/${i}_all.txt;
if ${MAKE} ${MAKEFLAGS} N=$i database; then if ${MAKE} ${MAKEFLAGS} N=$i database; then
if $pushdb ; then if $iter_pushdb ; then
${MAKE} ${MAKEFLAGS} pushdb; ${MAKE} ${MAKEFLAGS} pushdb
fi fi
fi; fi;
if [ "$QUICK" = "Y" ] ; then if [ "$QUICK" = "Y" ] ; then
break; break;
fi fi
done; done;
if $end_pushdb ; then
${MAKE} ${MAKEFLAGS} pushdb
fi
exit 0 exit 0