Home | History | Annotate | Download | only in bin

Lines Matching refs:job

14 from autotest_lib.client.bin import job, sysinfo, harness
23 """Generic job TestCase class that defines a standard job setUp and
26 job_class = job.base_client_job
30 self.god.stub_with(job.base_client_job, '_get_environ_autodir',
32 self.job = self.job_class.__new__(self.job_class)
33 self.job._job_directory = base_job_unittest.stub_job_directory
48 autodir, clientdir, _ = self.job._find_base_directories()
54 _, _, serverdir = self.job._find_base_directories()
59 """Generic client job mixin used when defining variations on the
60 job.__init__ generic tests."""
71 self.god.stub_function_to_return(job.os, 'mkdir', None)
72 self.god.stub_function_to_return(job.os.path, 'exists', True)
73 self.god.stub_function_to_return(self.job, '_load_state', None)
74 self.god.stub_function_to_return(self.job, 'record', None)
75 self.god.stub_function_to_return(job.shutil, 'copyfile', None)
76 self.god.stub_function_to_return(job.logging_manager,
81 self.god.stub_function_to_return(job.logging_manager,
86 self.god.stub_function_to_return(job.sysinfo, 'sysinfo',
90 self.god.stub_function_to_return(job.harness, 'select', stub_harness())
102 self.god.stub_function_to_return(job.utils, 'drop_caches', None)
104 self.job._job_state = base_job_unittest.stub_job_state
105 self.job.__init__(self.control_file, options)
158 self.god.stub_function(job, 'open')
164 self.god.stub_class(job.local_host, 'LocalHost')
167 self.god.stub_class_method(job.base_client_job,
169 self.god.stub_class_method(job.base_client_job, '_cleanup_results_dir')
171 self.god.stub_with(job.base_job.job_directory, '_ensure_valid',
182 self.god.stub_function(self.job, '_load_state')
187 job.base_client_job._cleanup_debugdir_files.expect_call()
188 job.base_client_job._cleanup_results_dir.expect_call()
190 self.job._load_state.expect_call()
195 self.job,
203 self.god.stub_function(self.job, 'config_get')
204 self.god.stub_function(self.job, 'config_set')
205 self.god.stub_function(self.job, 'record')
220 job.local_host.LocalHost.expect_new(hostname='localhost')
223 self.job.record.expect_call('START', None, None)
230 self.job = job.base_client_job.__new__(job.base_client_job)
248 self.job.__init__(self.control, options)
276 self.job = job.base_client_job.__new__(job.base_client_job)
290 self.god.stub_function(self.job, '_post_record_init')
291 self.god.stub_function(self.job, 'record')
294 self.job._post_record_init.expect_call(
296 self.job.record.expect_call(
297 'ABORT', None, None,'client.bin.job.__init__ failed: %s' %
301 Exception, self.job.__init__, self.control, options,
311 self.job.control_set(control_file)
312 self.assertEquals(self.job.control_get(), os.path.abspath(control_file))
321 harness.select.expect_call(which, self.job,
325 self.job.harness_select(which, harness_args)
341 self.assertRaises(ValueError, self.job.setup_dirs, results_dir, tmp_dir)
349 results_dir1 = os.path.join(self.job.resultdir, 'build')
350 results_dir2 = os.path.join(self.job.resultdir, 'build.2')
351 results_dir3 = os.path.join(self.job.resultdir, 'build.3')
365 self.assertEqual(self.job.setup_dirs(None, tmp_dir),
374 self.god.stub_function(self.job.pkgmgr, 'get_package_name')
375 self.god.stub_function(self.job, "_runtest")
385 outputdir = os.path.join(self.job.resultdir, testname)
386 self.job.pkgmgr.get_package_name.expect_call(
389 self.job.record.expect_call("START", testname, testname,
391 self.job._runtest.expect_call(testname, "", None, (), {}).and_raises(
393 self.job.record.expect_call("ERROR", testname, testname,
395 self.job.record.expect_call("END ERROR", testname, testname)
396 self.job.harness.run_test_complete.expect_call()
400 self.job.run_test(testname)
408 self.god.stub_function(self.job.pkgmgr, 'get_package_name')
409 self.god.stub_function(self.job, "_runtest")
420 outputdir = os.path.join(self.job.resultdir, testname)
421 self.job.pkgmgr.get_package_name.expect_call(
424 self.job.record.expect_call("START", testname, testname,
426 self.job._runtest.expect_call(testname, "", None, (), {}).and_raises(
428 self.job.record.expect_call("ERROR", testname, testname, reason)
429 self.job.record.expect_call("END ERROR", testname, testname)
430 self.job.harness.run_test_complete.expect_call()
434 self.job.run_test(testname)
442 self.job.record.expect_call("ABORT", "sub", "reboot.verify",
444 self.job.record.expect_call("END ABORT", "sub", "reboot",
448 self.job._record_reboot_failure("sub", "reboot.verify", "boot failure",
455 self.god.stub_function(job.partition_lib, "get_partition_list")
463 job.partition_lib.get_partition_list.expect_call(
464 self.job
469 self.job._state.set('client', 'mount_info', mount_info)
470 self.job._state.set('client', 'cpu_count', 8)
481 self.job._check_post_reboot("sub")
491 self.god.stub_function(self.job, "_record_reboot_failure")
492 self.job._record_reboot_failure.expect_call("sub",
498 self.assertRaises(error.JobError, self.job._check_post_reboot, "sub")
509 self.god.stub_function(self.job, "_record_reboot_failure")
510 self.job._record_reboot_failure.expect_call(
516 self.assertRaises(error.JobError, self.job._check_post_reboot, "sub")
528 parsed_args = job.base_client_job._parse_args(t)
537 self.god.stub_function(self.job.pkgmgr, 'get_package_name')
538 self.god.stub_function(self.job, "_runtest")
548 outputdir = os.path.join(self.job.resultdir, testname)
549 self.job.pkgmgr.get_package_name.expect_call(
555 self.job.record.expect_call("START", testname, testname,
557 self.job._runtest.expect_call(testname, "", timeout, (), {})
558 self.job.record.expect_call("GOOD", testname, testname,
560 self.job.record.expect_call("END GOOD", testname, testname)
561 self.job.harness.run_test_complete.expect_call()
565 self.job.run_test(testname, timeout=timeout)
574 match = re.match(job._NAME_PATTERN, line)