Changeset 1848 for TI03-DataExtractor


Ignore:
Timestamp:
08/12/06 14:49:47 (13 years ago)
Author:
spascoe
Message:

Script hook into the test_suite.

Location:
TI03-DataExtractor/branches/repackaging/server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI03-DataExtractor/branches/repackaging/server/ndg/dx/server/MakeConfig.py

    r1845 r1848  
    2525    # Set NDG_HOME to be picked up by ndg.utils.config 
    2626    os.environ['NDG_HOME'] = test_home 
     27 
     28    # Wipe clean self.test_home 
     29    if os.path.exists(test_home): 
     30        shutil.rmtree(test_home) 
     31    os.mkdir(test_home) 
    2732     
    2833    # At this point it is safe to import the configuration. 
  • TI03-DataExtractor/branches/repackaging/server/ndg/dx/server/test/__init__.py

    r1844 r1848  
    3232test_suite = unittest.TestSuite() 
    3333test_suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(TestCase)) 
     34 
     35def main(args=None): 
     36    """Script entry point that runs test_case. 
     37    """ 
     38    if not args: 
     39        args = sys.argv[1:] 
     40 
     41    if args: 
     42        (test_home,) = args 
     43    else: 
     44        test_home = './test_home' 
     45 
     46    from ndg.dx.server.MakeConfig import makeTestHome 
     47    makeTestHome(test_home) 
     48         
     49    tr = unittest.TextTestRunner() 
     50    tr.run(test_suite) 
     51 
     52if __name__ == '__main__': 
     53    main() 
  • TI03-DataExtractor/branches/repackaging/server/setup.py

    r1845 r1848  
    3333        from ndg.dx.server.MakeConfig import makeTestHome 
    3434 
    35         # Wipe clean self.test_home 
    36         if os.path.exists(self.test_home): 
    37             shutil.rmtree(self.test_home) 
    38         os.mkdir(self.test_home) 
    39  
    4035        makeTestHome(self.test_home, self.test_conf) 
    4136 
     
    7065    removeDataset = ndg.dx.server.scripts.removeDataset:main 
    7166    showSession = ndg.dx.server.scripts.showSession:main 
     67 
     68    testDxServer = ndg.dx.server.test:main 
    7269    ''', 
    7370 
Note: See TracChangeset for help on using the changeset viewer.