Closed
Bug 560911
Opened 14 years ago
Closed 14 years ago
add android build steps to the build environment
Categories
(Release Engineering :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bear, Assigned: bear)
References
Details
(Whiteboard: [android][q2goal])
Attachments
(1 file, 20 obsolete files)
2.96 KB,
patch
|
mozilla
:
review+
mozilla
:
checked-in+
|
Details | Diff | Splinter Review |
Create the factories and staging config items to start producing binaries
Assignee | ||
Updated•14 years ago
|
Blocks: releng-android
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → bear
Attachment #440820 -
Flags: feedback?(aki)
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #440821 -
Flags: feedback?(aki)
Comment 3•14 years ago
|
||
Comment on attachment 440820 [details] [diff] [review] [WIP] add android to build steps >diff --git a/mobile-rw/config-production.py b/mobile-rw/config-production.py We don't have any tests for android yet, and they're going to be different from non-SUT tests, so don't touch mobile-rw*/ or mobile*/ at all. The builders should only be in mozilla2*/ >diff --git a/mozilla2-staging/config.py b/mozilla2-staging/config.py >--- a/mozilla2-staging/config.py >+++ b/mozilla2-staging/config.py >@@ -191,17 +191,17 @@ PLATFORM_VARS = { > 'CHOWN_ROOT': '~/bin/chown_root', > 'CHOWN_REVERT': '~/bin/chown_revert', > }, > 'enable_opt_unittests': True, > 'enable_checktests': True, > 'talos_masters': GLOBAL_VARS['talos_masters'], > }, > 'macosx64': { >- 'base_name': 'OS X 10.6 %(branch)s', >+ 'base_name': 'OS X 10.6.2 %(branch)s', Is this an intentional change? >+MOBILE_BRANCHES['mobile-trunk']['platforms']['android-r7']['base_name'] = 'Android Fennec Desktop mozilla-central' "Desktop" here means non-mobile platform, e.g. desktop OSX. Probably should be "Android Fennec mozilla-central" buildsBeforeReboot=pf['builds_before_reboot'], >+ sb_target=pf.get('sb_target', ''), #BEAR Not sure why you have a scratchbox target if you aren't building in scratchbox ? >+ mobileObjdir=pf.get('mobile_objdir', 'mobile'), >+ xulrunnerObjdir=pf.get('xulrunner_objdir', 'xulrunner'), Let's not use these. Remove... let's not build xulrunner first. >+ packageGlobList=pf.get('glob_list', ['mobile/dist/*.tar.bz2', >+ 'xulrunner/dist/*.tar.bz2']), >+ debs=pf.get('debs', False), Your upload list should probably be something like dist/*.apk right? Where is that built? Why are we referencing debs here? >+ mobile_nightly_factory = MaemoBuildFactory( You probably want to use the same Android factory for your nightlies, but have clobber/nightly set to True.
Comment 4•14 years ago
|
||
Comment on attachment 440821 [details] [diff] [review] [WIP] add android to build steps >+ elif platform.startswith("android"): >+ packageFilename = '*.firefox.apk' What is the package called at the end? >+# Largely built from PackagedUnittests >+class AndroidUnittestFactory(BuildFactory): This is most likely invalid. This bug is about the builds, not unit tests... You probably don't have to touch mobiletestfactory.py at all on this patch. Where is the AndroidBuildFactory you imported in the previous patch? I doubt these patches pass checkconfig, correct?
Attachment #440821 -
Flags: feedback?(aki) → feedback-
Updated•14 years ago
|
Attachment #440820 -
Flags: feedback?(aki) → feedback-
Updated•14 years ago
|
Whiteboard: [android][q2goal]
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #441832 -
Flags: feedback?(aki)
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #440820 -
Attachment is obsolete: true
Attachment #440821 -
Attachment is obsolete: true
Attachment #441832 -
Attachment is obsolete: true
Attachment #441833 -
Flags: feedback?(aki)
Attachment #441832 -
Flags: feedback?(aki)
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #441834 -
Flags: feedback?(aki)
Comment 8•14 years ago
|
||
Comment on attachment 441833 [details] [diff] [review] [WIP] add android to build steps This looks good; pretty much a straight copy of the MobileDesktopBuildFactory afaict. Something you might want to do is set some defaults in this line: def __init__(self, uploadPlatform=None, **kwargs): like def __init__(self, uploadPlatform='linux', packageGlobList=['dist/*.apk'], **kwargs): ... overridable, but sensible defaults.
Attachment #441833 -
Flags: feedback?(aki) → feedback+
Comment 9•14 years ago
|
||
Comment on attachment 441834 [details] [diff] [review] [WIP] add Android to buildbot-configs >+MOBILE_BRANCHES['mobile-trunk']['platforms']['android-r7']['mozconfig'] = 'android/mozilla-central/nightly' This is good, but you didn't actually create one. Or if you did, you didn't |hg add mozilla2-staging/android| so it shows up in the patch. Also, I'm wondering if it should be mobile-browser rather than mozilla-central, since mozilla-central might imply Firefox desktop rather than Fennec mobile. >+MOBILE_BRANCHES['mobile-trunk']['l10n_platforms']['android-r7'] = 'linux' This line will actually start triggering repacks for Android, which we definitely aren't ready for. Either comment this out or remove it til we are ready :) >diff --git a/mozilla2-staging/mobile_master.py b/mozilla2-staging/mobile_master.py >--- a/mozilla2-staging/mobile_master.py >+++ b/mozilla2-staging/mobile_master.py >+ 'android-r7': MOBILE_SLAVES['android-r7'], This is the only line you added to mobile_master.py, which means you didn't a) import AndroidBuildFactory b) create an Android mobile_dep_factory or mobile_nightly_factory (search for MaemoBuildFactory to see how that's done for Maemo, but lean towards the config settings for MobileDesktop). This is why you're getting the test-masters exception; it's finding android in mobile_config and putting it in the scheduler, but not creating a builder for it in the for loop starting at line 168. This isn't too far away though -- once you add those you'll be able to checkconfig, and then we'll get you a staging env to test a build or ten on :D
Attachment #441834 -
Flags: feedback?(aki) → feedback-
Assignee | ||
Comment 10•14 years ago
|
||
(In reply to comment #8) > (From update of attachment 441833 [details] [diff] [review]) > This looks good; pretty much a straight copy of the MobileDesktopBuildFactory > afaict. yep - it is an exact copy to be honest... > Something you might want to do is set some defaults in this line: > > def __init__(self, uploadPlatform=None, **kwargs): > > like > > def __init__(self, uploadPlatform='linux', packageGlobList=['dist/*.apk'], > **kwargs): > > ... overridable, but sensible defaults. I'll add some now
Comment 11•14 years ago
|
||
(In reply to comment #10) > (In reply to comment #8) > > (From update of attachment 441833 [details] [diff] [review] [details]) > > This looks good; pretty much a straight copy of the MobileDesktopBuildFactory > > afaict. > > yep - it is an exact copy to be honest... if it is an exact copy could we rename MobileDesktopBuildFactory to MobileGeneralBuildFactory or something similar and avoid the duplication?
Comment 12•14 years ago
|
||
(In reply to comment #11) > if it is an exact copy could we rename MobileDesktopBuildFactory to > MobileGeneralBuildFactory or something similar and avoid the duplication? Pretty sure we're going to be adding some Android signing steps at some point.
Comment 13•14 years ago
|
||
when we do that we could subclass MobileGeneralBuildFactory to do the special signing steps.
Assignee | ||
Comment 14•14 years ago
|
||
Once I figure out the differences I'll poke you John to work on the refactoring.
Assignee | ||
Comment 15•14 years ago
|
||
Attachment #441834 -
Attachment is obsolete: true
Attachment #441924 -
Flags: feedback?(aki)
Assignee | ||
Comment 16•14 years ago
|
||
Attachment #441833 -
Attachment is obsolete: true
Attachment #441925 -
Flags: feedback?(aki)
Assignee | ||
Comment 17•14 years ago
|
||
Attachment #441924 -
Attachment is obsolete: true
Attachment #441933 -
Flags: review?(aki)
Attachment #441924 -
Flags: feedback?(aki)
Assignee | ||
Comment 18•14 years ago
|
||
Attachment #441933 -
Attachment is obsolete: true
Attachment #441940 -
Flags: feedback?(aki)
Attachment #441933 -
Flags: review?(aki)
Comment 19•14 years ago
|
||
Comment on attachment 441940 [details] [diff] [review] [WIP] add Android to buildbot-configs This looks ready for testing.
Attachment #441940 -
Flags: feedback?(aki) → feedback+
Updated•14 years ago
|
Attachment #441925 -
Flags: feedback?(aki) → feedback+
Assignee | ||
Comment 20•14 years ago
|
||
build is showing all green but with two work arounds: 1 - make package is not in place so hacked steps to run manually 2 - make upload is hacked to handle location of apk build from 1 above
Status: NEW → ASSIGNED
Comment 21•14 years ago
|
||
We should be fixing stuff like "make package" and "make upload" in the build system if they're broken. I see you've already filed a bug on "make package", please file one on "make upload" too, if you need that to work.
Assignee | ||
Comment 22•14 years ago
|
||
(In reply to comment #21) > We should be fixing stuff like "make package" and "make upload" in the build > system if they're broken. I see you've already filed a bug on "make package", > please file one on "make upload" too, if you need that to work. I'm not sure if a "make upload" bug will be required if they "make package" work follows the normal patterns
Assignee | ||
Comment 23•14 years ago
|
||
required changes to enable Android builds, albeit with some work-arounds to handle "make package" and "make upload" issues
Attachment #441925 -
Attachment is obsolete: true
Attachment #442805 -
Flags: review?(aki)
Assignee | ||
Comment 24•14 years ago
|
||
changes required to enable Android builds
Attachment #441940 -
Attachment is obsolete: true
Attachment #442806 -
Flags: review?(aki)
Assignee | ||
Comment 25•14 years ago
|
||
remove --disable-tests
Attachment #442806 -
Attachment is obsolete: true
Attachment #442808 -
Flags: review?(aki)
Attachment #442806 -
Flags: review?(aki)
Comment 26•14 years ago
|
||
Comment on attachment 442806 [details] [diff] [review] add Android to buildbot-configs >+ac_add_options --disable-tests We are going to need tests if we're going to be running unit tests soon. You can enable tests by removing this line (it's on by default) and running the make package-tests step (assuming this works, which might not be a good assumption). If make package-tests doesn't work, we need to file a bug that blocks the unit tests/talos bug 561908. > ### mozilla-central > MOBILE_BRANCHES['mobile-trunk']['main_config'] = config.BRANCHES['mozilla-central'] >-MOBILE_BRANCHES['mobile-trunk']['repo_path'] = 'mozilla-central' >+MOBILE_BRANCHES['mobile-trunk']['repo_path'] = 'users/vladimir_mozilla.com/mozilla-droid'#'mozilla-central' >+MOBILE_BRANCHES['mobile-trunk']['revision'] = 'android' #required only for android staging build #hackalert Ok, this was good for your single build, but now you're saying *all* mobile trunk builds are going to use vlad's repo instead of m-c. Grounds for r- right here. So you need to either: a) set repo_path at the platform level for Android, and check for it in mobile_master.py when you create the AndroidBuildFactory builders, or b) Create a MOBILE_BRANCHES['android-trunk'] that only has android as a platform. Both of these are workarounds until the user repo can land in m-c. >+ elif 'android' in platform: >+ mobile_dep_factory = AndroidBuildFactory( >+ hgHost=mainConfig['hghost'], >+ repoPath=branch['repo_path'], This line is what you would change ^^, potentially to pf.get('repo_path', branch['repo_path']) >+ packageGlobList=pf.get('glob_list', ['dist/*.apk',]), You're specifying 'dist/*.apk' here as your packageGlobList, then hardcoding '../embedding/android/fennec.apk' in your actual upload step. Same nits for the nightly builder. Also, you're missing the production changes (mozilla2/).
Attachment #442806 -
Flags: review-
Comment 27•14 years ago
|
||
Comment on attachment 442808 [details] [diff] [review] add Android to buildbot-configs Same as the previous patch with the following changes: * you have tests enabled (good) * i don't think you've tested that it works with tests enabled
Attachment #442808 -
Flags: review?(aki) → review-
Comment 28•14 years ago
|
||
Comment on attachment 442805 [details] [diff] [review] add android to build steps >+class AndroidBuildFactory(MobileBuildFactory): >+ def __init__(self, uploadPlatform='linux', >+ packageGlobList=['embedding/android/*.apk'], **kwargs): You did update the packageGlobList :) But only in one location, and then you didn't use self.packageGlob in the upload step. >+ def addPackageSteps(self): >+ if self.env is None: >+ envJava = {} >+ else: >+ envJava = self.env.copy() >+ >+ envJava['PATH'] = '/tools/jdk6/bin:%s' % envJava.get('PATH', os.environ['PATH']) Ugh. Could you add a comment that references the 'make package' bug # and that this ugliness will go away once that's fixed? >+ #self.addStep(ShellCommand, >+ # name='make_pkg_tests', >+ # command=['make', 'package-tests'], >+ # workdir='%s/%s/%s' % (self.baseWorkDir, >+ # self.branchName, self.objdir), >+ # env=self.env, >+ # haltOnFailure=True, >+ #) Again, we should see if make package-tests works. If yes: do it, and upload the tests (this will require a packageGlob update) If no: file another bug since we need 'make package-tests' for unit testing. >+ >+ def addUploadSteps(self, platform): >+ self.addStep(SetProperty, >+ name="get_buildid", >+ command=['python', 'config/printconfigsetting.py', >+ 'dist/bin/application.ini', >+ 'App', 'BuildID'], >+ property='buildid', >+ workdir='%s/%s' % (self.baseWorkDir, self.branchName), >+ description=['getting', 'buildid'], >+ descriptionDone=['got', 'buildid'] >+ ) >+ self.addStep(MozillaStageUpload, >+ name="upload_to_stage", >+ description=['upload','to','stage'], >+ objdir=self.branchName, >+ username=self.stageUsername, >+ milestone=self.baseUploadDir, >+ remoteHost=self.stageServer, >+ remoteBasePath=self.stageBasePath, >+ platform=platform, >+ group=self.stageGroup, >+ packageGlob='../embedding/android/fennec.apk', >+ sshKey=self.stageSshKey, >+ uploadCompleteMar=False, >+ releaseToLatest=self.nightly, >+ releaseToDated=self.nightly, >+ releaseToTinderboxBuilds=True, >+ tinderboxBuildsDir=self.baseUploadDir, >+ remoteCandidatesPath=self.stageBasePath, >+ dependToDated=True, >+ workdir='%s/%s/%s' % (self.baseWorkDir, self.branchName, >+ self.objdir) >+ ) Hm, did you actually have to override this, or did you just have to change your packageGlob to be accurate? (Did you actually change anything else?) Also -- a missing point on the configs -- turn off the triggers. As in set the builder trigger configs to False.
Attachment #442805 -
Flags: review?(aki) → review-
Comment 29•14 years ago
|
||
We've got the bugs, but I think we should go ahead with new patches with no package-tests... we shouldn't block nightlies on those.
Assignee | ||
Comment 30•14 years ago
|
||
Attachment #442805 -
Attachment is obsolete: true
Attachment #443119 -
Flags: review?
Assignee | ||
Comment 31•14 years ago
|
||
Attachment #442808 -
Attachment is obsolete: true
Attachment #443120 -
Flags: review?(aki)
Assignee | ||
Updated•14 years ago
|
Attachment #443119 -
Flags: review? → review?(aki)
Comment 32•14 years ago
|
||
Comment on attachment 443119 [details] [diff] [review] add android to build steps >+class AndroidBuildFactory(MobileBuildFactory): >+ def __init__(self, uploadPlatform='linux', >+ packageGlobList=['dist/*.apk',], **kwargs): I thought this was ../embedding/android/*.apk, and dist/*.apk failed. No? >+ self.addStep(ShellCommand, >+ name='make_pkg_tests', >+ command=['make', 'package-tests'], >+ workdir='%s/%s/%s' % (self.baseWorkDir, >+ self.branchName, self.objdir), >+ env=self.env, >+ haltOnFailure=True, >+ ) I thought this failed. Please remove; we want a working Android build.
Attachment #443119 -
Flags: review?(aki) → review-
Comment 33•14 years ago
|
||
Comment on attachment 443120 [details] [diff] [review] add Android to buildbot-configs This appears to be the factory patch, not the configs patch.
Attachment #443120 -
Flags: review?(aki)
Assignee | ||
Comment 34•14 years ago
|
||
mozilla2-staging and mozilla2 changes
Attachment #443120 -
Attachment is obsolete: true
Attachment #443128 -
Flags: review?(aki)
Assignee | ||
Comment 35•14 years ago
|
||
changes to factory for Android with make package and make package-tests work-arounds and also a hack to allow upload step behave until the package bugs are fixed
Attachment #443119 -
Attachment is obsolete: true
Attachment #443129 -
Flags: review?(aki)
Comment 36•14 years ago
|
||
Comment on attachment 443129 [details] [diff] [review] add android to build steps >+ def addUploadSteps(self, platform): >+ self.addStep(SetProperty, >+ name="get_buildid", >+ command=['python', 'config/printconfigsetting.py', >+ 'dist/bin/application.ini', >+ 'App', 'BuildID'], >+ property='buildid', >+ workdir='%s/%s' % (self.baseWorkDir, self.branchName), >+ description=['getting', 'buildid'], >+ descriptionDone=['got', 'buildid'] >+ ) >+ self.addStep(MozillaStageUpload, We're very close. Three things: 1) pet peeve nit: trailing whitespace after the descriptionDone. 2) Looks like the only reason you need to override addUploadSteps is you're not setting an objdir, correct? I'd very much like to see this be an objdir build... worth a shot in staging while we're at it. 3) If that works, we can not override addUploadSteps at all, unless I'm missing something.
Comment 37•14 years ago
|
||
Comment on attachment 443128 [details] [diff] [review] add Android to buildbot-configs >diff --git a/mozilla2-staging/android/mobile-browser/nightly/mozconfig b/mozilla2-staging/android/mobile-browser/nightly/mozconfig >new file mode 100644 >--- /dev/null >+++ b/mozilla2-staging/android/mobile-browser/nightly/mozconfig >@@ -0,0 +1,41 @@ >+mk_add_options JAVAC=/tools/jdk6/bin/javac objdir... but you know that :) >+ nightlyWorkDir = pf['base_workdir'] + '-nightly' I think this ends up with a android-trunk-nightly/build-nightly, which I'd rather not have. A lot of our clobbery-goodness assumes a directory of "build" and anything else requires additional hackery. Noticed this b/c I logged into linux-slave17 to doublecheck apk locations. >+ nightlyWorkDir = pf['base_workdir'] + '-nightly' same here. >+ triggerBuilds = True, >+ triggeredSchedulers=triggeredSchedulers, We don't have any triggeredBuilds or triggeredSchedulers yet, so these should probably be False. That's something you want to watch out for -- unless there's something you explicitly want turned off in staging but on in production, your production/staging configs should be the same. But again, very very close. Objdir is the main thing, and that just came up today.
Attachment #443128 -
Flags: review?(aki) → review-
Assignee | ||
Comment 38•14 years ago
|
||
Attachment #443128 -
Attachment is obsolete: true
Attachment #443382 -
Flags: review?(aki)
Assignee | ||
Comment 39•14 years ago
|
||
Attachment #443129 -
Attachment is obsolete: true
Attachment #443384 -
Flags: review?(aki)
Attachment #443129 -
Flags: review?(aki)
Assignee | ||
Comment 40•14 years ago
|
||
Attachment #443382 -
Attachment is obsolete: true
Attachment #443445 -
Flags: review?(aki)
Attachment #443382 -
Flags: review?(aki)
Assignee | ||
Comment 41•14 years ago
|
||
Attachment #443384 -
Attachment is obsolete: true
Attachment #443446 -
Flags: review?(aki)
Attachment #443384 -
Flags: review?(aki)
Assignee | ||
Comment 42•14 years ago
|
||
helps if you s/android/android2/ in all of the spots
Attachment #443445 -
Attachment is obsolete: true
Attachment #443465 -
Flags: review?(aki)
Attachment #443445 -
Flags: review?(aki)
Updated•14 years ago
|
Attachment #443446 -
Flags: review?(aki) → review+
Updated•14 years ago
|
Attachment #443465 -
Flags: review?(aki) → review+
Comment 43•14 years ago
|
||
Comment on attachment 443446 [details] [diff] [review] add android to build steps http://hg.mozilla.org/build/buildbotcustom/rev/819ba16f21c8
Attachment #443446 -
Flags: checked-in+
Comment 44•14 years ago
|
||
Comment on attachment 443465 [details] [diff] [review] add Android to buildbot-configs http://hg.mozilla.org/build/buildbot-configs/rev/f3bf0ac7bcee (staging only)
Comment 45•14 years ago
|
||
Bear: if you're hitting broken compilations, you can temporarily change your android2 mozRevision to something known&good (mobileRevision might work too, for m-b)
Assignee | ||
Updated•14 years ago
|
Comment 46•14 years ago
|
||
I believe that: - attachment 443465 [details] [diff] [review] is obsoleted by bug 562842 - this bug is fixed
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Attachment #443465 -
Attachment is obsolete: true
Updated•11 years ago
|
Product: mozilla.org → Release Engineering
You need to log in
before you can comment on or make changes to this bug.
Description
•