Closed Bug 872765 Opened 11 years ago Closed 11 years ago

Schedule all emulator tests on cedar using new full-stack emulator build

Categories

(Release Engineering :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jgriffin, Assigned: mozilla)

References

Details

Attachments

(10 files, 3 obsolete files)

1.39 KB, patch
jgriffin
: review+
mozilla
: checked-in+
Details | Diff | Splinter Review
1.39 KB, patch
catlee
: review+
mozilla
: checked-in+
Details | Diff | Splinter Review
31.16 KB, patch
rail
: review+
mozilla
: checked-in+
Details | Diff | Splinter Review
3.85 KB, patch
rail
: review+
mozilla
: checked-in+
Details | Diff | Splinter Review
2.05 KB, patch
rail
: review+
mozilla
: checked-in+
Details | Diff | Splinter Review
2.20 KB, patch
rail
: review+
mozilla
: checked-in+
Details | Diff | Splinter Review
1.63 KB, patch
catlee
: review+
mozilla
: checked-in+
Details | Diff | Splinter Review
4.36 KB, patch
catlee
: review+
mozilla
: checked-in+
Details | Diff | Splinter Review
1.35 KB, patch
ahal
: review+
jgriffin
: checked-in+
Details | Diff | Splinter Review
4.59 KB, patch
jgriffin
: review+
Details | Diff | Splinter Review
We now have full-stack emulator builds being produced by buildbot.  We should turn on all the tests for this build on cedar, so we can compare against the current emulator build.  If they produce equivalent results, we can move globally to the new build.
This is tricky, since we have two inputs: the build+tests from one build, and the emulator from another build.

Do we just grab the emulator.tar.gz from, e.g. https://pvtbuilds.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-central-generic/20130528082822/ , in place of the tooltool download?  (is that the main change?)

The easiest thing would probably be to grab the latest emulator on any given test run, but that seems prone to failure, especially on try or retriggering previous tests.  There's also a race condition.
> This is tricky, since we have two inputs: the build+tests from one build,
> and the emulator from another build.

Can we generate tests.zip from the emulator build?  This seems preferable, then we won't even need the current ics_armv7a_gecko builds, I don't believe.

The other thing we'll have to do is modify the mozharness scripts not to pass --gecko-path to the runners.  The new full-stack emulator builds have the correct version of gecko built into them, so there's no need to install a different copy.

Currently, the mozharness scripts are more or less hardcoded to assume that self.binary_path needs to be passed as --gecko-path.  We might be able to use ahal's work in bug 872164 to conditionally change this behavior per-tree.
> Can we generate tests.zip from the emulator build?  This seems preferable, then 
> we won't even need the current ics_armv7a_gecko builds, I don't believe.

I'm guessing that in order to make this easy, we'll need to change ./build.sh package-tests to generate the necessary tests.zip package.
Depends on: 876818
Attachment #754937 - Flags: review?(jgriffin)
Comment on attachment 754937 [details] [diff] [review]
add package-tests to the build.sh targets for emulator

Hm, should I add the equivalent of

        "{workdir}/out/target/product/panda/*.tar.bz2",                            
        "{workdir}/out/target/product/panda/tests/*.zip",

to the upload_files?

Would the product be 'generic' ?
Assignee: nobody → aki
Attachment #754937 - Flags: review?(jgriffin) → review+
(In reply to Aki Sasaki [:aki] from comment #5)
> Comment on attachment 754937 [details] [diff] [review]
> add package-tests to the build.sh targets for emulator
> 
> Hm, should I add the equivalent of
> 
>         "{workdir}/out/target/product/panda/*.tar.bz2",                     
> 
>         "{workdir}/out/target/product/panda/tests/*.zip",
> 
> to the upload_files?
> 
> Would the product be 'generic' ?

Yes, and yes.
Attached patch also uploadSplinter Review
Attachment #754937 - Attachment is obsolete: true
Attachment #754956 - Flags: review?(jgriffin)
Comment on attachment 754956 [details] [diff] [review]
also upload

Review of attachment 754956 [details] [diff] [review]:
-----------------------------------------------------------------

There are currently no *.tar.bz2 files at "{workdir}/out/target/product/generic/*.tar.bz2", but it's nice future-proofing to include this, as long as the lack of files there won't cause any errors at upload time.
Attachment #754956 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/d3a809d08cc9
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [leave open]
Are these builds the "mozilla-*-generic" ones on pvtbuilds? If so I'm seeing gaia-tests.zip there but no tests.zip (i.e the regular unittests).
Me too. I'm wondering if that's dependent on bug 876818.
Yes, it's dependent on bug 876818.
Sendchange from the full emulator builds.
Attachment #757751 - Flags: review?(catlee)
(In reply to Aki Sasaki [:aki] from comment #15)
> Woot,
> https://pvtbuilds.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-
> central-generic/20130603144916/b2g-24.0a1.en-US.android-arm.tests.zip
> 
> Now for the sendchange.

\o/
Attachment #757751 - Flags: review?(catlee) → review+
Comment on attachment 757751 [details] [diff] [review]
emulator sendchange

https://hg.mozilla.org/build/mozharness/rev/512c3dd17546
Merged to production.
Attachment #757751 - Flags: checked-in+
Once this is live on all branches, I believe we can shut off the "B2G Arm opt" builds.

How about debug? Should we do debug emulator builds?
I would guess yes, debug emu builds.
Yes, we're running debug emulator tests on cedar and mozilla-b2g18.
Copy/paste: /tools/buildbot/bin/buildbot sendchange --master buildbot-master36.build.mozilla.org:9301 --username sendchange-unittest --branch mozilla-inbound-b2g_emulator-opt-unittest -r c82c44986cc7e3900d7752acd3c2e0f9e645d317 --username trev.saunders@gmail.com --comments "bug 873622 - remove nsScriptSecurityManager::sXPConnect r=bholley" --property builduid:cc28f1276c434817aa89b54c9b052d46 --property buildid:20130604165417 --property pgo_build:False http://pvtbuilds.pvt.build.mozilla.org//pub/mozilla.org/b2g/tinderbox-builds/mozilla-inbound-generic/20130604165417/emulator.tar.gz http://pvtbuilds.pvt.build.mozilla.org//pub/mozilla.org/b2g/tinderbox-builds/mozilla-inbound-generic/20130604165417/b2g-24.0a1.en-US.android-arm.tests.zip

Awesome.
Blocks: 880084
This also creates debug testers, even though there aren't yet debug builders.
Attachment #762385 - Flags: review?(rail)
Attachment #762386 - Flags: review?(rail)
I'll review the patches tomorrow, but from I see now I can say that you still need puppet patches for the new platforms (for masters).
It looks like we're getting the ics_armv7_gecko builds debug via mozconfig: |ac_add_options --enable-debug|

What's the equivalent in build.sh ?  Afaict there are no mozconfigs involved.
Attached patch puppetSplinter Review
Attachment #762427 - Flags: review?(rail)
Attached patch puppet-manifestsSplinter Review
good catch.
Attachment #762428 - Flags: review?(rail)
(In reply to Aki Sasaki [:aki] from comment #26)
> It looks like we're getting the ics_armv7_gecko builds debug via mozconfig:
> |ac_add_options --enable-debug|
> 
> What's the equivalent in build.sh ?  Afaict there are no mozconfigs involved.

build.sh uses a mozconfig from gonk-misc/default-gecko-config.  If B2G_DEBUG is defined in the build's environment, it will add --enable-debug to the config.  See default-gecko-config for other relevant variables.
Attachment #762385 - Flags: review?(rail) → review+
Attachment #762386 - Flags: review?(rail) → review+
Comment on attachment 762428 [details] [diff] [review]
puppet-manifests

IIRC, we switched to PuppetAgain on all related masters, but it won't hurt.
Attachment #762428 - Flags: review?(rail) → review+
Attachment #762427 - Flags: review?(rail) → review+
Comment on attachment 762386 [details] [diff] [review]
production-masters.json update

http://hg.mozilla.org/build/tools/rev/b4a1c2549daa
Attachment #762386 - Flags: checked-in+
Comment on attachment 762385 [details] [diff] [review]
create emulator testers on cedar with --no-update

http://hg.mozilla.org/build/buildbot-configs/rev/4baa1e984601
Attachment #762385 - Flags: checked-in+
This is in production.
Depends on: 883940
Attachment #763886 - Attachment is obsolete: true
Attachment #764001 - Flags: review?(catlee)
Attachment #763887 - Attachment description: (mozharness) [needs testing] --debug and B2G_DEBUG → (mozharness) --debug and B2G_DEBUG
Attachment #763887 - Flags: review?(catlee)
Attachment #764001 - Flags: review?(catlee) → review+
Attachment #763887 - Flags: review?(catlee) → review+
Comment on attachment 763887 [details] [diff] [review]
(mozharness) --debug and B2G_DEBUG

https://hg.mozilla.org/build/mozharness/rev/0be5b453d885
Attachment #763887 - Flags: checked-in+
Now that both parts of bug 880084 have landed, I retriggered a cedar job, but get:
https://tbpl.mozilla.org/php/getParsedLog.php?id=24326891&tree=Cedar
{
02:54:59     INFO - #####
02:54:59     INFO - ##### Running install step.
02:54:59     INFO - #####
02:54:59     INFO - Getting output from command: ['/home/cltbld/talos-slave/test/build/venv/bin/pip', 'freeze']
02:54:59     INFO - Copy/paste: /home/cltbld/talos-slave/test/build/venv/bin/pip freeze
02:54:59     INFO - Reading from file tmpfile_stdout
02:54:59     INFO - retry: Calling <built-in function remove> with args: ('tmpfile_stderr',), kwargs: {}, attempt #1
02:54:59     INFO - retry: Calling <built-in function remove> with args: ('tmpfile_stdout',), kwargs: {}, attempt #1
02:54:59     INFO - Detecting whether we're running mozinstall >=1.0...
02:54:59     INFO - Getting output from command: ['/home/cltbld/talos-slave/test/build/venv/bin/mozinstall', '--app', 'b2g', '-h']
02:54:59     INFO - Copy/paste: /home/cltbld/talos-slave/test/build/venv/bin/mozinstall --app b2g -h
02:54:59     INFO - Reading from file tmpfile_stdout
02:54:59     INFO - Output received:
02:54:59     INFO -  Usage: mozinstall [options] installer
02:54:59     INFO -  Options:
02:54:59     INFO -    -h, --help            show this help message and exit
02:54:59     INFO -    -d DEST, --destination=DEST
02:54:59     INFO -                          Directory to install application into. [default:
02:54:59     INFO -                          "/home/cltbld/talos-slave/test"]
02:54:59     INFO -    --app=APP             Application being installed. [default: firefox]
02:54:59     INFO - retry: Calling <built-in function remove> with args: ('tmpfile_stderr',), kwargs: {}, attempt #1
02:54:59     INFO - retry: Calling <built-in function remove> with args: ('tmpfile_stdout',), kwargs: {}, attempt #1
02:54:59     INFO - mkdir: /home/cltbld/talos-slave/test/build/application
02:54:59     INFO - Getting output from command: ['/home/cltbld/talos-slave/test/build/venv/bin/mozinstall', '--app', 'b2g', '/home/cltbld/talos-slave/test/build/emulator.tar.gz', '--destination', '/home/cltbld/talos-slave/test/build/application']
02:54:59     INFO - Copy/paste: /home/cltbld/talos-slave/test/build/venv/bin/mozinstall --app b2g /home/cltbld/talos-slave/test/build/emulator.tar.gz --destination /home/cltbld/talos-slave/test/build/application
02:55:07    ERROR - Errors received:
02:55:07     INFO - Reading from file tmpfile_stderr
02:55:07    ERROR -  Traceback (most recent call last):
02:55:07    ERROR -    File "/home/cltbld/talos-slave/test/build/venv/bin/mozinstall", line 9, in <module>
02:55:07    ERROR -      load_entry_point('mozInstall==1.6', 'console_scripts', 'mozinstall')()
02:55:07    ERROR -    File "/home/cltbld/talos-slave/test/build/venv/lib/python2.6/site-packages/mozinstall/mozinstall.py", line 300, in install_cli
02:55:07    ERROR -      binary = get_binary(install_path, app_name=options.app)
02:55:07    ERROR -    File "/home/cltbld/talos-slave/test/build/venv/lib/python2.6/site-packages/mozinstall/mozinstall.py", line 87, in get_binary
02:55:07    ERROR -      raise InvalidBinary('"%s" does not contain a valid binary.' % path)
02:55:07    ERROR -  mozinstall.mozinstall.InvalidBinary: "/home/cltbld/talos-slave/test/build/application/b2g-distro" does not contain a valid binary.
02:55:07     INFO - retry: Calling <built-in function remove> with args: ('tmpfile_stderr',), kwargs: {}, attempt #1
02:55:07     INFO - retry: Calling <built-in function remove> with args: ('tmpfile_stdout',), kwargs: {}, attempt #1
02:55:07    ERROR - Return code: 1
02:55:07    FATAL - Halting on failure while running ['/home/cltbld/talos-slave/test/build/venv/bin/mozinstall', '--app', 'b2g', '/home/cltbld/talos-slave/test/build/emulator.tar.gz', '--destination', '/home/cltbld/talos-slave/test/build/application']
}
I filed bug 884828 for this. We could fix this via mozharness config, but I believe mozinstall could use a bit of love anyway.
Depends on: 884828
We can fix this directly in the mozharness script.  The root of the issue is that emulator.tar.gz doesn't need to be "mozinstalled", it just needs to be extracted.  Do we want mozinstall to handle this case natively?

In either case, I'll patch the mozharness script today, since that's a faster fix.
Tested locally this time.
Attachment #764841 - Flags: review?(ahalberstadt)
Assignee: aki → jgriffin
Didn't mean to re-assign this; bzexport did it automatically.
Assignee: jgriffin → aki
Comment on attachment 764841 [details] [diff] [review]
Don't call mozinstall for the emulator,

Review of attachment 764841 [details] [diff] [review]:
-----------------------------------------------------------------

I didn't realize there was a separate config for "update runs"
Attachment #764841 - Flags: review?(ahalberstadt) → review+
No longer depends on: 884828
Comment on attachment 764841 [details] [diff] [review]
Don't call mozinstall for the emulator,

https://hg.mozilla.org/build/mozharness/rev/f36fa35e6638
Attachment #764841 - Flags: checked-in+
The mozharness portions have been merged to production.
There's a new failure because we are still specifying --gecko-path on the command line even for non update builds: https://hg.mozilla.org/build/mozharness/file/2cc1e4faa57d/configs/b2g/emulator_automation_config.py#l44

I think it might be acceptable to remove --gecko-path from the config file and only append it for update tests in the script. Doing so will mean we can't do custom try pushes with it, but I don't think anyone would want to anyway.
We'll want to retain that ability in the short term, so we can run try runs using a pre-built x86 emulator (bug 753928).  I'll have another pack for the gecko_path problem shortly.
Comment on attachment 764890 [details] [diff] [review]
Strip 'gecko-path' from test options if not installing a new gecko,

Review of attachment 764890 [details] [diff] [review]:
-----------------------------------------------------------------

I guess this is fine. Wouldn't you still be able to do try pushes with an x86 emulator though? The mozharness script should still set up --gecko-path properly, the only thing you wouldn't be able to do is specify a *custom* --gecko-path
Attachment #764890 - Flags: review?(ahalberstadt) → review+
Per irc discussion jgriffin and I decided this would be a bit cleaner
Attachment #764890 - Attachment is obsolete: true
Attachment #764900 - Flags: review?(jgriffin)
Attachment #764900 - Flags: review?(jgriffin) → review+
Comment on attachment 764900 [details] [diff] [review]
only append --gecko-path if update_files is set

https://hg.mozilla.org/build/mozharness/rev/d06bffd0b1eb
Attachment #764900 - Flags: checked-in+
There's another problem now that doesn't look mozharness related. I think we should resolve this bug and file new bugs for the next set of issues we come across. Feel free to re-open if you disagree.
Status: NEW → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Depends on: 885375
Blocks: 885456
There was a reconfig, so the debug builders should show up now.
Whiteboard: [leave open]
Product: mozilla.org → Release Engineering
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: