1import os 2from autotest_lib.client.bin import test 3from autotest_lib.client.common_lib import utils 4 5 6class synctest(test.test): 7 version = 1 8 preserve_srcdir = True 9 10 def initialize(self): 11 self.job.require_gcc() 12 13 14 def setup(self): 15 os.chdir(self.srcdir) 16 utils.make() 17 18 19 def run_once(self, len, loop, testdir=None): 20 args = len + ' ' + loop 21 output = os.path.join(self.srcdir, 'synctest ') 22 if testdir: 23 os.chdir(testdir) 24 utils.system(output + args) 25