7699: update and run again tools.sh; it outputs two DB files for human inspection

This commit is contained in:
Bob Igo aka human-being 2014-05-16 11:52:53 +02:00 committed by Jérôme Rapinat
parent dce7a6d7f7
commit 9e15649868
2 changed files with 11 additions and 14 deletions

View File

@ -104,7 +104,7 @@ tool_modes = [TOOL_MODE_GUI, TOOL_MODE_CLI]
register(TOOL, register(TOOL,
id = 'populatesources', id = 'populatesources',
name = "Populate Sources and Citations", name = "Populate Sources and Citations",
description = ("This tool generates sources and citations ofr each source in " description = ("This tool generates sources and citations for each source in "
"order to populate the database for testing with significant " "order to populate the database for testing with significant "
"numbers of sources and citations"), "numbers of sources and citations"),
version = '1.0', version = '1.0',

View File

@ -11,41 +11,38 @@
TOP_DIR=`dirname $PWD` TOP_DIR=`dirname $PWD`
TEST_DIR=$TOP_DIR/test TEST_DIR=$TOP_DIR/test
SRC_DIR=$TOP_DIR/src SRC_DIR=$TOP_DIR/gramps
PRG="python gramps.py" PRG="python ../Gramps.py"
EXAMPLE_XML=$TOP_DIR/example/gramps/example.gramps EXAMPLE_XML=$TOP_DIR/example/gramps/example.gramps
MINIMAL_XML=$TOP_DIR/example/gramps/minimal.gramps
TOOL_DIR=$TEST_DIR/tools TOOL_DIR=$TEST_DIR/tools
mkdir -p $TOOL_DIR mkdir -p $TOOL_DIR
OPTS="-i $EXAMPLE_XML" OPTS="-i $EXAMPLE_XML"
TOOLS1="reorder_ids verify chkpoint rebuild dgenstats check" TOOLS1="reorder_ids verify rebuild dgenstats rebuild_genstats rebuild_refmap test_for_date_parser_and_displayer check"
TOOLS2="chtype cmdref testcasegenerator"
# Run all tools on the example data, check at the end # Run all tools on the example data, check at the end
echo "" echo ""
echo "+--------------------------------------------------------------" echo "+--------------------------------------------------------------"
echo "| Tools: chtype cmdref $TOOLS1" echo "| Tools: chtype $TOOLS1"
echo "+--------------------------------------------------------------" echo "+--------------------------------------------------------------"
action= action=
action="$action -a tool -p name=chtype,fromtype=Burial,totype=WeirdType" action="$action -a tool -p name=chtype,fromtype=Burial,totype=WeirdType"
action="$action -a tool -p name=cmdref,include=1,target=$TOOL_DIR/junk.xml"
for tool in $TOOLS1; do for tool in $TOOLS1; do
action="$action -a tool -p name=$tool" action="$action -a tool -p name=$tool"
done done
(cd $SRC_DIR; $PRG $OPTS $action) /bin/rm -f $TOOL_DIR/tools1.gramps
(cd $SRC_DIR; $PRG $OPTS $action -e $TOOL_DIR/tools1.gramps)
# Run random test generator on an empty db, preserve the result. # Run random test generator on an empty db, preserve the result.
echo "" echo ""
echo "+--------------------------------------------------------------" echo "+--------------------------------------------------------------"
echo "| Tool: testcasegenerator" echo "| Tool: testcasegenerator"
echo "+--------------------------------------------------------------" echo "+--------------------------------------------------------------"
TEST_DATA=$TOOL_DIR/junk.grdb TEST_DATA=$MINIMAL_XML
if [ -f $TEST_DATA ]; then /bin/rm -f $TOOL_DIR/testcases.gramps
rm $TEST_DATA OPTS="-i $TEST_DATA -e $TOOL_DIR/testcases.gramps"
fi
touch $TEST_DATA
OPTS="-O $TEST_DATA"
action="-a tool -p name=testcasegenerator" action="-a tool -p name=testcasegenerator"
(cd $SRC_DIR; $PRG $OPTS $action) (cd $SRC_DIR; $PRG $OPTS $action)