d43649c13cdd162968a37aeb431e3afacd530f0e
rhead
  Wed Apr 25 20:51:00 2012 -0700
Got the validate methods mostly working.  For calls to command-line programs, output is sent to the error log file and 'pass' or 'ERROR' is printed, depending on the return code.  Still need to keep track of whether or not errors occurred for summary file.
diff --git src/utils/qa/qaGbTracks src/utils/qa/qaGbTracks
index c682c16..2caa40a 100755
--- src/utils/qa/qaGbTracks
+++ src/utils/qa/qaGbTracks
@@ -1,55 +1,60 @@
 #!/usr/bin/env python2.7
 import sys
 import argparse
 import logging
 
 from ucscgenomics.qa import qaUtils
 from ucscgenomics.qa.tables import factory
 from ucscgenomics.qa.tables import reporter
 
 def parseCommandLine():
     parser = argparse.ArgumentParser(
         formatter_class=argparse.RawDescriptionHelpFormatter,
         description='Runs the New Track Checklist table tests',
         epilog="""
 The following tests are run:
   genePredCheck
   pslCheck
   checkTblCoords
   positionalTblCheck
   runBits.csh
   check for the existence of table descriptions
   check for shortLabels and longLabels that are too long
   check for underscores in table names
   check for tables missing an index
   (joinerCheck) - not yet implemented
   countPerChrom
         """)
     parser.add_argument('database', help='the database to check')
     parser.add_argument('tableList', help='a file listing the tables to check')
     parser.add_argument('outFileName', help='name to use to write results files')
     parser.add_argument('-v', '--verbose', action='store_true',
                         help='turn on verbose messages in error log')
     return parser.parse_args()
 
 def getTableListFromFile():
     with open(args.tableList, "r") as f:
         raw = f.readlines()
     return [name.strip() for name in raw]
 
 def runTests(reporter, tableList):
     reporter.writeTimestamp()
     reporter.writeBlankLine()
     for table in tableList:
+        reporter.writeLine("===============================================")
+        reporter.writeLine("Tests for " + args.database + "." + table +":\n")
         table = factory.tableQaFactory(args.database, table, reporter)
         table.validate()
+    reporter.writeLine("===============================================")
+    reporter.writeLine("Tests complete:")
+    reporter.writeTimestamp()
 
 args = parseCommandLine()
 tableList = getTableListFromFile()
 qaUtils.checkTablesExist(args.database, tableList)
 fh = open(args.outFileName + ".log", "w")
 reporter = reporter.Reporter(fh)
 runTests(reporter, tableList)
 
 
 fh.close()