@@ -6,6 +6,7 @@ import os, sys, shutil
import common
from optparse import OptionParser
from autotest_lib.client.bin import job
+from autotest_lib.client.common_lib import global_config
# Use the name of the binary to find the real installation directory
@@ -58,5 +59,9 @@ options, args = parser.parse_args()
if len(args) != 1:
usage()
+drop_caches = global_config.global_config.get_config_value('CLIENT',
+ 'drop_caches',
+ type=bool)
+
# JOB: run the specified job control file.
-job.runjob(os.path.realpath(args[0]), options)
+job.runjob(os.path.realpath(args[0]), drop_caches, options)
@@ -16,6 +16,8 @@ from autotest_lib.client.bin import partition as partition_lib
from autotest_lib.client.common_lib import base_job
from autotest_lib.client.common_lib import error, barrier, log, logging_manager
from autotest_lib.client.common_lib import base_packages, packages
+from autotest_lib.client.common_lib import global_config
+
LAST_BOOT_TAG = object()
NO_DEFAULT = object()
@@ -228,7 +230,10 @@ class base_client_job(base_job.base_job):
"""
Perform the drop caches initialization.
"""
- self.drop_caches_between_iterations = True
+ self.drop_caches_between_iterations = (
+ global_config.global_config.get_config_value('CLIENT',
+ 'drop_caches_between_iterations',
+ type=bool))
self.drop_caches = drop_caches
if self.drop_caches:
logging.debug("Dropping caches")
@@ -1311,7 +1316,7 @@ class disk_usage_monitor:
return decorator
-def runjob(control, options):
+def runjob(control, drop_caches, options):
"""
Run a job using the given control file.
@@ -1339,7 +1344,7 @@ def runjob(control, options):
if options.cont and not os.path.exists(state):
raise error.JobComplete("all done")
- myjob = job(control, options)
+ myjob = job(control=control, drop_caches=drop_caches, options=options)
# Load in the users control file, may do any one of:
# 1) execute in toto