3 # mailer-t1.sh: test #1 for the mailer.py script
5 # This test generates "email" for each revision in the repository,
6 # concatenating them into one big blob, which is then compared against
9 # Note: mailer-tweak.py must have been run to make the test outputs
10 # consistent and reproducible
12 # USAGE: ./mailer-t1.sh REPOS MAILER-SCRIPT
15 if test "$#" != 2; then
16 echo "USAGE: ./mailer-t1.sh REPOS MAILER-SCRIPT"
20 scripts
="`dirname $0`"
21 scripts
="`cd $scripts && pwd`"
23 glom
=$scripts/mailer-t1.current
24 orig
=$scripts/mailer-t1.output
25 conf
=$scripts/mailer.conf
30 youngest
="`svnlook youngest $1`"
31 for rev in `python -c "import string; print string.join(map(str, range(1,$youngest+1)))"`; do
32 $2 commit
$1 $rev $conf >> $glom
35 echo "current mailer.py output in: $glom"
39 echo diff -q $orig $glom
40 diff -q $orig $glom && echo "SUCCESS: no differences detected"