~pieq/checkbox/add-30suspend-1reboot-cycles-support

« back to all changes in this revision

Viewing changes to providers/plainbox-provider-checkbox/bin/pm_test

  • Committer: Pierre Equoy
  • Date: 2015-10-01 07:12:33 UTC
  • Revision ID: pierre.equoy@canonical.com-20151001071233-vndj1d03o7apqtf5
Add support for '30 suspends + 1 reboot' cycle

Add the following jobs:

- power-management/suspend-30-cycles-log-check-with-reboots
- power-management/suspend-30-cycle-log-attach-with-reboots
- power-management/suspend-30-cycles-time-check-with-reboots

Modifies the `pm_test` script to include `sleep_test` output in its logs in
order to easily access the data needed by `sleep_time_check` to compute
average times.

`sleep_time_check` has been updated to take into account more than one
sleep/resume times (the mean value is computed and returned).

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
            sleep_test_path, cycles_count)
164
164
        logging.info('Running suspend/resume cycles')
165
165
        logging.debug('Executing: {0!r}...'.format(command_str))
166
 
        subprocess.check_call(command_str, shell=True)
 
166
        # We call sleep_test script and log its output as it contains
 
167
        # average times we need to compute global average times later.
 
168
        logging.info(subprocess.check_output(command_str,
 
169
            universal_newlines=True, shell=True))
167
170
 
168
171
    def summary(self):
169
172
        """