]> git.cworth.org Git - apitrace-tests/blobdiff - base_driver.py
Specify rendertarget view descriptions.
[apitrace-tests] / base_driver.py
index 51032bdab51cc9026a2990d20074c4fc23a72de8..1971fce5a88d616608c918fd16b6152ceadd0673 100644 (file)
@@ -107,6 +107,9 @@ def get_build_program(program):
 
 
 def get_scripts_path():
+    if options.apitrace_source:
+        return os.path.join(options.apitrace_source, 'scripts')
+
     bin_path = get_bin_path()
 
     try_paths = [
@@ -124,8 +127,10 @@ def get_scripts_path():
     sys.exit(1)
 
 
-class Main:
-    global options
+class Driver:
+
+    def __init__(self):
+        pass
 
     def createOptParser(self):
         default_apitrace = 'apitrace'
@@ -145,6 +150,10 @@ class Main:
             '--apitrace', metavar='PROGRAM',
             type='string', dest='apitrace', default=default_apitrace,
             help='path to apitrace executable')
+        optparser.add_option(
+            '--apitrace-source', metavar='PATH',
+            type='string', dest='apitrace_source',
+            help='path to apitrace source tree')
         optparser.add_option(
             '-C', '--directory', metavar='PATH',
             type='string', dest='cwd', default=None,
@@ -164,8 +173,11 @@ class Main:
 
         sys.path.insert(0, get_scripts_path())
 
+        self.options = options
+        self.args = args
+
         return options, args
 
-    def main(self):
+    def run(self):
         raise NotImplementedError