summaryrefslogtreecommitdiff
path: root/tko
diff options
context:
space:
mode:
authorjamesren <jamesren@592f7852-d20e-0410-864c-8624ca9c26a4>2010-06-15 20:33:22 +0000
committerjamesren <jamesren@592f7852-d20e-0410-864c-8624ca9c26a4>2010-06-15 20:33:22 +0000
commit691cc3f5728f9b8c28e814008f487363669bd04e (patch)
tree8fec61fca64ae363845159eaff43c4e2ec1fd715 /tko
parentd3dbbd3230e1e88c753a73c1972283735658aece (diff)
Adding site-specific hook for exporting data.
Signed-off-by: Darren Kuo <darrenkuo@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@4621 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko')
-rwxr-xr-xtko/parse.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/tko/parse.py b/tko/parse.py
index 6f8bba9f..27d18213 100755
--- a/tko/parse.py
+++ b/tko/parse.py
@@ -164,13 +164,25 @@ def parse_one(db, jobname, path, reparse, mail_on_failure):
from autotest_lib.tko import job_serializer
serializer = job_serializer.JobSerializer()
- serializer.serialize_to_binary(job, os.path.join(path, "job.serialize"))
+ binary_file_name = os.path.join(path, "job.serialize")
+ serializer.serialize_to_binary(job, jobname, binary_file_name)
+
+ if reparse:
+ site_export_file = "autotest_lib.tko.site_export"
+ site_export = utils.import_site_function(__file__,
+ site_export_file,
+ "site_export",
+ _site_export_dummy)
+ site_export(binary_file_name)
+
except ImportError:
tko_utils.dprint("DEBUG: tko_pb2.py doesn't exist. Create by "
"compiling tko/tko.proto.")
db.commit()
+def _site_export_dummy(binary_file_name):
+ pass
def _get_job_subdirs(path):
"""