X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=driver.py;h=8c7d1268bb61e9e2fc2a1b5fe82d14f1f5209979;hb=956433aa964937908b070c5f0ce9d8465e3751da;hp=31f49fc68a2dfbc3a541379186d63c0342c63b49;hpb=8b6324900a74e5477cf9df0119de2b981a1b9464;p=apitrace-tests diff --git a/driver.py b/driver.py index 31f49fc..8c7d126 100755 --- a/driver.py +++ b/driver.py @@ -65,8 +65,8 @@ def _get_build_program(program): class TestCase: + api = 'gl' max_frames = None - trace_file = None def __init__(self, name, args, cwd=None, build=None, results = '.'): @@ -111,7 +111,8 @@ class TestCase: apitrace = _get_build_program('apitrace') cmd = [ apitrace, 'trace', - '-o', self.trace_file, + '--api', self.api, + '--output', self.trace_file, '--' ] + cmd if self.max_frames is not None: @@ -256,6 +257,10 @@ def main(): optparser = optparse.OptionParser( usage='\n\t%prog [options] -- program [args] ...', version='%%prog') + optparser.add_option( + '-a', '--api', metavar='API', + type='string', dest='api', default='gl', + help='api to trace') optparser.add_option( '-B', '--build', metavar='PATH', type='string', dest='build', default='..', @@ -284,6 +289,7 @@ def main(): build = options.build, results = options.results, ) + test.api = options.api test.ref_dump = options.ref_dump test.run()