Add a WARN message to the status log when a test runs with
profile_only=True but no profilers set up. It's all too easy to make
this mistake (e.g. tweaking a control file set up for profiling runs
to turn off the profilers, but forgetting to remove the profile_only)
and it leads to lots of confusion when the test successfully runs
with zero iterations.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3784 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/common_lib/test.py b/client/common_lib/test.py
index f2ee0a6..a20414b 100644
--- a/client/common_lib/test.py
+++ b/client/common_lib/test.py
@@ -240,6 +240,10 @@
             hook(self)
 
         if profile_only:
+            if not self.job.profilers.present():
+                self.job.record('WARN', None, None, 'No profilers have been '
+                                'added but profile_only is set - nothing '
+                                'will be run')
             self.run_once_profiling(postprocess_profiled_run, *args, **dargs)
         else:
             self.run_once(*args, **dargs)