diff options
author | PMR <pmr@pmr-lander> | 2017-07-20 16:00:45 +0000 |
---|---|---|
committer | PMR <pmr@pmr-lander> | 2017-07-20 16:00:45 +0000 |
commit | 7634c9218861e6fc22400874a3b8e1c276589e50 (patch) | |
tree | 2a1cffba6bd8b4e98cc2517211925d1e5ac6a352 | |
parent | 3b901fcd7a7bbfcccce6248d0ef941b9629edda0 (diff) | |
parent | e61c7bc2a13b13d9fbb9d63071c08dc6fcb20476 (diff) |
Merge #327789 from ~sylvain-pineau/plainbox-provider-checkbox:fix-1705415
-rwxr-xr-x | bin/pm_test | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/bin/pm_test b/bin/pm_test index 7eff96c..ce50a51 100755 --- a/bin/pm_test +++ b/bin/pm_test @@ -137,16 +137,18 @@ class PowerManagementOperation(object): """Run suspend and resume cycles.""" if cycles_count < 1: return + script_path = '' if fwts: - script_name = 'fwts_test' - command_tpl = '{} -s s3 --s3-device-check --s3-sleep-delay=30 --s3-multiple={}' + script_path = 'checkbox-support-fwts_test' + command_tpl = '-s s3 --s3-device-check --s3-sleep-delay=30 --s3-multiple={}' if self.args.log_dir: - command_tpl += ' --log={}/fwts.log'.format(self.args.log_dir) + command_tpl = '--log={}/fwts.log '.format(self.args.log_dir) + command_tpl + command_tpl = '{} ' + command_tpl else: script_name = 'sleep_test' command_tpl = '{} -s mem -p -i {} -w 10' - script_path = os.path.join( - os.path.dirname(os.path.realpath(__file__)), script_name) + script_path = os.path.join( + os.path.dirname(os.path.realpath(__file__)), script_name) command_str = command_tpl.format(script_path, cycles_count) logging.info('Running suspend/resume cycles') logging.debug('Executing: {0!r}...'.format(command_str)) @@ -157,7 +159,7 @@ class PowerManagementOperation(object): universal_newlines=True, shell=True)) except subprocess.CalledProcessError as e: logging.error('Error while running {0}:'.format(e.cmd)) - logging.exception(e.output) + logging.error(e.output) def summary(self): """ @@ -709,9 +711,9 @@ class LoggingConfiguration(object): logger = logging.getLogger() logger.setLevel(logging.DEBUG) - # Log to sys.stderr using log level passed through command line + # Log to sys.stdout using log level passed through command line if log_level != logging.NOTSET: - log_handler = logging.StreamHandler() + log_handler = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('%(levelname)-8s %(message)s') log_handler.setFormatter(formatter) log_handler.setLevel(log_level) |