#ubuntu-autopilot 2014-08-27
<elopio> veebers: the bamf process manager will not work with xvfb?
<elopio> hum, and I'm also having problems with ubuntu_upstart_launch
<veebers> elopio: Are you saying you're having issues with using autopilot under xvfb?
<elopio> veebers: yes. I'm trying to run the toolkit tests with autopilot3-sandbox-run
<elopio> the ones that use ubuntu_upstart_launch failed to launch
<veebers> elopio: hmm, I wonder if it's setting the environment variables as expected. I'm not sure oof the top of my head sorry, I don't have experience with the -sandbox-run script yet'
<elopio> and the ones that use launch_test_application fail because they use the process manager to resize the window.
<veebers> elopio: have you had it working in the past or is this a new attempt?
<elopio> veebers: it's the first time I try it.
<veebers> elopio: what are you running? I would like to give it a try
<elopio> veebers:
<elopio> bzr branch lp:ubuntu-ui-toolkit/staging
<elopio> cd staging
<elopio> qmake
<elopio> make
<elopio> source export_modules_dir.sh
<elopio> cd tests/autopilot
<elopio> autopilot3-sandbox-run -X -d ubuntuuitoolkit.tests.custom_proxy_objects.test_listitems.SwipeToDeleteTestCase.test_swipe_item_to_wrong_direction
<elopio> something l ike that.
<veebers> elopio: I'm pretty sure it's due to unity (and thus bamf) not running in the created environment, similar reason for the upstart issue. I'm just trying to confirm now
<elopio> I'm not sure what bamf is, but yes, it says no applications are running even when they are on the launch_test_application case
<veebers> hmm, I don't think I"m exactly right, but I'm on the right path
<elopio> veebers: without xvfb or xephyr we can't run autopilot autopkgtests, right?
<veebers> elopio: can I ask what you're using it for? I'm still poking around at the moment (re: the bamf stuff, I suspect the upstart stuff is a different ketle of fish)
<veebers> elopio: honestly I don't know much about the autopkg tests, but I would say you're correct
<veebers> elopio: that question of mine was directed in general, not your query re autopkgtests :-)
<elopio> veebers: I'm trying to start running the autopilot tests as autopkgtests. The toolkit team is the one that suffers more because they have too many tests, so I tried to start there.
<veebers> ah, right make sense
<veebers> thomi: who would a good person to talk to about bamf nowadays? It looks like there needs to be 'something else' added to use it within Xephyr
<thomi> huh? you shouldn't need to
<thomi> you're running unity 7, right?
<veebers> thomi: yeah I am, but it's not working as expected when using the autopilot3-sandbox script (which uses Xephyr & dbus-launch to create a new environment) so it's not using the same bamf connection as my desktop
<thomi> well no, it wouldn't
<thomi> but you also don't want it to, right?
<veebers> thomi: why wouldn't I? At the moment elopio is trying to use it to run tests, and it's failing for him because the process_manager (bamf) isn't working for him
<thomi> veebers: because you want bamf to match the nested apps, not the apps on your desktop
<thomi> so I suspect you're not running unity7 in your nested session
<thomi> or perhaps running u7, but not the bamfdaemon (although that should be auto-started, I believe)
<veebers> thomi: no you misunderstood (or I didn't exaplion well). You're right I don't want it to match the apps on my desktop
<veebers> it's the apps launched within the new newsted environment that aren't  showing up in bamf
<thomi> how do you know that?
<veebers> thomi:right, there is no unity7 within the nested X
<veebers> thomi: d-feet and ipdb
<thomi> how are you connecting to the nested dbus session with d-feet?
<veebers> from within my python dbugger I get os.environ['DBUS_SESSION_BUS_ADDRESS'] and plug that into d-feets 'connect to different bus'
<thomi> ok, so I don't think your apps will be mapped unless u7 is running
<thomi> but WRT your original question, I'd ask someone like Trevino or Stephen Webb
<veebers> thomi: right, I guess that's the answer we're looking for. The 'something else' is unity7 :-)
<thomi> I'm a little concerned that the toolkit tests need bamf :-/
<elopio> thomi: it shouldn't. But I want to resize the window and bamf is the only backend for that at the moment.
<veebers> thomi: ok, also; Ted G is the man to talk to about ubuntu-app-launch right? (elopio is also having issues with that using the sandbox)
<elopio> thomi: how could I resize an app on xephyr or xvfb without unity7 running?
<thomi> yes, tedg is libUAL
<thomi> elopio: why do you want to resize the app, and how do you do this on a device?
<veebers> sweet, cheers thomi
<elopio> thomi: I want to simulate the size the window will get on a device.
<thomi> elopio: ahhhh
<elopio> just for desktop runs. On the devices I don't do it.
<thomi> that's really nasty
<thomi> can't you set the window geometry when you launch it?
<elopio> thomi: no. ubuntu-launch-app doesn't know about geometries
<veebers> elopio, you could set the xephyr screen size
<elopio> that was ted's explanation.
<veebers> no wait, that doesn't affect the app
<thomi> elopio: well, this is a really nasty hack, and TBH I'm not surprised we're finding problems with it
<thomi> I don't understand why libUAL would have to know about *anything* in the command line parameters
<thomi> but there you go - that whole area is a huge ball of oddness
<elopio> thomi: it's a little bad. But shouldn't we be able to resize windows anyway?
<thomi> elopio: on a platform where that makes sense, sure, and you can
<thomi> elopio: but you're trying to do it on a platform that we don't support
<thomi> (i.e.- a raw X session, with no desktop manager)
<elopio> you are right, xephyr doesn't let me resize the app manually either.
<elopio> veebers: if I change the xephyr window size, the app is just scaled in it. It seems to me that the only way to do it is to pass the window size when launching the app.
<veebers> elopio: right, I redacted my suggested as soon as I said it, sorry :-\
<elopio> I could skip the device simulation scenarios for now. But we need the launch upstart working.
<elopio> veebers: martin put some insteresting things about upstart here: /usr/share/autopkgtest/setup-commands/ubuntu-touch-session
 * veebers looks
<veebers> elopio: where would I see that on my system? DO I need to install something else?
<elopio> veebers: sudo apt-get install autopkgtest
<veebers> ahh, makes sense
<veebers> elopio: right, it looks like there is some more details needed for upstart when using the sandbox script. Are you able to reuse the autopkgtest stuff somehow for what your doing?
<elopio> veebers: I'm trying to set up the autopkgtests on the package to then run them with that setup script to see what happens.
<veebers> elopio: ah ok, sweet. Let me know how it goes
<elopio> I'm understanding half of what I'm doing :) I'm collecting tons of questions for Martin.
<veebers> ^_^
<veebers> elopio: oh, thanks for update the touch duration branch of yours. Approved
<elopio> veebers: thanks to you for the review.
<elopio> veebers: the launch still fails with that set up.
<veebers> elopio: :-( Can you tell why it fails?
<elopio> veebers: it says the same thing as on xvfb, RuntimeError: Timed out while waiting for application to launch
<elopio> it just takes a lot longer to say that
<veebers> elopio: which part timed out? Is this autopilot, or the process manager or something else?
<elopio> http://paste.ubuntu.com/8155837/
<elopio> veebers: it's autopilot waiting for upstart to launch the app.
<veebers> elopio: are you able to write a simple example/script that launches an upstart app in Xephyr (without using autopilot)? We want to single out if it's autopilot or the upstart/dbus setup that's getting in the way
<elopio> let me read the man
<elopio> veebers: this seems to work
<elopio> $ Xephyr -screen 1280x1024 :1 &
<elopio> $ initctl set-env --global DISPLAY=:1.0
<elopio> $ ubuntu-app-launch dialer-app
<elopio> if you have the dialer-app package installed.
<veebers> elopio: what happens if you setup the "initctl set-env --global DISPLAY=:1.0" in the autopilot test? i.e. before the app is launched
<elopio> I'm trying
<veebers> hmm actually that's silly of me
<veebers> oh actually maybe not
<veebers> I was confusing ENV with the initctl set-env.
<elopio> veebers: the xephyr display started by autopilot is :5.0, but it doesn't work.
<elopio> it still fails to launch the app.
<veebers> elopio: do you see anything come up on the xephyr screen?
<elopio> veebers: nothing.
<elopio> oh, but this works.
<elopio> $ Xephyr -screen 1280x1024 :1 &
<elopio> $ initctl set-env --global DISPLAY=:1.0
<elopio> $ autopilot3 run ubuntuuitoolkit.tests.custom_proxy_objects.test_listitems.SwipeToDeleteTestCase.test_swipe_item_to_wrong_direction
<elopio> it's just the sandbox the one that fails to launch it.
<veebers> elopio: hmm, so you're saying that running that makes it work (i.e. the app appears on the xephyr screen)?
<elopio> veebers: yes.
<veebers> elopio: I would say that it's the dbus stuff breaking it then (as the sandbox script uses dbus-launch)
<veebers> elopio: you could prove that by editing the sandbox script to remove the dbus-launch part and running it, it will use your normal session bus but that's ok
<veebers> this isn't a solution, but some debugging btw :-)
<elopio> veebers: well, it would still miss the initctl set-env part.
<veebers> elopio: oh sorry, I meant to say add that in (in the sandbox script)
<elopio> veebers: yes. With the set-env and without the dbus-launch, the sandbox works.
<veebers> elopio: It looks like there needs to be more setup for ubuntu-app-launch to work with the different session bus, but isn't that what that script that you linked me does?
<elopio> veebers: I thought so. It could be that what failed on my adt-run execution was the missing set-env
<elopio> I can try, but that's going to take longer than what I'll remain awake. I'll leave it running.
<veebers> elopio: heh, let me know how it goes ^_^
<zbenjamin> hey guys
<zbenjamin> is there any way for me to wait for a Qt signal in a test?
<zbenjamin> balloons: ^ any idea?
<elopio> zbenjamin: there's a discouraged way to do it
<elopio> http://bazaar.launchpad.net/~autopilot/autopilot/trunk/view/head:/autopilot/introspection/qt.py
<elopio> it's undocumented and thomi keeps saying that we should remove it, because it almost always means that you are using autopilot wrong.
<elopio> what are you trying to do? Maybe we can find an alternative.
<zbenjamin> elopio: why is the QtSignalWatcher discouraged? and what is the correct way
<elopio> zbenjamin: when you are doing black box testing through the UI, you take the role of a real user.
<elopio> real users don't have access to signals. They need to be notified through the UI.
<elopio> so if you are waiting for something, there must be a visual clue for it.
<balloons> veebers, can I use something that is python 3.3+ only in autopilot?
<veebers> balloons: um, 3.3 is default in Utopic right?
<balloons> python3.4 I thought is default?
<veebers> balloons: ah, you might be right. Right so now autopilot is python3 and i utopic you can use what is default there (i.e. 3.4)
<balloons> awesome
#ubuntu-autopilot 2014-08-29
<m-b-o> Hi, I have a problem with ubuntuuitoolkit and the AppHeader proxy
<m-b-o> with "_get_action_button_in_overflow()" in particular
<m-b-o> sometimes the action is clicked, without a visible overlay
<m-b-o> which happens here: http://91.189.93.70:8080/job/generic-mediumtests-utopic-weather-app/lastSuccessfulBuild/artifact/ubuntu_weather_app.tests.test_settings.TestSettings.test_switch_wind_scale%20%28with%20mouse%29.ogv
<gerlowskija> I was looking at: http://unity.ubuntu.com/autopilot/tutorial/good_tests.html#scenarios...is there a way to specify that the scenarios are only used on some of the tests in the class? My understanding is that each test is run once for each scenario in the list. Is there a way to override that, or do tests that use scenarios and tests that don't alwa
<gerlowskija> ys have to be in separate classes?
<balloons> I was hoping barry would be around, but he's not.. Might be difficult to get an answer today.. holidays :-)
<gerlowskija> ok. I can always ask again later, nbd.
<balloons> https://pypi.python.org/pypi/testscenarios/
<cgoldberg> gerlowskija, offhand, I don't know of a nice way to selectively apply scenarios within a class.  But that smells to me like your TestCase classes are too big... generally you'd only group very similar tests into a class.
<cgoldberg> in that same guide, see 'Test One Thing Only', and 'Test Length' :)
<cgoldberg> gerlowskija, that's a good document btw.. I forgot that was part of AP docs
<gerlowskija> cgoldberg: haha fair enough.  I'm not against splitting classes, just wanted to make sure there wasn't some other best-practice I was missing.  Thanks for weighing in; I'll split the classes
#ubuntu-autopilot 2014-08-30
<hakermania> can someone eli5 to me?
#ubuntu-autopilot 2015-08-24
<veebers> barry: Hey you around?
<veebers> barry: For wily, I'm in the process of getting this in: https://code.launchpad.net/~canonical-platform-qa/autopilot/fix-updated-flake8/+merge/268424
<veebers> barry: sorry for any miss-communication, I should have filed a bug but thought I would be able to get the fix in quickly.
<barry> veebers: ah :)
<barry> veebers: i think i have a working branch now too.  why don't you attach your to the bug and i'll do the same.  i'll leave it to you to reconcile any differences if needed.
<barry> *yours
<barry> veebers: and no worries.  thanks for working on a fix
<veebers> barry: sure thing, have done :-)
<barry> veebers: i'll unassign myself from it
#ubuntu-autopilot 2017-09-02
<jaredricesr> Stuck at 99% on syncing images from SimpleStreams. Has been there for 4 hours. I'm on a 1GB/ps dedicated connection. Anything I can do to fix this or do I have to restart the entire installation?
