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 @@ -29,27 +29,32 @@ 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()