[PATCH] Track rename of "retrace" to "replay" within apitrace.

Carl Worth cworth at cworth.org
Sat Jan 26 16:22:57 PST 2013


Verifying that everything still passes after the rename.
---
 CMakeLists.txt          |    2 +-
 app_driver.py           |   46 +++++++++++++++++++++++-----------------------
 apps/README.markdown    |    2 +-
 apps/gl/README.markdown |    2 +-
 4 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2dff857..a6ea174 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -108,7 +108,7 @@ add_subdirectory (traces)
 # portable across all platforms. However, these tests all rely on
 # doing image comparisons and the current implementation of the
 # "apitrace dump-images" command relies on direct invocation of the
-# glretrace command.
+# glreplay command.
 #
 # Someday, we should have more unified commands for replaying traces,
 # dumping images, etc. At that point these cli tests should be usable
diff --git a/app_driver.py b/app_driver.py
index 0a372fa..49807df 100755
--- a/app_driver.py
+++ b/app_driver.py
@@ -112,17 +112,17 @@ class AppDriver(Driver):
         'd3d11_1': 'd3d11',
     }
 
-    api_retrace_map = {
-        'gl': 'glretrace',
-        'egl_gl': 'eglretrace',
-        'egl_gles1': 'eglretrace',
-        'egl_gles2': 'eglretrace',
-        'd3d8': 'd3dretrace',
-        'd3d9': 'd3dretrace',
-        'd3d10': 'd3dretrace',
-        'd3d10_1': 'd3dretrace',
-        'd3d11': 'd3dretrace',
-        'd3d11_1': 'd3dretrace',
+    api_replay_map = {
+        'gl': 'glreplay',
+        'egl_gl': 'eglreplay',
+        'egl_gles1': 'eglreplay',
+        'egl_gles2': 'eglreplay',
+        'd3d8': 'd3dreplay',
+        'd3d9': 'd3dreplay',
+        'd3d10': 'd3dreplay',
+        'd3d10_1': 'd3dreplay',
+        'd3d11': 'd3dreplay',
+        'd3d11_1': 'd3dreplay',
     }
 
     def traceApp(self):
@@ -220,7 +220,7 @@ class AppDriver(Driver):
         sys.stdout.flush()
         sys.stderr.write('\n')
 
-        if self.api not in self.api_retrace_map:
+        if self.api not in self.api_replay_map:
             return
 
         for callNo, refImageFileName in images:
@@ -298,16 +298,16 @@ class AppDriver(Driver):
         s = json.dumps(state, sort_keys=True, indent=2)
         open(filename, 'wt').write(s)
 
-    def retrace(self):
-        if self.api not in self.api_retrace_map:
+    def replay(self):
+        if self.api not in self.api_replay_map:
             return
 
         sys.stderr.write('Retracing %s...\n' % (self.trace_file,))
 
-        p = self._retrace()
+        p = self._replay()
         p.wait()
         if p.returncode != 0:
-            fail('retrace failed with code %i' % (p.returncode))
+            fail('replay failed with code %i' % (p.returncode))
 
         sys.stdout.flush()
         sys.stderr.write('\n')
@@ -344,11 +344,11 @@ class AppDriver(Driver):
         else:
             return state
 
-        p = self._retrace(['-D', str(callNo)])
+        p = self._replay(['-D', str(callNo)])
         state = json.load(p.stdout, strict=False)
         p.wait()
         if p.returncode != 0:
-            fail('retrace returned code %i' % (p.returncode))
+            fail('replay returned code %i' % (p.returncode))
 
         self.adjustSrcState(state)
 
@@ -397,10 +397,10 @@ class AppDriver(Driver):
         except KeyError:
             pass
 
-    def _retrace(self, args = None, stdout=subprocess.PIPE):
-        retrace = self.api_retrace_map[self.api]
-        #cmd = [get_build_program(retrace)]
-        cmd = [options.apitrace, 'retrace']
+    def _replay(self, args = None, stdout=subprocess.PIPE):
+        replay = self.api_replay_map[self.api]
+        #cmd = [get_build_program(replay)]
+        cmd = [options.apitrace, 'replay']
         if self.doubleBuffer:
             cmd += ['-db']
         else:
@@ -447,7 +447,7 @@ class AppDriver(Driver):
         self.runApp()
         self.traceApp()
         self.checkTrace()
-        self.retrace()
+        self.replay()
 
         pass_()
 
diff --git a/apps/README.markdown b/apps/README.markdown
index 3820630..067b253 100644
--- a/apps/README.markdown
+++ b/apps/README.markdown
@@ -20,7 +20,7 @@ The actual execution of the test (and parsing of the REF script) is
 performed by the python program in ../app_driver.py. This driver
 program runs the application with the given arguments, performs a
 trace of the application, checks the trace against the reference
-script, and then run a "retrace" of the application (replaying the
+script, and then run a "replay" of the application (replaying the
 commands in the trace).
 
 In addition to a dump of the expected trace content, the reference
diff --git a/apps/gl/README.markdown b/apps/gl/README.markdown
index 1272a7c..1eae094 100644
--- a/apps/gl/README.markdown
+++ b/apps/gl/README.markdown
@@ -5,4 +5,4 @@ demos suite), modified to be non-interactive.
 
 Rather than cover the full breadth of OpenGL functionality, the focus here is
 to cover entrypoints that require special hand-written code to be
-traced/retraced correctly.
+traced/replayed correctly.
-- 
1.7.10.4



More information about the apitrace mailing list