Last Comment Bug 455168 - Add test ssl server certificate re-generation to tools phase in build/pgo
: Add test ssl server certificate re-generation to tools phase in build/pgo
Status: RESOLVED FIXED
:
Product: Testing
Classification: Components
Component: Mochitest (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Honza Bambas (:mayhemer)
:
Mentors:
Depends on: 428009
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-13 13:53 PDT by Honza Bambas (:mayhemer)
Modified: 2008-09-28 13:37 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Possible patch, v1 (1.74 KB, patch)
2008-09-15 06:21 PDT, Honza Bambas (:mayhemer)
no flags Details | Diff | Review
v2 [Checkin: Comment 6] (522 bytes, patch)
2008-09-18 10:28 PDT, Honza Bambas (:mayhemer)
ted: review+
Details | Diff | Review

Description Honza Bambas (:mayhemer) 2008-09-13 13:53:51 PDT
There is new target 'tools' that runs after export and libs. Use it could make update of mochitest ssl certificates more easy because now modification to the list of hosts and cert bindings made in build/pgo needs, to be reflected, build of testing/mochitest (quit illogical when build/pgo is not a platform just for mochitest, but there were no better way).
Comment 1 Honza Bambas (:mayhemer) 2008-09-15 06:21:11 PDT
Created attachment 338636 [details] [diff] [review]
Possible patch, v1

This fix runs tools phase on all tiers after all tiers passed export,libs,export,libs.. phases when build is performed by 'make -f client.mk build'. This allows move of ssl mochitest cert generation to tools phase in build/pgo where it belongs but also has effect like a build of XPCOM tests that would not normally be built as part of the full build.
Comment 2 Honza Bambas (:mayhemer) 2008-09-17 04:06:57 PDT
Actually, certificate regeneration must be made as part of build/pgo module and of testing/mochitest as well.

build/pgo becuase xpc-shell tests use the server as well and it doesn't make sense to force people wanting to work just with xpc-shell tests to rebuild mochitest to reflect changes just in build/pgo/server-locations.txt file.

testing/mochitest because mochitest copies the server-locations.txt file to _test/testing/mochitest and its change is not reflected by only build of build/pgo module.

So, I would suggest following: add certificate generation to build/pgo/Makefile during tools phase and leave everything else unchanged. 

This works in all cases: complete rebuild, reflect changes for xpc-shell tests, reflect changes for mochitest. Certificate is generated during full build as part of mochitest build (as is now), during manual rebuild of build/pgo (now tools phase is invoked) and during mochitest rebuild (as it is now).

Do you agree?
Comment 3 Ted Mielczarek [:ted.mielczarek] 2008-09-17 06:40:52 PDT
Sounds reasonable.
Comment 4 Honza Bambas (:mayhemer) 2008-09-18 10:28:51 PDT
Created attachment 339279 [details] [diff] [review]
v2
[Checkin: Comment 6]

Actually, this patch is correct according to the last two comments.
Comment 5 Ted Mielczarek [:ted.mielczarek] 2008-09-23 10:21:26 PDT
(In reply to comment #2)
> build/pgo becuase xpc-shell tests use the server as well and it doesn't make
> sense to force people wanting to work just with xpc-shell tests to rebuild
> mochitest to reflect changes just in build/pgo/server-locations.txt file.

Actually, xpcshell tests can't use ssltunnel currently. They can use the httpd.js server, but they have to start it manually.

The more I think about this, the more I want to rearrange some parts of the source to make things clearer.
Comment 6 Serge Gautherie (:sgautherie) 2008-09-28 13:36:34 PDT
Comment on attachment 339279 [details] [diff] [review]
v2
[Checkin: Comment 6]

http://hg.mozilla.org/mozilla-central/rev/7265ecfe2a0e

Note You need to log in before you can comment on or make changes to this bug.