Changeset 2498 in /cluster/svnroot


Ignore:
Timestamp:
Jun 25, 2010 8:47:46 AM (10 years ago)
Author:
leemasa
Message:

Added the bccd_tests perl module to hold the tests to be used by the test suite.

Location:
bccd-ng/branches/leemasa-devel/trees/home/bccd/tests
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/leemasa-devel/trees/home/bccd/tests/bccd_test_suite.pl

    r2493 r2498  
    66use File::Path;
    77
     8use bccd_tests;
     9
    810my $testdir = "test";
    911
    10 sub generate_storeOutput{
    11         (my $testname) = @_;
    12         return ">> $testdir/$testname.dat 2>> $testdir/$testname.dat";
    13 }
    14 
    15 sub get_syncdir( ){
    16         (my $tmpoutput) = @_;
    17         open(FILE, "<$tmpoutput") or die "could not open temporary file: $!";
    18         my $tmp = "";
    19         while ($tmp !~ m/\//){
    20                 $tmp = readline FILE;
    21         }
    22         my $startindex = index($tmp,"/",);
    23         my $endindex = index($tmp," ",$startindex);
    24         my $syncdir = substr($tmp,$startindex,$endindex-1);
    25         close FILE;
    26         unlink("tmpdir") or die "Could not delete temporary directory: $!";
    27         return $syncdir;
    28         }
    2912
    3013my $testname;
     
    3619mkdir($testdir) or die "Could not make test directory: $!";
    3720
    38 ### GalaxSee test ###
    39 $testname = "Gal";
    40 $storeOutput = generate_storeOutput($testname);
    41 system("cd ~/Gal                        $storeOutput
    42         make clean                      $storeOutput
    43         make                            $storeOutput
    44         mpirun -np 1 ~/Gal/GalaxSee     $storeOutput
    45         mpirun -np 2 ~/Gal/GalaxSee     $storeOutput");
    46 #system("bccd-syncdir . ~/machines      &> tmpoutput");
    47 
    48 #system("cat tmpoutput $storeOutput");
    49 
    50 #get path to temporary directory
    51 #get_syncdir("tmpoutput");
    52 #unlink "tmpoutput";
    53 
    54 #system("mpirun -machinefile ~/machines\
    55 #       -np 2 $tempDirectory/GalaxSee   $storeOutput");
    56 
    57 ### Life test ###
    58 $testname = "Life";
    59 $storeOutput = generate_storeOutput($testname);
    60 system("cd ~/Life               $storeOutput
    61 make clean                      $storeOutput
    62 make                            $storeOutput
    63 mpirun -np 1 ~/Life/Life        $storeOutput
    64 mpirun -np 2 ~/Life/Life        $storeOutput");
    65 #bccd-syncdir . ~/machines      &> tmpoutput");
    66 #system("cat tmpoutput $storeOutput");
    67 
    68 #get path to temporary directory
    69 #get_syncdir("tmpoutput");
    70 #unlink "tmpoutput";
    71 
    72 #print "$tempDirectory\n";
    73 #system("mpirun -machinefile ~/machines\
    74 #       -np 2 $tempDirectory/Life       $storeOutput");
     21$tests{'Life'}->('Life')
     22$tests{'Gal'}->('Gal')
  • bccd-ng/branches/leemasa-devel/trees/home/bccd/tests/btsup.sh

    r2494 r2498  
    11#!/bin/sh -e
    22if [ $1 = "down" ] ; then
    3         scp leemasa@cs.earlham.edu:~/bccd_test_suite.pl .
     3        scp leemasa@cs.earlham.edu:~/bccd_test_suite.pl leemasa@cs.earlham.edu:~/bccd_tests.pm .
    44else
    55        if [ $1 = "up" ]; then
    6         scp bccd_test_suite.pl leemasa@cs.earlham.edu:~/bccd_test_suite.pl
     6        scp bccd_test_suite.pl bccd_tests.pm leemasa@cs.earlham.edu:~
    77       
    88        else
Note: See TracChangeset for help on using the changeset viewer.