Merge lp:~sylvain-pineau/checkbox/display_report_save_path into lp:checkbox

Proposed by Sylvain Pineau
Status: Merged
Approved by: Paul Larson
Approved revision: 4446
Merged at revision: 4447
Proposed branch: lp:~sylvain-pineau/checkbox/display_report_save_path
Merge into: lp:checkbox
Diff against target: 35 lines (+9/-7)
1 file modified
checkbox-ng/launchers/checkbox-cli (+9/-7)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/display_report_save_path
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+300781@code.launchpad.net

Description of the change

Few lines added to checkbox-cli to display where final reports will be saved to.
Stress tests on snappy for example ends without any UI to know where the reports are.

Tested with a snappy provider locally: http://pastebin.ubuntu.com/20318574/

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

Cool, very useful! +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'checkbox-ng/launchers/checkbox-cli'
--- checkbox-ng/launchers/checkbox-cli 2016-07-21 08:51:36 +0000
+++ checkbox-ng/launchers/checkbox-cli 2016-07-21 15:31:14 +0000
@@ -224,6 +224,12 @@
224 if not self._maybe_resume_session():224 if not self._maybe_resume_session():
225 self._start_new_session()225 self._start_new_session()
226 self._pick_jobs_to_run()226 self._pick_jobs_to_run()
227 self.base_dir = os.path.join(
228 os.getenv(
229 'XDG_DATA_HOME', os.path.expanduser("~/.local/share/")),
230 "checkbox-ng")
231 if 'submission_files' in self.launcher.stock_reports:
232 print("Reports will be saved to: {}".format(self.base_dir))
227 self._run_jobs(self.ctx.sa.get_dynamic_todo_list())233 self._run_jobs(self.ctx.sa.get_dynamic_todo_list())
228 if self.is_interactive:234 if self.is_interactive:
229 while True:235 while True:
@@ -684,15 +690,11 @@
684 # issues when copying files.690 # issues when copying files.
685 isoformat = "%Y-%m-%dT%H.%M.%S.%f"691 isoformat = "%Y-%m-%dT%H.%M.%S.%f"
686 timestamp = datetime.datetime.utcnow().strftime(isoformat)692 timestamp = datetime.datetime.utcnow().strftime(isoformat)
687 base_dir = os.path.join(693 if not os.path.exists(self.base_dir):
688 os.getenv(694 os.makedirs(self.base_dir)
689 'XDG_DATA_HOME', os.path.expanduser("~/.local/share/")),
690 "checkbox-ng")
691 if not os.path.exists(base_dir):
692 os.makedirs(base_dir)
693 for exporter, file_ext in [('hexr', '.xml'), ('html', '.html'),695 for exporter, file_ext in [('hexr', '.xml'), ('html', '.html'),
694 ('xlsx', '.xlsx'), ('tar', '.tar.xz')]:696 ('xlsx', '.xlsx'), ('tar', '.tar.xz')]:
695 path = os.path.join(base_dir, ''.join(697 path = os.path.join(self.base_dir, ''.join(
696 ['submission_', timestamp, file_ext]))698 ['submission_', timestamp, file_ext]))
697 self.launcher.transports['{}_file'.format(exporter)] = {699 self.launcher.transports['{}_file'.format(exporter)] = {
698 'type': 'file',700 'type': 'file',

Subscribers

People subscribed via source and target branches