root/branches/newmole/scripts/promote_last_good.pl

Revision 13, 1.6 kB (checked in by gary, 3 years ago)

adjust file properties for ascii and perl files - no source change

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!perl -w
2
3# this script is called by autorun.pl after a clean execution of the test suite,
4# it copies the contents of the "last" ftp dir to the "last_good" dir
5# and also copies the cloudy.exe to cloudy_last_good.exe
6
7# bring in the perl module that includes copy
8use File::Copy;
9
10
11# --------------------------------------------------------------------------
12# this block - set up paths to all targets on various machines
13
14# this is where the original test suite files live on my pc
15$original_tsuite_dir = "c:/projects/cloudy/trunk/tsuite/auto";
16# move to pc unix source dir
17if( !chdir( "$original_tsuite_dir" ) )
18{
19       printf(" could not move to test suite directory \n");
20       exit(1);
21}
22
23# now copy cloudy.exe to cloudy_last_good.exe
24copy( "cloudy.exe" , "cloudy_last_good.exe" );
25
26# now copy all output files to lg files
27while(defined($output= glob("*.out")) )
28{
29       # get basename
30       $output =~ s/.out//gi;
31       copy( "$output".".out" , "$output".".lg" );
32}
33#copy the source and data to same name but lg
34copy( "source.tar" , "source_tar.lg" );
35copy( "data.tar" , "data_tar.lg" );
36
37# this is the ftp site on gradj
38$ftp_last =      "u:/pub/gary/bleeding_edge/last/";
39$ftp_last_good = "u:/pub/gary/bleeding_edge/last_good/";
40
41# move to unix ftp dir
42if( !chdir( "$ftp_last" ) )
43{
44       printf(" could not move to unix ftp directory \n");
45       exit(1);
46}
47
48# this loops over all files in the last ftp directory
49# and copies all files to last_good unix,
50while( defined( $input = glob("*") ) )
51{
52        $output = "$ftp_last_good"."/"."$input";
53        # simply copy the source here
54        copy( $input  , $output );
55}
Note: See TracBrowser for help on using the browser.