source: XIOS/tools/FCM/test/create_repos @ 1520

Last change on this file since 1520 was 81, checked in by ymipsl, 11 years ago

ajout FCM 1.5

File size: 4.8 KB
Line 
1#!/bin/ksh
2
3REPOS_FILES=$PWD/repos
4
5echo "$(date): Creating repository ..."
6rm -rf $REPOS_DIR
7svnadmin create --fs-type fsfs $REPOS_DIR
8
9echo "$(date): Initial import ..."
10
11svn import -q $REPOS_FILES/trunk $REPOS_URL/trunk -m" "
12svn mkdir -q $REPOS_URL/branches -m" "
13svn mkdir -q $REPOS_URL/tags -m" "
14
15# Modify some files
16branch=modify_files_base
17fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
18rm -rf $BASE_DIR/work
19svn co -q $REPOS_URL/branches/dev/Share/$branch $BASE_DIR/work
20cd $BASE_DIR/work
21perl -pi -e 's/IMPLICIT NONE/implicit none/' program/hello.F90
22perl -pi -e 's/Hello Earth/Hello Earthlings/' module/hello_constants.inc
23svn ci -m" "
24
25# Modify some files, one of which can be merged with modify_files_base branch
26branch=modify_files_merge1
27fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
28svn sw $REPOS_URL/branches/dev/Share/$branch
29perl -pi -e "s/this = 'Hello'/this = 'HELLO'/" program/hello.F90
30perl -pi -e 's/Hello Earth/Hello Earthlings/' subroutine/hello_c.c
31svn ci -m" "
32
33# Modify a file which can be merged with the modify_files_base & modify_files_merge1 branches
34branch=modify_files_merge2
35fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
36svn sw $REPOS_URL/branches/dev/Share/$branch
37perl -pi -e 's/PROGRAM/program/' program/hello.F90
38svn ci -m" "
39
40# Modify a file which clashes with modify_files_base branch
41branch=modify_files_clash
42fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
43svn sw $REPOS_URL/branches/dev/Share/$branch
44perl -pi -e 's/IMPLICIT NONE/implicit NONE/' program/hello.F90
45svn ci -m" "
46
47# Modify a subroutine without altering its interface
48branch=modify_subroutine
49fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
50svn sw $REPOS_URL/branches/dev/Share/$branch
51perl -pi -e 's/integer (common)/integer (com)/' subroutine/hello_sub.F90
52svn ci -m" "
53
54# Modify a subroutine and alter its interface
55branch=modify_subroutine_interface
56fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
57svn sw $REPOS_URL/branches/dev/Share/$branch
58perl -pi -e 's/integer_arg/int_arg/' subroutine/hello_sub.F90
59svn ci -m" "
60
61# Modify a pre-processing include file
62branch=modify_pp_include
63fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
64svn sw $REPOS_URL/branches/dev/Share/$branch
65perl -pi -e 's/:/: Message - /' subroutine/hello_sub.h
66svn ci -m" "
67
68# Add a new file
69branch=add_file
70fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
71svn sw $REPOS_URL/branches/dev/Share/$branch
72cp $REPOS_FILES/add_subroutine/hello.F90 program/hello.F90
73cp $REPOS_FILES/add_subroutine/hello_sub2.f90 subroutine
74svn add subroutine/hello_sub2.f90
75svn ci -m" "
76
77# Add a new directory
78branch=add_directory
79fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
80svn sw $REPOS_URL/branches/dev/Share/$branch
81cp $REPOS_FILES/add_subroutine/hello.F90 program/hello.F90
82mkdir subroutine2
83cp $REPOS_FILES/add_subroutine/hello_sub2.f90 subroutine2
84svn add subroutine2
85svn ci -m" "
86
87# Delete a file
88branch=delete_file
89fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
90svn sw $REPOS_URL/branches/dev/Share/$branch
91svn rm subroutine/hello_c.c
92svn ci -m" "
93
94# Delete a Fortran include file
95branch=delete_inc_file
96fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
97svn sw $REPOS_URL/branches/dev/Share/$branch
98svn rm module/hello_constants.inc
99svn ci -m" "
100
101# Delete a CPP include file
102branch=delete_ppinc_file
103fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
104svn sw $REPOS_URL/branches/dev/Share/$branch
105svn rm subroutine/hello_sub.h
106svn ci -m" "
107
108# Delete a directory
109branch=delete_directory
110fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
111svn sw $REPOS_URL/branches/dev/Share/$branch
112svn rm subroutine
113svn ci -m" "
114
115# Rename the executable
116branch=exe_rename
117fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
118svn sw $REPOS_URL/branches/dev/Share/$branch
119perl -pi -e 's/hello.exe/hello_world.exe/' script/hello.sh
120svn ci -m" "
121
122# Use a .f90 file as an include file
123branch=change_src_type
124fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
125svn sw $REPOS_URL/branches/dev/Share/$branch
126perl -pi -e 's/hello_constants.inc/hello_constants_inc.f90/g' module/hello_constants.f90
127svn mv module/hello_constants.inc module/hello_constants_inc.f90
128svn ci -m" "
129
130# Add a symbolic link
131branch=symbolic_link
132fcm br -c -n $branch -t SHARE -r 1 --rev-flag NONE --non-interactive $REPOS_URL
133svn sw $REPOS_URL/branches/dev/Share/$branch
134cd subroutine
135ln -s hello_sub.F90 hello_sub2.F90
136svn add hello_sub2.F90
137cd $OLDPWD
138svn ci -m" "
139
140echo "$(date): Finished"
Note: See TracBrowser for help on using the repository browser.