Lines Matching refs:job
12 from autotest_lib.client.bin import job, sysinfo, harness
24 job_class = job.base_client_job
28 self.god.stub_with(job.base_client_job, '_get_environ_autodir',
30 self.job = self.job_class.__new__(self.job_class)
31 self.job._job_directory = base_job_unittest.stub_job_directory
43 autodir, clientdir, _ = self.job._find_base_directories()
49 _, _, serverdir = self.job._find_base_directories()
65 self.god.stub_function_to_return(job.os, 'mkdir', None)
66 self.god.stub_function_to_return(job.os.path, 'exists', True)
67 self.god.stub_function_to_return(self.job, '_load_state', None)
68 self.god.stub_function_to_return(self.job, 'record', None)
69 self.god.stub_function_to_return(job.shutil, 'copyfile', None)
70 self.god.stub_function_to_return(job.logging_manager,
75 self.god.stub_function_to_return(job.logging_manager,
80 self.god.stub_function_to_return(job.sysinfo, 'sysinfo',
84 self.god.stub_function_to_return(job.harness, 'select', stub_harness())
96 self.god.stub_function_to_return(job.utils, 'drop_caches', None)
98 self.job._job_state = base_job_unittest.stub_job_state
99 self.job.__init__('/control', options)
152 self.god.stub_function(job, 'open')
158 self.god.stub_class(job.local_host, 'LocalHost')
161 self.god.stub_class_method(job.base_client_job,
163 self.god.stub_class_method(job.base_client_job, '_cleanup_results_dir')
165 self.god.stub_with(job.base_job.job_directory, '_ensure_valid',
175 self.god.stub_function(self.job, '_load_state')
180 job.base_client_job._cleanup_debugdir_files.expect_call()
181 job.base_client_job._cleanup_results_dir.expect_call()
183 self.job._load_state.expect_call()
188 self.job,
196 self.god.stub_function(self.job, 'config_get')
197 self.god.stub_function(self.job, 'config_set')
198 self.god.stub_function(self.job, 'record')
213 job.local_host.LocalHost.expect_new(hostname='localhost')
216 self.job.record.expect_call('START', None, None)
223 self.job = job.base_client_job.__new__(job.base_client_job)
241 self.job.__init__(self.control, options)
269 self.job = job.base_client_job.__new__(job.base_client_job)
283 self.god.stub_function(self.job, '_post_record_init')
284 self.god.stub_function(self.job, 'record')
287 self.job._post_record_init.expect_call(
289 self.job.record.expect_call(
294 Exception, self.job.__init__, self.control, options,
304 self.job.control_set(control_file)
305 self.assertEquals(self.job.control_get(), os.path.abspath(control_file))
314 harness.select.expect_call(which, self.job,
318 self.job.harness_select(which, harness_args)
334 self.assertRaises(ValueError, self.job.setup_dirs, results_dir, tmp_dir)
342 results_dir1 = os.path.join(self.job.resultdir, 'build')
343 results_dir2 = os.path.join(self.job.resultdir, 'build.2')
344 results_dir3 = os.path.join(self.job.resultdir, 'build.3')
358 self.assertEqual(self.job.setup_dirs(None, tmp_dir),
367 self.god.stub_function(self.job.pkgmgr, 'get_package_name')
368 self.god.stub_function(self.job, "_runtest")
378 outputdir = os.path.join(self.job.resultdir, testname)
379 self.job.pkgmgr.get_package_name.expect_call(
382 self.job.record.expect_call("START", testname, testname,
384 self.job._runtest.expect_call(testname, "", None, (), {}).and_raises(
386 self.job.record.expect_call("ERROR", testname, testname,
388 self.job.record.expect_call("END ERROR", testname, testname)
389 self.job.harness.run_test_complete.expect_call()
393 self.job.run_test(testname)
401 self.god.stub_function(self.job.pkgmgr, 'get_package_name')
402 self.god.stub_function(self.job, "_runtest")
413 outputdir = os.path.join(self.job.resultdir, testname)
414 self.job.pkgmgr.get_package_name.expect_call(
417 self.job.record.expect_call("START", testname, testname,
419 self.job._runtest.expect_call(testname, "", None, (), {}).and_raises(
421 self.job.record.expect_call("ERROR", testname, testname, reason)
422 self.job.record.expect_call("END ERROR", testname, testname)
423 self.job.harness.run_test_complete.expect_call()
427 self.job.run_test(testname)
435 self.job.record.expect_call("ABORT", "sub", "reboot.verify",
437 self.job.record.expect_call("END ABORT", "sub", "reboot",
441 self.job._record_reboot_failure("sub", "reboot.verify", "boot failure",
448 self.god.stub_function(job.partition_lib, "get_partition_list")
456 job.partition_lib.get_partition_list.expect_call(
457 self.job, exclude_swap=False).and_return(part_list)
462 self.job._state.set('client', 'mount_info', mount_info)
463 self.job._state.set('client', 'cpu_count', 8)
474 self.job._check_post_reboot("sub")
484 self.god.stub_function(self.job, "_record_reboot_failure")
485 self.job._record_reboot_failure.expect_call("sub",
491 self.assertRaises(error.JobError, self.job._check_post_reboot, "sub")
502 self.god.stub_function(self.job, "_record_reboot_failure")
503 self.job._record_reboot_failure.expect_call(
509 self.assertRaises(error.JobError, self.job._check_post_reboot, "sub")
521 parsed_args = job.base_client_job._parse_args(t)
530 self.god.stub_function(self.job.pkgmgr, 'get_package_name')
531 self.god.stub_function(self.job, "_runtest")
541 outputdir = os.path.join(self.job.resultdir, testname)
542 self.job.pkgmgr.get_package_name.expect_call(
548 self.job.record.expect_call("START", testname, testname,
550 self.job._runtest.expect_call(testname, "", timeout, (), {})
551 self.job.record.expect_call("GOOD", testname, testname,
553 self.job.record.expect_call("END GOOD", testname, testname)
554 self.job.harness.run_test_complete.expect_call()
558 self.job.run_test(testname, timeout=timeout)