When running commands via utils.run, make sure we set the duration in the CmdResult when the command completes.
Signed-off-by: John Admanski <[email protected]> --- autotest/client/common_lib/utils.py 2010-06-08 17:04:36.000000000 -0700 +++ autotest/client/common_lib/utils.py 2010-06-09 14:07:19.000000000 -0700 @@ -563,6 +563,7 @@ bg_job.result.exit_status = bg_job.sp.poll() if bg_job.result.exit_status is not None: # process exited, remove its stdout/stdin from the select set + bg_job.result.duration = time.time() - start_time read_list.remove(bg_job.sp.stdout) read_list.remove(bg_job.sp.stderr) del reverse_dict[bg_job.sp.stdout] @@ -585,6 +586,7 @@ bg_job.command) nuke_subprocess(bg_job.sp) bg_job.result.exit_status = bg_job.sp.poll() + bg_job.result.duration = time.time() - start_time return True _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
