| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | use File::Copy; |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | $trunk_dir = "c:/projects/cloudy/trunk/tsuite"; |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | $unix_copy_dir = "c:/projects/cloudy/trunk/unix/tsuite"; |
|---|
| 17 | $unix_copy_basedir = "c:/projects/cloudy/trunk/unix"; |
|---|
| 18 | $win_copy_dir = "c:/projects/cloudy/trunk/win/tsuite"; |
|---|
| 19 | $win_copy_basedir = "c:/projects/cloudy/trunk/win"; |
|---|
| 20 | $cluster_copy_dir = "u:/cloudy/trunk/tsuite"; |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | $ftp_last = "u:/pub/gary/bleeding_edge/last"; |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | @subdirs=("auto","slow"); |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | for ($ndir=0; $ndir<2; $ndir++) |
|---|
| 33 | { |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | $dir = "$unix_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 40 | chdir( "$dir" ) or die " could not move to test suite directory \n"; |
|---|
| 41 | print(" moved to tsuite unix target directory, about to delete all files\n"); |
|---|
| 42 | |
|---|
| 43 | unlink <*> ; |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | $dir = "$win_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 47 | chdir( "$dir" ) or die " could not move to test suite directory \n"; |
|---|
| 48 | print(" moved to tsuite win target directory, about to delete all files\n"); |
|---|
| 49 | |
|---|
| 50 | unlink <*> ; |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | $dir = "$cluster_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 54 | chdir( "$dir" ) or die " could not move to cluster target directory \n"; |
|---|
| 55 | print(" moved to cluster tsuite directory, about to delete in files\n"); |
|---|
| 56 | |
|---|
| 57 | unlink <*.in>; |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | |
|---|
| 65 | |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | $dir = "$trunk_dir"."/"."$subdirs[$ndir]"; |
|---|
| 69 | chdir( "$dir" ) or die " could not move to trunk directory \n"; |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | |
|---|
| 74 | while( defined( $input = glob("*.in") ) ) |
|---|
| 75 | { |
|---|
| 76 | print( "$input going to " ); |
|---|
| 77 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 78 | print("$output\n"); |
|---|
| 79 | |
|---|
| 80 | system "dos2unix < $input > $output"; |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | print( "$input going to " ); |
|---|
| 84 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 85 | print("$output\n"); |
|---|
| 86 | |
|---|
| 87 | copy( $input , $output ); |
|---|
| 88 | } |
|---|
| 89 | |
|---|
| 90 | |
|---|
| 91 | while( defined( $input = glob("*.htm") ) ) |
|---|
| 92 | { |
|---|
| 93 | print( "$input going to " ); |
|---|
| 94 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 95 | print("$output\n"); |
|---|
| 96 | |
|---|
| 97 | system "dos2unix < $input > $output"; |
|---|
| 98 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 99 | print("$output\n"); |
|---|
| 100 | |
|---|
| 101 | copy( $input , $output ); |
|---|
| 102 | } |
|---|
| 103 | |
|---|
| 104 | |
|---|
| 105 | while( defined( $input = glob("*.ini") ) ) |
|---|
| 106 | { |
|---|
| 107 | print( "$input going to " ); |
|---|
| 108 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 109 | print("$output\n"); |
|---|
| 110 | |
|---|
| 111 | system "dos2unix < $input > $output"; |
|---|
| 112 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 113 | print("$output\n"); |
|---|
| 114 | |
|---|
| 115 | copy( $input , $output ); |
|---|
| 116 | } |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | while( defined( $input = glob("*.dat") ) ) |
|---|
| 120 | { |
|---|
| 121 | print( "$input going to " ); |
|---|
| 122 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 123 | print("$output\n"); |
|---|
| 124 | |
|---|
| 125 | system "dos2unix < $input > $output"; |
|---|
| 126 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 127 | print("$output\n"); |
|---|
| 128 | |
|---|
| 129 | copy( $input , $output ); |
|---|
| 130 | } |
|---|
| 131 | |
|---|
| 132 | |
|---|
| 133 | copy( "clouds.jpg" , "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."clouds.jpg" ); |
|---|
| 134 | |
|---|
| 135 | copy( "clouds.jpg" , "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."clouds.jpg" ); |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | while( defined( $input = glob("*.pl") ) ) |
|---|
| 139 | { |
|---|
| 140 | print( "$input going to " ); |
|---|
| 141 | $output = "$unix_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 142 | print("$output\n"); |
|---|
| 143 | |
|---|
| 144 | system "dos2unix < $input > $output"; |
|---|
| 145 | $output = "$win_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 146 | print("$output\n"); |
|---|
| 147 | |
|---|
| 148 | copy( $input , $output ); |
|---|
| 149 | } |
|---|
| 150 | |
|---|
| 151 | print("All tsuite files have been copied to pc unix and win subdirs\n"); |
|---|
| 152 | |
|---|
| 153 | |
|---|
| 154 | $dir = "$unix_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 155 | chdir( "$dir" ) or die " could not move to pc unix directory \n"; |
|---|
| 156 | |
|---|
| 157 | |
|---|
| 158 | while( defined( $input = glob("*") ) ) |
|---|
| 159 | { |
|---|
| 160 | print( "$input going to " ); |
|---|
| 161 | $output = "$cluster_copy_dir"."/"."$subdirs[$ndir]"."/"."$input"; |
|---|
| 162 | print("$output\n"); |
|---|
| 163 | |
|---|
| 164 | copy( $input , $output ); |
|---|
| 165 | } |
|---|
| 166 | |
|---|
| 167 | |
|---|
| 168 | |
|---|
| 169 | |
|---|
| 170 | |
|---|
| 171 | |
|---|
| 172 | |
|---|
| 173 | |
|---|
| 174 | $tarfile_basename = "tsuite_"."$subdirs[$ndir]"; |
|---|
| 175 | |
|---|
| 176 | $dir = "$unix_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 177 | chdir( "$dir" ) or die " could not move to pc unix directory \n"; |
|---|
| 178 | print(" moved to unix copy directory\n"); |
|---|
| 179 | |
|---|
| 180 | $tarfile = "$unix_copy_basedir"."/"."$tarfile_basename".".tar"; |
|---|
| 181 | |
|---|
| 182 | if( -e "$tarfile" ) |
|---|
| 183 | { |
|---|
| 184 | unlink("$tarfile" ); |
|---|
| 185 | } |
|---|
| 186 | |
|---|
| 187 | |
|---|
| 188 | |
|---|
| 189 | |
|---|
| 190 | |
|---|
| 191 | system "C:\\u\\mks\\mksnt\\tar_mks.exe -cf $tarfile * "; |
|---|
| 192 | print( "about to gzip $tarfile\n" ); |
|---|
| 193 | |
|---|
| 194 | if( -e "$tarfile".".gz" ) |
|---|
| 195 | { |
|---|
| 196 | unlink("$tarfile".".gz" ); |
|---|
| 197 | } |
|---|
| 198 | system "gzip $tarfile "; |
|---|
| 199 | |
|---|
| 200 | |
|---|
| 201 | copy( "$tarfile".".gz" , $ftp_last ); |
|---|
| 202 | |
|---|
| 203 | |
|---|
| 204 | $dir = "$win_copy_dir"."/"."$subdirs[$ndir]"; |
|---|
| 205 | chdir( "$dir" ) or die " could not move to pc win directory \n"; |
|---|
| 206 | print(" moved to win copy directory\n"); |
|---|
| 207 | |
|---|
| 208 | |
|---|
| 209 | $tarfile = "$win_copy_basedir"."/"."$tarfile_basename".".zip"; |
|---|
| 210 | if( -e "$tarfile" ) |
|---|
| 211 | { |
|---|
| 212 | unlink("$tarfile" ); |
|---|
| 213 | } |
|---|
| 214 | |
|---|
| 215 | |
|---|
| 216 | |
|---|
| 217 | system "wzzip $tarfile "; |
|---|
| 218 | |
|---|
| 219 | |
|---|
| 220 | copy( "$tarfile" , $ftp_last ); |
|---|
| 221 | |
|---|
| 222 | print("\ndone\n"); |
|---|
| 223 | |
|---|
| 224 | } |
|---|