Changeset 2934


Ignore:
Timestamp:
Aug 14, 2010 6:38:01 PM (9 years ago)
Author:
wehart
Message:

Merged revisions 2732-2933 via svnmerge from
https://software.sandia.gov/svn/public/coopr/coopr.misc/trunk

........

r2759 | wehart | 2010-07-02 07:52:40 -0600 (Fri, 02 Jul 2010) | 2 lines


Update due to changes in pyutilib.virtualenv 1.5

........

r2910 | wehart | 2010-08-06 16:50:37 -0600 (Fri, 06 Aug 2010) | 3 lines


Adding --cat and -v arguments, so this script's testing behavior is analogous to
test.pyutilib.

........

r2924 | wehart | 2010-08-13 19:15:34 -0600 (Fri, 13 Aug 2010) | 3 lines


Misc change to ensure that the test results file
is TEST-coopr.xml

........

Location:
coopr.misc/stable/2.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • coopr.misc/stable/2.4

  • coopr.misc/stable/2.4/coopr/misc/runtests.py

    r2576 r2934  
    2222        default=None,
    2323        help='Top-level source directory where the tests are applied.')
     24    parser.add_option('--cat','--category',
     25        action='append',
     26        dest='cats',
     27        default=[],
     28        help='Specify test categories.')
     29    parser.add_option('-v','--verbose',
     30        action='store_true',
     31        dest='verbose',
     32        default=False,
     33        help='Verbose output')
    2434
    25     options, args = parser.parse_args(sys.argv)
     35    _options, args = parser.parse_args(sys.argv)
    2636
    27     if options.dir is None:
     37    if _options.dir is None:
    2838        os.chdir( os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) )
    2939    else:
    30         os.chdir( options.dir )
     40        os.chdir( _options.dir )
    3141
    3242    print "Running tests in directory",os.getcwd()
     43    if len(_options.cats) > 0:
     44        os.environ['PYUTILIB_UNITTEST_CATEGORIES'] = ",".join(_options.cats)
     45        print " ... for test categories: "+ os.environ['PYUTILIB_UNITTEST_CATEGORIES']
    3346    options=[]
     47    if _options.verbose:
     48        options.append('-v')
    3449    if len(args) == 1:
    3550        dirs=['coopr']
     
    4560        if len(dirs) == 0:
    4661            dirs = ['coopr']
    47     pyutilib.dev.runtests.run(['runtests']+options+['-p','coopr']+dirs)
     62    pyutilib.dev.runtests.run('coopr', ['runtests']+options+['-p','coopr']+dirs)
    4863
  • coopr.misc/stable/2.4/util/coopr_install

    r2732 r2934  
    55"""
    66
    7 virtualenv_version = "1.4.8"
     7virtualenv_version = "1.4.9"
    88
    99import sys
     
    26032603#
    26042604
    2605 import time
    26062605import commands
    26072606import re
     
    28332832
    28342833    def guess_versions(self, offline=False):
    2835         if offline:
    2836             self.release = self.config.root
    2837             if self.release is None:
    2838                 self.release = self.name
    2839             self.stable = None
    2840             self.trunk = None
    2841             return
    28422834        if not self.config.root is None:
    28432835            if using_subversion:
     
    33413333        if len(args) == 0:
    33423334            args.append(self.abshome_dir)
    3343         if options.update or options.offline:
     3335        #
     3336        # Parse config files
     3337        #
     3338        if options.update:
    33443339            self.config=None
    33453340            options.config_files.append( join(self.abshome_dir, 'admin', 'config.ini') )
    3346         #
    3347         # If applying preinstall, then only do subversion exports
    3348         #
    3349         if options.preinstall:
    3350             Repository.svn_get='export'
    3351 
    3352     def read_config_files(self, options):
    3353         #
    3354         # Parse config files
    3355         #
    33563341        if not self.config is None and (len(options.config_files) == 0 or options.keep_config):
    33573342            fp = StringIO.StringIO(self.config)
     
    33713356        print " END - Configuration summary"
    33723357        print "-----------------------------------------------------------------"
     3358        #
     3359        # If applying preinstall, then only do subversion exports
     3360        #
     3361        if options.preinstall:
     3362            Repository.svn_get='export'
    33733363
    33743364    def get_homedir(self, options, args):
     
    33953385
    33963386    def setup_installer(self, options):
    3397         if options.verbose:
    3398             stime = time.time()
    33993387        if options.preinstall:
    34003388            print "Creating preinstall zip file in '%s'" % self.home_dir
     
    34613449            unzip_file(file, dir=self.abshome_dir)
    34623450
    3463         #
    3464         # Read config files now
    3465         #
    3466         self.read_config_files(options)
    3467         #
    3468         # Setup packages for installation
    3469         #
    34703451        if options.preinstall or not options.offline:
    34713452            #self.get_packages(options)
     
    34803461            for pkg in self.sw_packages:
    34813462                pkg.guess_versions(True)
    3482         if options.verbose:
    3483             ftime = time.time()
    3484             print "Timing for 'setup_installer' - %f sec" % (ftime-stime)
    34853463
    34863464    def get_packages(self, options):
    3487         if options.verbose:
    3488             stime = time.time()
    34893465        #
    34903466        # Setup the 'admin' directory
     
    35323508        #
    35333509        for pkg in self.sw_packages:
    3534             if options.verbose:
    3535                 pkg_stime = time.time()
    35363510            pkg.guess_versions(False)
    35373511            if not pkg.install:
     
    35513525                if not options.update:
    35523526                    pkg.install_release(dir=tmp, install=False, preinstall=options.preinstall, offline=options.offline)
    3553             if options.verbose:
    3554                 pkg_ftime = time.time()
    3555                 print "Timing to install package %s - %f sec" % (str(pkg.config.name),pkg_ftime-pkg_stime)
    35563527        if options.update or not os.path.exists(join(self.abshome_dir,'doc')):
    35573528            self.install_auxdirs(options)
     
    35723543            zip_file(self.default_dirname+'.zip', ['.'])
    35733544            sys.exit(0)
    3574         if options.verbose:
    3575             ftime = time.time()
    3576             print "Timing for 'get_packages' - %f sec" % (ftime-stime)
    35773545
    35783546    def get_other_packages(self, options):
     
    35843552       
    35853553    def install_packages(self, options):
    3586         if options.verbose:
    3587             stime = time.time()
    35883554        #
    35893555        # Set the bin directory
     
    36083574        #
    36093575        for pkg in self.sw_packages:
    3610             if options.verbose:
    3611                 pkg_stime = time.time()
    36123576            if not pkg.install:
    36133577                pkg.find_pkgroot(trunk=options.trunk, stable=options.stable, release=not (options.trunk or options.stable))
     
    36323596                else:
    36333597                    pkg.install_release(dir=srcdir, preinstall=options.preinstall, offline=options.offline)
    3634             if options.verbose:
    3635                 pkg_ftime = time.time()
    3636                 print "Timing to install package %s - %f sec" % (str(pkg.config.name),pkg_ftime-pkg_stime)
    36373598        #
    36383599        # Copy the <env>/Scripts/* files into <env>/bin
     
    36553616        print ""
    36563617        print "Finished installation in '%s'" % self.home_dir
    3657         #
    3658         if options.verbose:
    3659             ftime = time.time()
    3660             print "Timing for 'install_packages' - %f sec" % (ftime-stime)
    36613618
    36623619    def localize_cmd_files(self, dir, force_localization=False):
Note: See TracChangeset for help on using the changeset viewer.