Changeset 500 for trunk


Ignore:
Timestamp:
Oct 16, 2007, 11:44:33 PM (14 years ago)
Author:
Peter Johansson
Message:

shaping up generation of shell script tests

Location:
trunk/test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Makefile.am

    r439 r500  
    4040utility_test_SOURCES = utility_test.cc
    4141
    42 check_repo_status.sh: check_repo_status.sh.in Makefile.am
    43   @echo \#!$(SHELL) > $@;
    44   @cat check_repo_status.sh.in >> $@;
    45   @chmod 744 $@;
    46   @echo create $@; 
     42rootdir = $(srcdir)/toy_project
     43targetdir = $(builddir)/generated_output
     44do_subst = $(SED) -e 's,@srcdir,$(srcdir),g' \
     45            -e 's,@top_builddir,$(top_builddir),g' \
     46            -e 's,@builddir,$(builddir),g' \
     47            -e 's,@MKDIR_P,$(MKDIR_P),g' \
     48            -e 's,@rootdir,$(rootdir),g' \
     49            -e 's,@targetdir,$(targetdir),g' \
     50                  -e 's,@SHELL,$(SHELL),g'
    4751
    48 test_repo.sh: test_repo.sh.in Makefile.am
    49   @echo \#!$(SHELL) > $@;
    50   @echo srcdir=$(srcdir) >> $@;
    51   @echo top_builddir=$(top_builddir) >> $@;
    52   @echo targetdir=$(srcdir)/generated_output >> $@;
    53   @cat test_repo.sh.in >> $@;
    54   @chmod 744 $@;
    55   @echo create $@; 
     52check_repo_status.sh: check_repo_status.sh.in Makefile
     53  @$(do_subst) < $< > $@
     54  @chmod +x $@
     55  @echo create $@
     56
     57test_repo.sh: test_repo.sh.in Makefile
     58  @$(do_subst) < $< > $@
     59  @chmod +x $@
     60  @echo create $@
    5661
    5762clean-local:
    5863  rm -rf *.png *.tmp *~ check_repo_status.sh test_repo.sh \
    59   $(srcdir)/generated_output 
     64  $(targetdir) 
    6065
  • trunk/test/check_repo_status.sh.in

    r492 r500  
     1#!@SHELL
    12# $Id$
    23
  • trunk/test/test_repo.sh.in

    r439 r500  
     1#!@SHELL
    12# $Id$
    23
     
    2021# 02111-1307, USA.
    2122
    22 toy=$srcdir/toy_project;
    23 
    2423# test repository does not exist and need to be checked out
    25 if [ ! -d $toy ]; then
    26     repodir=`cd "$srcdir" && pwd`;
     24if [ ! -d @rootdir ]; then
     25    repodir=`cd "@srcdir" && pwd`;
    2726    repodir=$repodir"/repo/trunk";
    28     svn checkout file://$repodir $toy;
     27    svn checkout file://$repodir @rootdir;
    2928fi
    3029
    31 svn update $toy > /dev/null;
     30svn update @rootdir > /dev/null;
    3231
    33 if [ ! -d $targetdir ]; then
    34     mkdir $targetdir;
     32if [ ! -d @targetdir ]; then
     33    mkdir @targetdir;
    3534fi
    3635
    37 exec $top_builddir/bin/svndigest -r $toy -t $targetdir -f --copyright $1;
     36exec @top_builddir/bin/svndigest -r @rootdir -t @targetdir -f --copyright $1;
Note: See TracChangeset for help on using the changeset viewer.