gramps/gramps2/test/runtest.sh

56 lines
1.7 KiB
Bash
Raw Normal View History

2005-11-23 09:30:39 +05:30
#! /bin/sh
2005-11-24 02:45:32 +05:30
#
# Report test for GRAMPS: Generate every report in every format.
#
# The results of this test set depend on what options were used
# previously with the reports, because this test set is not
# specifying all possible options and their combinations.
# Instead, this is a general test for all formats.
2005-11-23 09:30:39 +05:30
# $Id$
2005-11-24 02:45:32 +05:30
TOP_DIR=`dirname $PWD`
TEST_DIR=$TOP_DIR/test
SRC_DIR=$TOP_DIR/src
2005-11-23 09:30:39 +05:30
PRG="python gramps.py"
2005-11-24 02:45:32 +05:30
EXAMPLE_XML=$TOP_DIR/example/gramps/example.gramps
REP_DIR=$TEST_DIR/reports
mkdir -p $REP_DIR
OPTS="-i $EXAMPLE_XML"
2005-11-23 09:30:39 +05:30
GRPH_FMT="sxw ps pdf svg"
2005-11-24 09:56:35 +05:30
TEXT_FMT="sxw pdf kwd abw rtf txt html tex"
GRPH_REP="ancestor_chart2 descend_chart2 fan_chart statistics_chart timeline"
TEXT_REP="ancestor_report ancestors_report descend_report det_ancestor_report det_descendant_report family_group"
2005-11-23 09:30:39 +05:30
# Single run with all graphical reports in all formats
echo ""
echo "+--------------------------------------------------------------"
2005-11-24 02:45:32 +05:30
echo "| Graphical Reports: "$GRPH_REP
echo "| Graphical Formats: "$GRPH_FMT
echo "+--------------------------------------------------------------"
action=
for report in $GRPH_REP; do
for fmt in $GRPH_FMT; do
2005-11-24 02:45:32 +05:30
action="$action -a report -p name=$report,id=I44,off=$fmt,of=$REP_DIR/$report.$fmt"
done
done
2005-11-24 02:45:32 +05:30
(cd $SRC_DIR; $PRG $OPTS $action)
# Single run with all textual reports in all formats
echo ""
echo "+--------------------------------------------------------------"
2005-11-24 02:45:32 +05:30
echo "| Text Reports: "$TEXT_REP
echo "| Text Formats: "$TEXT_FMT
echo "+--------------------------------------------------------------"
action=
for report in $TEXT_REP; do
for fmt in $TEXT_FMT; do
2005-11-24 02:45:32 +05:30
action="$action -a report -p name=$report,id=I44,off=$fmt,of=$REP_DIR/$report.$fmt"
done
done
2005-11-24 02:45:32 +05:30
(cd $SRC_DIR; $PRG $OPTS $action)