• Home
  • Raw
  • Download

Lines Matching full:job

16 from autotest_lib.client.bin import job, sysinfo, harness
25 """Generic job TestCase class that defines a standard job setUp and
28 job_class = job.base_client_job
32 self.god.stub_with(job.base_client_job, '_get_environ_autodir',
34 self.job = self.job_class.__new__(self.job_class)
35 self.job._job_directory = base_job_unittest.stub_job_directory
50 autodir, clientdir, _ = self.job._find_base_directories()
56 _, _, serverdir = self.job._find_base_directories()
61 """Generic client job mixin used when defining variations on the
62 job.__init__ generic tests."""
73 self.god.stub_function_to_return(job.os, 'mkdir', None)
74 self.god.stub_function_to_return(job.os.path, 'exists', True)
75 self.god.stub_function_to_return(self.job, '_load_state', None)
76 self.god.stub_function_to_return(self.job, 'record', None)
77 self.god.stub_function_to_return(job.shutil, 'copyfile', None)
78 self.god.stub_function_to_return(job.logging_manager,
83 self.god.stub_function_to_return(job.logging_manager,
88 self.god.stub_function_to_return(job.sysinfo, 'sysinfo',
92 self.god.stub_function_to_return(job.harness, 'select', stub_harness())
104 self.god.stub_function_to_return(job.utils, 'drop_caches', None)
106 self.job._job_state = base_job_unittest.stub_job_state
107 self.job.__init__(self.control_file, options)
160 self.god.stub_function(job, 'open')
166 self.god.stub_class(job.local_host, 'LocalHost')
169 self.god.stub_class_method(job.base_client_job,
171 self.god.stub_class_method(job.base_client_job, '_cleanup_results_dir')
173 self.god.stub_with(job.base_job.job_directory, '_ensure_valid',
184 self.god.stub_function(self.job, '_load_state')
189 job.base_client_job._cleanup_debugdir_files.expect_call()
190 job.base_client_job._cleanup_results_dir.expect_call()
192 self.job._load_state.expect_call()
197 self.job,
205 self.god.stub_function(self.job, 'config_get')
206 self.god.stub_function(self.job, 'config_set')
207 self.god.stub_function(self.job, 'record')
222 job.local_host.LocalHost.expect_new(hostname='localhost')
225 self.job.record.expect_call('START', None, None)
232 self.job = job.base_client_job.__new__(job.base_client_job)
250 self.job.__init__(self.control, options)
278 self.job = job.base_client_job.__new__(job.base_client_job)
292 self.god.stub_function(self.job, '_post_record_init')
293 self.god.stub_function(self.job, 'record')
296 self.job._post_record_init.expect_call(
298 self.job.record.expect_call(
299 'ABORT', None, None,'client.bin.job.__init__ failed: %s' %
303 Exception, self.job.__init__, self.control, options,
313 self.job.control_set(control_file)
314 self.assertEquals(self.job.control_get(), os.path.abspath(control_file))
323 harness.select.expect_call(which, self.job,
327 self.job.harness_select(which, harness_args)
343 self.assertRaises(ValueError, self.job.setup_dirs, results_dir, tmp_dir)
351 results_dir1 = os.path.join(self.job.resultdir, 'build')
352 results_dir2 = os.path.join(self.job.resultdir, 'build.2')
353 results_dir3 = os.path.join(self.job.resultdir, 'build.3')
367 self.assertEqual(self.job.setup_dirs(None, tmp_dir),
376 self.god.stub_function(self.job.pkgmgr, 'get_package_name')
377 self.god.stub_function(self.job, "_runtest")
387 outputdir = os.path.join(self.job.resultdir, testname)
388 self.job.pkgmgr.get_package_name.expect_call(
391 self.job.record.expect_call("START", testname, testname,
393 self.job._runtest.expect_call(testname, "", None, (), {}).and_raises(
395 self.job.record.expect_call("ERROR", testname, testname,
397 self.job.record.expect_call("END ERROR", testname, testname)
398 self.job.harness.run_test_complete.expect_call()
402 self.job.run_test(testname)
410 self.god.stub_function(self.job.pkgmgr, 'get_package_name')
411 self.god.stub_function(self.job, "_runtest")
422 outputdir = os.path.join(self.job.resultdir, testname)
423 self.job.pkgmgr.get_package_name.expect_call(
426 self.job.record.expect_call("START", testname, testname,
428 self.job._runtest.expect_call(testname, "", None, (), {}).and_raises(
430 self.job.record.expect_call("ERROR", testname, testname, reason)
431 self.job.record.expect_call("END ERROR", testname, testname)
432 self.job.harness.run_test_complete.expect_call()
436 self.job.run_test(testname)
444 self.job.record.expect_call("ABORT", "sub", "reboot.verify",
446 self.job.record.expect_call("END ABORT", "sub", "reboot",
450 self.job._record_reboot_failure("sub", "reboot.verify", "boot failure",
457 self.god.stub_function(job.partition_lib, "get_partition_list")
465 job.partition_lib.get_partition_list.expect_call(
466 self.job, exclude_swap=False).and_return(part_list)
471 self.job._state.set('client', 'mount_info', mount_info)
472 self.job._state.set('client', 'cpu_count', 8)
483 self.job._check_post_reboot("sub")
493 self.god.stub_function(self.job, "_record_reboot_failure")
494 self.job._record_reboot_failure.expect_call("sub",
500 self.assertRaises(error.JobError, self.job._check_post_reboot, "sub")
511 self.god.stub_function(self.job, "_record_reboot_failure")
512 self.job._record_reboot_failure.expect_call(
518 self.assertRaises(error.JobError, self.job._check_post_reboot, "sub")
530 parsed_args = job.base_client_job._parse_args(t)
539 self.god.stub_function(self.job.pkgmgr, 'get_package_name')
540 self.god.stub_function(self.job, "_runtest")
550 outputdir = os.path.join(self.job.resultdir, testname)
551 self.job.pkgmgr.get_package_name.expect_call(
557 self.job.record.expect_call("START", testname, testname,
559 self.job._runtest.expect_call(testname, "", timeout, (), {})
560 self.job.record.expect_call("GOOD", testname, testname,
562 self.job.record.expect_call("END GOOD", testname, testname)
563 self.job.harness.run_test_complete.expect_call()
567 self.job.run_test(testname, timeout=timeout)
576 match = re.match(job._NAME_PATTERN, line)