source: trunk/test/init.sh.in @ 1087

Last change on this file since 1087 was 1045, checked in by Peter Johansson, 11 years ago

refs #449 making shell tests verbose as well.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1#!@SHELL@
2# @configure_input@
3
4# $Id: init.sh.in 1045 2010-03-27 21:29:58Z peter $
5
6# Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
7# Copyright (C) 2009, 2010 Peter Johansson
8#
9# This file is part of svndigest, http://dev.thep.lu.se/svndigest
10#
11# svndigest is free software; you can redistribute it and/or modify it
12# under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 3 of the License, or
14# (at your option) any later version.
15#
16# svndigest is distributed in the hope that it will be useful, but
17# WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19# General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with svndigest. If not, see <http://www.gnu.org/licenses/>.
23
24exit_fail ()
25{
26  echo "$me: failed test: $@";
27  exit 1
28}
29
30exit_skip ()
31{
32  echo "$me: skipped test: $@"
33  exit 77
34}
35
36exit_success ()
37{
38  echo "$me: successsful test: $@";
39  exit 0
40}
41
42# primary variables - set by config.status
43abs_top_builddir=@abs_top_builddir@
44abs_builddir=@abs_builddir@
45mkdir_p="@MKDIR_P@"
46repo="@abs_test_repo@"
47shell=@SHELL@
48test_repo_found=@test_repo_found@
49wc_found="@wc_found@"
50
51test -z "$SVNDIGEST" && SVNDIGEST="@top_builddir@/bin/svndigest --verbose";
52test -z "$srcdir" && srcdir="@srcdir@";
53test -z "$SVN" && SVN=svn;
54
55# some helpful derived variables
56rootdir=$abs_builddir/toy_project
57targetdir=$abs_builddir/generated_output
58repo_url="file://$repo"
59
60me=$0
61
62for r in : $required; do
63  case $r in
64    repo*)
65      if test x$test_repo_found = xyes; then
66        cd $abs_builddir && $shell svn_update.sh || exit 1;
67      else
68        exit_skip "no test repository available";
69      fi;;
70    wc)
71      if test x$wc_found = xno; then
72        exit_skip "not subversion working copy";
73      fi;;
74    *)
75    :
76  esac
77done
78
79echo "=== running $me ==="
80
81# turn on trace
82set -x;
Note: See TracBrowser for help on using the repository browser.