#!/usr/bin/env python2 import os, sys, os.path, commands try: pkgpath = sys.argv[1] except IndexError: pkgpath = ".." dumpValidationFile = 'oaBeamData.validate.dump' # Get a dump of the file status = os.system("oaBeamData_Test.exe >& " + dumpValidationFile) eventDump = commands.getoutput('cat ' + dumpValidationFile) # Look for strings that should or shouldn't be in the file. valid = True # check that test program finished correctly. if eventDump.find('Cannot Find the Spill.') >= 0: print "!!!!!! Could not find spill information; have you downloaded BSD files?." valid = False if not valid: print eventDump print "Failed to finish 805ValidateOABeamData.py validation cleanly." print "" print "FAIL"