Minor code simplification.
authorIan Romanick <idr@us.ibm.com>
Wed, 26 May 2004 17:12:56 +0000 (17:12 +0000)
committerIan Romanick <idr@us.ibm.com>
Wed, 26 May 2004 17:12:56 +0000 (17:12 +0000)
progs/tests/api_speed.py

index d209676261fa207b1d6c2a20f0c02f74a97be938..4f5483064de51a43a9b29241f700e694593093f2 100755 (executable)
@@ -109,25 +109,22 @@ if __name__ == '__main__':
                show_usage()
 
 
-       result_array = []
-       names = []
-
-
        # If no libraries were specifically named, just run the test against
        # the default system libGL.
 
        if len(trail) == 0:
-               s = make_execution_string( None, iterations )
+               trail.append(None)
+
+
+       result_array = []
+       names = []
+
+       for lib in trail:
+               s = make_execution_string( lib, iterations )
                r = results()
                r.process_file( os.popen(s) )
+               names.append(lib)
                result_array.append(r)
-       else:
-               for lib in trail:
-                       s = make_execution_string( lib, iterations )
-                       r = results()
-                       r.process_file( os.popen(s) )
-                       names.append(lib)
-                       result_array.append(r)
 
 
        # If the test was only run against one library, just show the results