Before importing the serializer, try to build it. It will all work if you have installed the google protocol buffers compiler, which you can do on Fedora doing:
sudo yum install protobuf-compiler Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> --- tko/job_serializer_unittest.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tko/job_serializer_unittest.py b/tko/job_serializer_unittest.py index 10dae40..20e38cd 100755 --- a/tko/job_serializer_unittest.py +++ b/tko/job_serializer_unittest.py @@ -1,9 +1,9 @@ #!/usr/bin/python -"""Unittests for the JobSerializer class. +""" +Unittests for the JobSerializer class. Mostly test if the serialized object has the expected content. - """ try: @@ -15,6 +15,17 @@ import os import re import tempfile import time +import sys + +# In case the protocol buffer parser is missing, build it. +# In Fedora, you can install the compiler using: +# sudo yum install protobuf-compiler +import commands +cwd = os.getcwd() +module_dir = os.path.dirname(sys.modules[__name__].__file__) +os.chdir(module_dir) +commands.getoutput('make') +os.chdir(cwd) from autotest.tko import tko_pb2 from autotest.tko import job_serializer -- 1.8.1.2 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
