New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
02-env.t in vendors/t/fcm-install-svn-hook – NEMO

source: vendors/t/fcm-install-svn-hook/02-env.t @ 10669

Last change on this file since 10669 was 10669, checked in by nicolasmartin, 5 years ago

Import latest FCM release from Github into the repository for testing

File size: 2.4 KB
Line 
1#!/bin/bash
2#-------------------------------------------------------------------------------
3# (C) British Crown Copyright 2006-17 Met Office.
4#
5# This file is part of FCM, tools for managing and building source code.
6#
7# FCM is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# FCM is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with FCM. If not, see <http://www.gnu.org/licenses/>.
19#-------------------------------------------------------------------------------
20# Test "fcm-install-svn-hook", "hooks-env" installation.
21#-------------------------------------------------------------------------------
22. $(dirname $0)/test_header
23. $TEST_SOURCE_DIR/test_header_more
24#-------------------------------------------------------------------------------
25if ! which svnadmin 1>/dev/null 2>/dev/null; then
26    skip_all 'svnadmin not available'
27fi
28tests 2
29FCM_REAL_HOME=$(readlink -f "$FCM_HOME")
30mkdir conf svn-repos
31export FCM_CONF_PATH="$PWD/conf"
32cat >conf/admin.cfg <<__CONF__
33admin_email=robert.fitzroy@metoffice.gov.uk
34notification_from=notifications@localhost
35svn_dump_dir=$PWD/svn/dumps
36svn_group=
37svn_hook_path_env=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
38svn_live_dir=$PWD/svn-repos
39svn_project_suffix=.svn
40trac_live_dir=$PWD/trac
41__CONF__
42svnadmin create svn-repos/foo.svn
43cat >hooks-env <<__CONF__
44[default]
45FCM_HOME=$FCM_REAL_HOME
46FCM_SVN_HOOK_ADMIN_EMAIL=robert.fitzroy@metoffice.gov.uk
47FCM_SVN_HOOK_COMMIT_DUMP_DIR=$PWD/svn/dumps
48FCM_SVN_HOOK_NOTIFICATION_FROM=notifications@localhost
49FCM_SVN_HOOK_REPOS_SUFFIX=.svn
50FCM_SVN_HOOK_TRAC_ROOT_DIR=$PWD/trac
51PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
52TZ=UTC
53__CONF__
54#-------------------------------------------------------------------------------
55TEST_KEY="$TEST_KEY_BASE"
56run_pass "$TEST_KEY" "$FCM_HOME/sbin/fcm-install-svn-hook"
57file_cmp "$TEST_KEY.foo.hooks-env" svn-repos/foo.svn/conf/hooks-env hooks-env
58#-------------------------------------------------------------------------------
59exit
Note: See TracBrowser for help on using the repository browser.