[01:56] thomi, regarding the slowness with archiving artifacts... Jenkins has a little quirk, it can run multiple instances of a job at once, but it has to complete them in order [01:57] so build #200 was probably stuck waiting for build #199 to finish [01:57] ugh [01:57] * thomi slow claps for jenkins [02:00] :-) [02:10] thomi: fyi https://code.launchpad.net/~veebers/autopilot/fix-type_name-str-conversion/+merge/218726 [15:44] ping elopio [15:45] balloons: pong [15:46] elopio, I was wondering if you could review this MP quickly; https://code.launchpad.net/~nskaggs/ubuntu-calendar-app/mock-test-env/+merge/218494. I'm trying to fix how tests setup and launch and I believe this is how it should look [15:47] balloons: yes! nice. I'll look at it. [15:48] excellent.. there is some small tweaks I'll want to do to reminders as well.. namely add the _patch_home function [15:51] balloons: there's a InitctlEnvironmentVariable in ubuntuuitoolkit.fixture_setup that takes care of the clean up. [15:52] balloons: you should use that, because if the variable had a previous value, you shouldn't unset it. You should return to that previous value. [15:52] elopio, ahh, gotcha [15:52] balloons: and your fake home is a perfect candidate to be added to ubuntuuitoolkit.fixture_setup [15:53] many apps will use it. [15:53] elopio, in theory everything should use it [15:53] yes, that would be safer and cleaner. [15:54] balloons: I remember that I patched the home for filemanager tests. And then they started failing because the app had no access to the tmp dir on the phone. [15:54] is that different now? [15:54] elopio, I know I did stuff as well with fm. As it stands now, I make a temp directory, then force the tests to navigate to it before running [15:55] elopio, https://code.launchpad.net/~nskaggs/ubuntu-filemanager-app/setup-ap-env/+merge/218836. I did fm this way too.. I think it's fine [15:55] ok. [15:56] elopio, sorry.. so I changed file manager to be the same as what you are looking at with calendar. I meant to say, in trunk it uses the temp dir, plus navigate to it first [15:58] yes, I was just wondering what happened there. [15:59] balloons: I don't like that the way we select the binary to run. That's related to my cmake branch with the run task. [16:00] elopio, I actually spoke with thomi a little about using cmake to run tests [16:00] I would prefer something like autopilot run ubuntu-filemanager-app LAUNCHER=click BINARY_PATH=/opt/.../ [16:00] he was concerned about making non-standard ways of doing things.. in other words he'd like to always see autopilot as the runner [16:00] I told him we'd prefer args passing :-) [16:01] well, autopilot is the runner. We are using cmake just because it knows the paths. [16:01] yes, but the call is through cmake [16:01] which he wasn't so keen on [16:01] balloons: so what does he propose as a way to know the path? [16:01] so I quickly did reminders as well; lp:~nskaggs/reminders-app/setup-ap-env [16:02] elopio, passing the args I think works for him [16:02] and in our case if we then use cmake to make the call anyway, perhaps it's fine [16:02] he just didn't like not being able to run the tests without having cmake installed [16:03] balloons: he will be able. He would just have to know the paths. [16:03] elopio, right, so I think as you just proposed works fine [16:03] but AP needs to support passing args is all [16:03] which he said is on the list :-) [16:04] I have tons of emails to read. Today I won't code more, I will read and reply :) [16:04] balloons: anyway, that's something we can add later to your branch. [16:05] so elopio you are saying I should get_initctl_env_var first, then set it back it's initial value rather than set, and unset it [16:06] balloons: no, I'm saying that you should call self.useFixture(ubuntuuitoolkit.fixture_setup.InitctlEnvironmentVariable(HOME=temp_dir)) [16:06] it will take care of everything. [16:07] ahh, I see now [16:07] * balloons opened fixture_setup [16:07] elopio, so, the patching of home could be the same.. just a fixture [16:08] balloons: yes, the python module has fixture for that [16:08] ok, so I won't rampage beyond the 3 apps I've done and we should plan to go that route [16:08] temp_dir_fixture = fixtures.TempDir() [16:08] self.useFixture(temp_dir_fixture) [16:08] temp_dir = temp_dir_ficture.path [16:09] self.useFixture(fixtures.EnvironmentVariable('HOME', newvalue=temp_dir) [16:10] balloons: that will make your code a lot smaller. [16:13] elopio, that would be inplace of using the patcher on the desktop.. but not for click, correct? [16:14] balloons: yes, for click you would use InitctlEnvironmentVariable from the toolkit. [16:17] balloons: what is Xauthority for? [16:18] elopio, that's for jenkins only. if you mess with /home it will fail to spawn the xsession [16:18] balloons: that would be nice as a comment on the code. [16:18] elopio, :-) [16:35] elopio, updated the mp [16:40] balloons: you need to copy the xauthority before the useFixtures that update HOME [16:42] elopio, bah, good catch [16:42] balloons: also, it would be clearer if you wrap that part in a copy_xauthority file. [16:42] * copy_xauthority_file method. [16:42] really another method? ok, can do [16:43] balloons: yes, methods are good :) [16:43] balloons: do you want me to make the fixture for this on the toolkit ? [16:44] elopio, yes that's a good idea [16:44] balloons: ok, please report a bug for me and it will be on my todo for next week. [16:45] or maybe tomorrow, looks fun. [16:45] elopio, :-) Yes, I'll try and hold off on rampaging through all the apps.. But I need to fix a few, so I'll push this version to those [16:47] ok [16:48] balloons: final comment, I think that def setup_environment(self): would be better named get_launcher_and_type [16:49] but, that's the part I would remove. [16:49] elopio, ok. what do you mean you would remove? [16:49] the method altogether? [16:50] balloons: yes. If we tell from the runner that we want to launch the click app, there's no need to check which paths exist. [16:50] mmm.. true, but at the moment we're forced to guess [16:52] balloons: yes. [16:52] so you don't forsee a need in the future to have a get_launcher_and_type method.. So for now should I move it into setup? [16:53] btw, setUp drives me crazy.. I just realized it's not sanely setup, all lowercase [16:53] no no no. [16:53] methods are good. [16:53] it's easier to remove it later if it's in a separate method. [16:54] I agree, just confused by what you were saying I guess. Ok, so I'll rename it [16:54] it should be set_up, as the gods of python would have wanted it. [16:54] setup is one word :-) [16:54] really? [16:54] I would support setUp over set_up if it was two words [17:30] balloons: what is this for? [17:30] 106 + '-q', self.local_location_qml, [17:31] ahh yes.. I meant to mention that. I added back code to find the local qml file and pass it. We do it for the installed version, so we should do it for the local version also [17:31] imho, nothing wrong with being explicit. Although in theory the binary was updated to just find the proper qml file as needed [17:31] I did the same with file manager [17:33] elopio, care to put your stamp on https://code.launchpad.net/~nskaggs/ubuntu-calendar-app/mock-test-env/+merge/218494? [17:37] balloons: sure. Thanks for making the changes. [17:38] elopio, ty.. and https://code.launchpad.net/~nskaggs/ubuntu-filemanager-app/setup-ap-env/+merge/218836 too.. I take it you've seen the reminders mp also :-) [17:41] balloons: on the reminders one, you need a commit message. [17:41] :- done [18:13] balloons: hey, one thing about this [18:13] 29 - local_location_binary = '../../src/app/reminders' [18:13] 30 + local_location = os.path.dirname(os.path.dirname(os.getcwd())) [18:14] oh, no, I get it. [18:15] k [18:18] balloons: now, we need to discuss what to do with the oauth evernote token. [18:19] if we just put it on the branch, somebody could mess with our account affecting the tests. [18:19] we could revoke it and update the test with the new one, so might not be a big deal. [18:19] but it's a hole. [18:22] ping barry [18:22] balloons: pong [18:23] barry, so playing with file manager and I noticed it was still running as py2. I investigated in phablet-test-run and found the import check for python3 [18:23] it fails if you give a full test name it seems for file manager [18:23] barry, ie, ImportError: No module named 'filemanager.tests.test_filemanager.TestFolderListPage'; 'filemanager.tests.test_filemanager' is not a package [18:23] balloons: what's the command line you used? [18:24] barry, phablet-test-run -v filemanager.tests.test_filemanager.TestFolderListPage.test_cut_directory [18:25] elopio, the token can be inserted at build time, just like the weather app [18:25] balloons: i have to think that's a bug in autopilot3 [18:25] i don't remember how it's doing test discovery [18:25] oO, I get to blame thomi eh? [18:26] I don't remember.. but I like the idea of blaming [18:26] esp. since he's not here yet :) [18:26] balloons: that's more likely because you don't have some py3 dependencies installed. [18:27] I've been running with autopilot3 and I generally use the full test name. [18:27] elopio, essentially jenkins has the token and the job will insert it when it runs. the source tree will have a config file with the token info blanked [18:27] elopio, yea, I don't remember ever seeing this issue before [18:27] balloons: that sounds pretty cool. [18:27] how do I do it? [18:28] elopio, but then again, on the desktop you are running directly.. on the phablet, unless it blows up maybe I never noticed it was secretly running as py2 [18:28] elopio, we talk to fginther about it, but we'll mimic weather.. I don't think it's pressing so I don't want to mess with it atm [18:28] balloons: ok. Lets just not forget about it. [18:29] trying to close down open issues, not make more, heh :-) I wouldn't hold your merge on it [18:29] later I can revoke this, and give the new one to francies. [18:29] elopio, right, we can go through that process if it comes to it [18:29] balloons: what seems to be holding it now is that the jenkins runner is offline. [18:30] fginther already applied a change suggested by mardy, and my debug branch has passed. [18:30] I would like to confirm on the real branch before merging it. [18:31] elopio, I'll file a bug about the token now [18:35] elopio, well now I've got fm running via py3, I'm still getting autopilot.introspection.dbus.StateNotFoundError: Object not found with name ''. [18:35] it's weird.. hmm [18:37] balloons: that doesn't happen with py2? that would be weird indee. [18:37] *indeed [18:38] elopio, I'm thinking it might be a name change thing from ubuntu_filemanager_app -> filemanager [18:39] balloons: the manifest.json has the right name filemanager [18:40] it's just bizarre as I see the Popover class in emulators.. and inside the module, under the proper directory.. [18:42] ohh.. heh, I think the explanation is much simpler.. I get it now.. nevermind. The tests are actually failing [18:42] the popover isn't being found.. but the code is ;-) [19:15] barry, so looks like I get to blame phablet-test-run instead ;-) [19:15] balloons: yay! [19:57] elopio, https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1317639. can't assign for some reason [19:57] Ubuntu bug 1317639 in Ubuntu UI Toolkit "Add /home patching to autopilot helper" [Undecided,Confirmed] [20:05] morning [20:16] thomi I'm writing a multi-app test, what's a good way to set the testability flag globally so that every app that's launched gets it? [20:16] thomi my test is 'change wallpaper', which opens gallery-app [20:16] alesage: it's best not to, TBH - let autopilot handle that for you when it launches the app [20:16] alesage: oh, I see [20:17] alesage: in that case, you need to set some upstart override files I believe [20:17] we don't currently have a good solution for this [20:17] thomi ok so I'll investigate the upstart override--any further hints? or where has this happened before, etc.? [20:18] alesage: hmmmm [20:18] alesage: I know someone's done this [20:18] alesage: I'm prettys ure veebers knows more [20:18] he'll be online in < 40 minutes [20:18] thomi ok also I'm asking ted about a method thx [20:18] alesage: it'd be awesome if apps with testability opened other apps with testability [20:19] maybe you can ask for that feature :)( [20:21] alesage: initctl set-env --global QT_TESTABILITY=1 [20:21] alesage: or whatever the variable is. [20:21] alesage: this way all apps launched will get that flag in their environemnt. [20:28] xnox, thanks very helpful, will test now [20:48] ok new wrinkle: gallery-app not upstart-launched :) thx regardless xnox [20:48] veebers, I wonder if you have a thought on this, trying to get an externally-launched app to launch with the -testability flag [20:48] veebers, question mark? [20:50] alesage: self.launch_test_application() from within a testsuite will do it [20:50] does that help? [20:51] veebers, in this case I'm not the one launching--when changing the wallpaper the gallery-app is launched externally [20:51] veebers, although I might just open it preemptively hmm [20:51] alesage: if it's launched outside of autopilot or our control that makes it harder [20:52] alesage: how is gallery-app launched? I suspect that an upstart override file has already been suggested [20:52] veebers, I don't think it's under upstart [20:53] alesage: really? that surprises me [20:53] alesage: I know it's not click [20:53] but i thought it was upstart [20:53] I'm just doing the initctl list and not finding it