source: CCCC/trunk/ceda_cc/c4.py @ 347

Subversion URL: http://proj.badc.rl.ac.uk/svn/exarch/CCCC/trunk/ceda_cc/c4.py@347
Revision 347, 988 bytes checked in by astephen, 5 years ago (diff)

Updated summary.py as follows:

  • renamed class "main" to "LogSummariser?"
  • changed class interactions so "summarise()" method is used to run it
  • added convenience function to wrap initiate class and call "summarise()" method.
  • added comments to allow all FAILED files to be listed in summary
    • this can be added as a command-line switch later.
Line 
1"""c4.py
2##########
3Entry point for command line usage -- see ccinit for usage information.
4"""
5import sys, string
6
7def main_entry():
8  """
9   Wrapper around main() for use with setuptools.
10  """
11  if len(sys.argv) == 1:
12      # Show command-line info and report that you must provide arguments
13      import ccinit
14      print ccinit.__doc__
15      print "\nERROR: Please provide command-line arguments."
16      return
17
18  if sys.argv[1] == '--sum':
19      import summary
20      summary.summariseLogs()
21  elif sys.argv[1] == '-v':
22      from versionConfig import version, versionComment
23      print 'ceda-cc version %s [%s]' % (version,versionComment)
24  elif sys.argv[1] == '--unitTest':
25      print "Starting test suite 1"
26      import unitTestsS1
27      print "Starting test suite 2"
28      import unitTestsS2
29      print "Tests completed"
30  else:
31     from c4_run import main
32     cmdl = string.join( sys.argv )
33     main(printInfo=True, cmdl=cmdl)
34
35if __name__ == '__main__':
36  main_entry()
Note: See TracBrowser for help on using the repository browser.