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
1=== modified file 'checkbox-touch/build-me'
2--- checkbox-touch/build-me 2016-05-31 09:13:09 +0000
3+++ checkbox-touch/build-me 2016-06-09 20:50:36 +0000
4@@ -135,6 +135,9 @@
5 parser.add_argument("--forced-lang", action='store', type=str,
6 help=("Force checkbox to run in a given language. "
7 "I.e. pl_PL, zh_CN"))
8+ parser.add_argument("--forced-resume", action='store_true',
9+ help=("Force checkbox to always resume session (and "
10+ "rerun the last test)."))
11 args = parser.parse_args()
12 if args.port and not args.ssh:
13 parser.error("--port without --ssh doesn't make sense!")
14@@ -149,7 +152,8 @@
15 "revision": get_revision_string(),
16 "clickBuildDate": str(datetime.now().date()),
17 "testplan": args.testplan,
18- "providersDir": "providers"
19+ "providersDir": "providers",
20+ "forcedResume": args.forced_resume
21 }
22 settings_file = open('settings.json', 'w')
23 settings_file.write(json.dumps(settings, sort_keys=True, indent=4))
24
25=== modified file 'checkbox-touch/checkbox-touch.qml'
26--- checkbox-touch/checkbox-touch.qml 2016-05-30 22:07:02 +0000
27+++ checkbox-touch/checkbox-touch.qml 2016-06-09 20:50:36 +0000
28@@ -460,8 +460,12 @@
29 function resumeOrStartSession() {
30 app.isSessionResumable(function(result) {
31 if (result.resumable === true) {
32- pageStack.clear();
33- pageStack.push(resumeSessionPage);
34+ if (appSettings.forcedResume) {
35+ app.resumeSession(true, processNextTest)
36+ } else {
37+ pageStack.clear();
38+ pageStack.push(resumeSessionPage);
39+ }
40 } else {
41 if (result.errors_encountered) {
42 ErrorLogic.showError(mainView, i18n.tr("Could not resume session."),

Subscribers

People subscribed via source and target branches