Merge lp:~kissiel/checkbox/forced-resume into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Maciej Kisielewski
Approved revision: 4399
Merged at revision: 4401
Proposed branch: lp:~kissiel/checkbox/forced-resume
Merge into: lp:checkbox
Diff against target: 42 lines (+11/-3)
2 files modified
checkbox-touch/build-me (+5/-1)
checkbox-touch/checkbox-touch.qml (+6/-2)
To merge this branch: bzr merge lp:~kissiel/checkbox/forced-resume
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+297006@code.launchpad.net

Description of the change

This MR brings forcing of session resume to checkbox-converged.

When build-me is run with --forced-resume flag it will make checkbox to always rerun the last test when starting up checkbox.

To test it run normal build of checkbox-converged + use --forced-resume for ./build-me.
i.e.:

cd checkbox
./mk-venv venv
. venv/bin/activate
cd checkbox-touch
./get-libs
./build-me --forced-resume --ssh 192.168.6.66

Then start checkbox. If there was a previously run session, it should be resumed (if possible).
If not, start a new one, kill the app after few tests, and rerun. It should continue w/o asking.

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

+1

review: Approve
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

w00t, let's land it!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'checkbox-touch/build-me'
--- checkbox-touch/build-me 2016-05-31 09:13:09 +0000
+++ checkbox-touch/build-me 2016-06-09 20:50:36 +0000
@@ -135,6 +135,9 @@
135 parser.add_argument("--forced-lang", action='store', type=str,135 parser.add_argument("--forced-lang", action='store', type=str,
136 help=("Force checkbox to run in a given language. "136 help=("Force checkbox to run in a given language. "
137 "I.e. pl_PL, zh_CN"))137 "I.e. pl_PL, zh_CN"))
138 parser.add_argument("--forced-resume", action='store_true',
139 help=("Force checkbox to always resume session (and "
140 "rerun the last test)."))
138 args = parser.parse_args()141 args = parser.parse_args()
139 if args.port and not args.ssh:142 if args.port and not args.ssh:
140 parser.error("--port without --ssh doesn't make sense!")143 parser.error("--port without --ssh doesn't make sense!")
@@ -149,7 +152,8 @@
149 "revision": get_revision_string(),152 "revision": get_revision_string(),
150 "clickBuildDate": str(datetime.now().date()),153 "clickBuildDate": str(datetime.now().date()),
151 "testplan": args.testplan,154 "testplan": args.testplan,
152 "providersDir": "providers"155 "providersDir": "providers",
156 "forcedResume": args.forced_resume
153 }157 }
154 settings_file = open('settings.json', 'w')158 settings_file = open('settings.json', 'w')
155 settings_file.write(json.dumps(settings, sort_keys=True, indent=4))159 settings_file.write(json.dumps(settings, sort_keys=True, indent=4))
156160
=== modified file 'checkbox-touch/checkbox-touch.qml'
--- checkbox-touch/checkbox-touch.qml 2016-05-30 22:07:02 +0000
+++ checkbox-touch/checkbox-touch.qml 2016-06-09 20:50:36 +0000
@@ -460,8 +460,12 @@
460 function resumeOrStartSession() {460 function resumeOrStartSession() {
461 app.isSessionResumable(function(result) {461 app.isSessionResumable(function(result) {
462 if (result.resumable === true) {462 if (result.resumable === true) {
463 pageStack.clear();463 if (appSettings.forcedResume) {
464 pageStack.push(resumeSessionPage);464 app.resumeSession(true, processNextTest)
465 } else {
466 pageStack.clear();
467 pageStack.push(resumeSessionPage);
468 }
465 } else {469 } else {
466 if (result.errors_encountered) {470 if (result.errors_encountered) {
467 ErrorLogic.showError(mainView, i18n.tr("Could not resume session."),471 ErrorLogic.showError(mainView, i18n.tr("Could not resume session."),

Subscribers

People subscribed via source and target branches