/srv/irclogs.ubuntu.com/2014/05/08/#ubuntu-autopilot.txt

fgintherthomi, 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 order01:56
fgintherso build #200 was probably stuck waiting for build #199 to finish01:57
thomiugh01:57
* thomi slow claps for jenkins01:57
fginther:-)02:00
veebersthomi: fyi https://code.launchpad.net/~veebers/autopilot/fix-type_name-str-conversion/+merge/21872602:10
balloonsping elopio15:44
elopioballoons: pong15:45
balloonselopio, 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 look15:46
elopioballoons: yes! nice. I'll look at it.15:47
balloonsexcellent.. there is some small tweaks I'll want to do to reminders as well.. namely add the _patch_home function15:48
elopioballoons: there's a InitctlEnvironmentVariable in ubuntuuitoolkit.fixture_setup that takes care of the clean up.15:51
elopioballoons: 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
balloonselopio, ahh, gotcha15:52
elopioballoons: and your fake home is a perfect candidate to be added to ubuntuuitoolkit.fixture_setup15:52
elopiomany apps will use it.15:53
balloonselopio, in theory everything should use it15:53
elopioyes, that would be safer and cleaner.15:53
elopioballoons: 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
elopiois that different now?15:54
balloonselopio, 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 running15:54
balloonselopio, https://code.launchpad.net/~nskaggs/ubuntu-filemanager-app/setup-ap-env/+merge/218836. I did fm this way too.. I think it's fine15:55
elopiook.15:55
balloonselopio, 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 first15:56
elopioyes, I was just wondering what happened there.15:58
elopioballoons: I don't like that the way we select the binary to run. That's related to my cmake branch with the run task.15:59
balloonselopio, I actually spoke with thomi a little about using cmake to run tests16:00
elopioI would prefer something like autopilot run ubuntu-filemanager-app LAUNCHER=click BINARY_PATH=/opt/.../16:00
balloonshe was concerned about making non-standard ways of doing things.. in other words he'd like to always see autopilot as the runner16:00
balloonsI told him we'd prefer args passing :-)16:00
elopiowell, autopilot is the runner. We are using cmake just because it knows the paths.16:01
balloonsyes, but the call is through cmake16:01
balloonswhich he wasn't so keen on16:01
elopioballoons: so what does he propose as a way to know the path?16:01
balloonsso I quickly did reminders as well; lp:~nskaggs/reminders-app/setup-ap-env16:01
balloonselopio, passing the args I think works for him16:02
balloonsand in our case if we then use cmake to make the call anyway, perhaps it's fine16:02
balloonshe just didn't like not being able to run the tests without having cmake installed16:02
elopioballoons: he will be able. He would just have to know the paths.16:03
balloonselopio, right, so I think as you just proposed works fine16:03
balloonsbut AP needs to support passing args is all16:03
balloonswhich he said is on the list :-)16:03
elopioI have tons of emails to read. Today I won't code more, I will read and reply :)16:04
elopioballoons: anyway, that's something we can add later to your branch.16:04
balloonsso elopio you are saying I should get_initctl_env_var first, then set it back it's initial value rather than set, and unset it16:05
elopioballoons: no, I'm saying that you should call self.useFixture(ubuntuuitoolkit.fixture_setup.InitctlEnvironmentVariable(HOME=temp_dir))16:06
elopioit will take care of everything.16:06
balloonsahh, I see now16:07
* balloons opened fixture_setup16:07
balloonselopio, so, the patching of home could be the same.. just a fixture16:07
elopioballoons: yes, the python module has fixture for that16:08
balloonsok, so I won't rampage beyond the 3 apps I've done and we should plan to go that route16:08
elopiotemp_dir_fixture = fixtures.TempDir()16:08
elopioself.useFixture(temp_dir_fixture)16:08
elopiotemp_dir = temp_dir_ficture.path16:08
elopioself.useFixture(fixtures.EnvironmentVariable('HOME', newvalue=temp_dir)16:09
elopioballoons: that will make your code a lot smaller.16:10
balloonselopio, that would be inplace of using the patcher on the desktop.. but not for click, correct?16:13
elopioballoons: yes, for click you would use InitctlEnvironmentVariable from the toolkit.16:14
elopioballoons: what is Xauthority for?16:17
balloonselopio, that's for jenkins only. if you mess with /home it will fail to spawn the xsession16:18
elopioballoons: that would be nice as a comment on the code.16:18
balloonselopio, :-)16:18
balloonselopio, updated the mp16:35
elopioballoons: you need to copy the xauthority before the useFixtures that update HOME16:40
balloonselopio, bah, good catch16:42
elopioballoons: also, it would be clearer if you wrap that part in a copy_xauthority file.16:42
elopio* copy_xauthority_file method.16:42
balloonsreally another method? ok, can do16:42
elopioballoons: yes, methods are good :)16:43
elopioballoons: do you want me to make the fixture for this on the toolkit ?16:43
balloonselopio, yes that's a good idea16:44
elopioballoons: ok, please report a bug for me and it will be on my todo for next week.16:44
elopioor maybe tomorrow, looks fun.16:45
balloonselopio, :-) 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 those16:45
elopiook16:47
elopioballoons: final comment, I think that def setup_environment(self): would be better named get_launcher_and_type16:48
elopiobut, that's the part I would remove.16:49
balloonselopio, ok. what do you mean you would remove?16:49
balloonsthe method altogether?16:49
elopioballoons: 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
balloonsmmm.. true, but at the moment we're forced to guess16:50
elopioballoons: yes.16:52
balloonsso 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:52
balloonsbtw, setUp drives me crazy.. I just realized it's not sanely setup, all lowercase16:53
elopiono no no.16:53
elopiomethods are good.16:53
elopioit's easier to remove it later if it's in a separate method.16:53
balloonsI agree, just confused by what you were saying I guess. Ok, so I'll rename it16:54
elopioit should be set_up, as the gods of python would have wanted it.16:54
balloonssetup is one word :-)16:54
elopioreally?16:54
balloonsI would support setUp over set_up if it was two words16:54
elopioballoons: what is this for?17:30
elopio106+ '-q', self.local_location_qml,17:30
balloonsahh 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 also17:31
balloonsimho, nothing wrong with being explicit. Although in theory the binary was updated to just find the proper qml file as needed17:31
balloonsI did the same with file manager17:31
balloonselopio, care to put your stamp on https://code.launchpad.net/~nskaggs/ubuntu-calendar-app/mock-test-env/+merge/218494?17:33
elopioballoons: sure. Thanks for making the changes.17:37
balloonselopio, 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:38
elopioballoons: on the reminders one, you need a commit message.17:41
balloons:- done17:41
elopioballoons: hey, one thing about this18:13
elopio29- local_location_binary = '../../src/app/reminders'18:13
elopio30+ local_location = os.path.dirname(os.path.dirname(os.getcwd()))18:13
elopiooh, no, I get it.18:14
balloonsk18:15
elopioballoons: now, we need to discuss what to do with the oauth evernote token.18:18
elopioif we just put it on the branch, somebody could mess with our account affecting the tests.18:19
elopiowe could revoke it and update the test with the new one, so might not be a big deal.18:19
elopiobut it's a hole.18:19
balloonsping barry18:22
barryballoons: pong18:22
balloonsbarry, 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 python318:23
balloonsit fails if you give a full test name it seems for file manager18:23
balloonsbarry, ie,  ImportError: No module named 'filemanager.tests.test_filemanager.TestFolderListPage'; 'filemanager.tests.test_filemanager' is not a package18:23
barryballoons: what's the command line you used?18:23
balloonsbarry, phablet-test-run -v filemanager.tests.test_filemanager.TestFolderListPage.test_cut_directory18:24
balloonselopio, the token can be inserted at build time, just like the weather app18:25
barryballoons: i have to think that's a bug in autopilot318:25
barryi don't remember how it's doing test discovery18:25
balloonsoO, I get to blame thomi eh?18:25
balloonsI don't remember.. but I like the idea of blaming18:26
barryesp. since he's not here yet :)18:26
elopioballoons: that's more likely because you don't have some py3 dependencies installed.18:26
elopioI've been running with autopilot3 and I generally use the full test name.18:27
balloonselopio, 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 blanked18:27
balloonselopio, yea, I don't remember ever seeing this issue before18:27
elopioballoons: that sounds pretty cool.18:27
elopiohow do I do it?18:27
balloonselopio, 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 py218:28
balloonselopio, 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 atm18:28
elopioballoons: ok. Lets just not forget about it.18:28
balloonstrying to close down open issues, not make more, heh :-) I wouldn't hold your merge on it18:29
elopiolater I can revoke this, and give the new one to francies.18:29
balloonselopio, right, we can go through that process if it comes to it18:29
elopioballoons: what seems to be holding it now is that the jenkins runner is offline.18:29
elopiofginther already applied a change suggested by mardy, and my debug branch has passed.18:30
elopioI would like to confirm on the real branch before merging it.18:30
balloonselopio, I'll file a bug about the token now18:31
balloonselopio, well  now I've got fm running via py3, I'm still getting autopilot.introspection.dbus.StateNotFoundError: Object not found with name '<class 'filemanager.emulators.Popover'>'.18:35
balloonsit's weird.. hmm18:35
elopioballoons: that doesn't happen with py2? that would be weird indee.18:37
elopio*indeed18:37
balloonselopio, I'm thinking it might be a name change thing from ubuntu_filemanager_app -> filemanager18:38
robotfuelballoons: the manifest.json has the right name filemanager18:39
balloonsit's just bizarre as I see the Popover class in emulators.. and inside the module, under the proper directory..18:40
balloonsohh.. heh, I think the explanation is much simpler.. I get it now.. nevermind. The tests are actually failing18:42
balloonsthe popover isn't being found.. but the code is ;-)18:42
balloonsbarry, so looks like I get to blame phablet-test-run instead ;-)19:15
barryballoons: yay!19:15
balloonselopio, https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1317639. can't assign for some reason19:57
ubot5Ubuntu bug 1317639 in Ubuntu UI Toolkit "Add /home patching to autopilot helper" [Undecided,Confirmed]19:57
thomimorning20:05
alesagethomi 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
alesagethomi my test is 'change wallpaper', which opens gallery-app20:16
thomialesage: it's best not to, TBH - let autopilot handle that for you when it launches the app20:16
thomialesage: oh, I see20:16
thomialesage: in that case, you need to set some upstart override files I believe20:17
thomiwe don't currently have a good solution for this20:17
alesagethomi ok so I'll investigate the upstart override--any further hints?  or where has this happened before, etc.?20:17
thomialesage: hmmmm20:18
thomialesage: I know someone's done this20:18
thomialesage: I'm prettys ure veebers knows more20:18
thomihe'll be online in < 40 minutes20:18
alesagethomi ok also I'm asking ted about a method thx20:18
thomialesage: it'd be awesome if apps with testability opened other apps with testability20:18
thomimaybe you can ask for that feature :)(20:19
xnoxalesage: initctl set-env --global QT_TESTABILITY=120:21
xnoxalesage: or whatever the variable is.20:21
xnoxalesage: this way all apps launched will get that flag in their environemnt.20:21
alesagexnox, thanks very helpful, will test now20:28
alesageok new wrinkle: gallery-app not upstart-launched :) thx regardless xnox20:48
alesageveebers, I wonder if you have a thought on this, trying to get an externally-launched app to launch with the -testability flag20:48
alesageveebers, question mark?20:48
veebersalesage: self.launch_test_application() from within a testsuite will do it20:50
veebersdoes that help?20:50
alesageveebers, in this case I'm not the one launching--when changing the wallpaper the gallery-app is launched externally20:51
alesageveebers, although I might just open it preemptively hmm20:51
veebersalesage: if it's launched outside of autopilot or our control that makes it harder20:51
veebersalesage: how is gallery-app launched? I suspect that an upstart override file has already been suggested20:52
alesageveebers, I don't think it's under upstart20:52
thomialesage: really? that surprises me20:53
thomialesage: I know it's not click20:53
thomibut i thought it was upstart20:53
alesageI'm just doing the initctl list and not finding it20:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!