Change the name of the magic JOB entry in the status log parsing to
CLIENT_JOB, since that's what it actually corresponds to.

Risk: Low
Visibility: Changes what will show up in the tko results (again).

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1826 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/tko/migrations/011_rename_JOB_to_CLIENT_JOB.py b/tko/migrations/011_rename_JOB_to_CLIENT_JOB.py
new file mode 100644
index 0000000..a628d10
--- /dev/null
+++ b/tko/migrations/011_rename_JOB_to_CLIENT_JOB.py
@@ -0,0 +1,11 @@
+JOB_TO_CLIENT_JOB = """UPDATE tests SET test='CLIENT_JOB' WHERE test='JOB';"""
+
+CLIENT_JOB_TO_JOB = """UPDATE tests SET test='JOB' WHERE test='CLIENT_JOB';"""
+
+
+def migrate_up(manager):
+    manager.execute_script(JOB_TO_CLIENT_JOB)
+
+
+def migrate_down(manager):
+    manager.execute_script(CLIENT_JOB_TO_JOB)
diff --git a/tko/parsers/version_0.py b/tko/parsers/version_0.py
index 6b200fb..8a4f37f 100644
--- a/tko/parsers/version_0.py
+++ b/tko/parsers/version_0.py
@@ -307,12 +307,12 @@
                 tko_utils.dprint("reboot group, ignoring")
                 continue
 
-            # convert job-level ABORTs into a 'JOB' test, and
+            # convert job-level ABORTs into a 'CLIENT_JOB' test, and
             # ignore other job-level events
             if line.testname is None:
                 if (line.status == "ABORT" and
                     line.type != "END"):
-                    line.testname = "JOB"
+                    line.testname = "CLIENT_JOB"
                 else:
                     tko_utils.dprint("job level event, "
                                     "ignoring")
diff --git a/tko/parsers/version_1.py b/tko/parsers/version_1.py
index 7aef6f2..7138a65 100644
--- a/tko/parsers/version_1.py
+++ b/tko/parsers/version_1.py
@@ -195,9 +195,9 @@
                 # if there was no testname, just use the subdir
                 if line.testname is None:
                     line.testname = line.subdir
-                # if there was no testname or subdir, use 'JOB'
+                # if there was no testname or subdir, use 'CLIENT_JOB'
                 if line.testname is None:
-                    line.testname = "JOB.%d" % job_count
+                    line.testname = "CLIENT_JOB.%d" % job_count
                     job_count += 1
                     if not status_lib.is_worse_than_or_equal_to(
                         current_status, "ABORT"):