]> git.cworth.org Git - apitrace-tests/blobdiff - driver.py
Specify the api to trace.
[apitrace-tests] / driver.py
index 31f49fc68a2dfbc3a541379186d63c0342c63b49..8c7d1268bb61e9e2fc2a1b5fe82d14f1f5209979 100755 (executable)
--- 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()