Closed
Bug 1475503
Opened 6 years ago
Closed 3 years ago
Stop using preprocessor in reftest.jsm
Categories
(Testing :: Reftest, enhancement)
Testing
Reftest
Tracking
(firefox95 fixed)
RESOLVED
FIXED
95 Branch
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: marco, Assigned: ssummar, Mentored)
References
Details
(Keywords: good-first-bug)
Attachments
(4 files, 1 obsolete file)
Rebuilding just to pick up changes in reftest.jsm is painful. The preprocessor is only used in two places, perhaps we can stop using it. > #ifdef MOZ_ENABLE_SKIA_PDF We can move this to AppConstants. > #ifdef XP_MACOSX > try { > var dock = Cc["@mozilla.org/widget/macdocksupport;1"].getService(Ci.nsIMacDockSupport); > dock.activateApplication(true); > } catch(ex) { > } > #endif We don't need this, since we're eating the exception anyways.
Comment 1•6 years ago
|
||
+1 Though fyi you can run |./mach build layout/tools/reftest| (which takes ~2 seconds) in case you weren't already.
Reporter | ||
Updated•6 years ago
|
Mentor: mcastelluccio
Keywords: good-first-bug
Comment 2•6 years ago
|
||
willing to take this on if you can give me a little more context
Flags: needinfo?(mcastelluccio)
Reporter | ||
Comment 3•6 years ago
|
||
(In reply to nikshepsvn from comment #2) > willing to take this on if you can give me a little more context Sure, thanks! In layout/tools/reftest/reftest.jsm, you have to remove the preprocessor usages (the ones I outlined in comment 0). To remove the first, you'll need to create a new MOZ_ENABLE_SKIA_PDF key in toolkit/modules/AppConstants.jsm (look at the file for other similar examples). The second preprocessor usage can simply be completely removed, as we have a try catch anyway, it means we won't do anything on Mac anyway. Once you're done with these two changes, you can remove the "*" before reftest.jsm in layout/tools/reftest/jar.mn, which means the preprocessor won't be used anymore for this file. Then, you can do the same treatment for layout/tools/reftest/manifest.jsm. Before and after every step, make sure you can still run a reftest. E.g. `./mach test accessible/tests/crashtests/471493.xul`. I'm going to be on PTO from tomorrow, so you can ask :ahal for review.
Flags: needinfo?(mcastelluccio)
Comment 4•6 years ago
|
||
I would like to work on this issue but can i do this on Ubuntu? As I have searched for #ifdef XP_MACOSX preprocessor in AppConstants.jsm file but didn't find that is this because I am on Ubuntu?
Comment 5•6 years ago
|
||
Oh, I got that method in reftest.jsm file. Can I start working on it now?
Comment 6•6 years ago
|
||
Hey I'm currently working on this and almost done. I
Comment 7•6 years ago
|
||
But my patch is ready and i am about to submit
Comment 8•6 years ago
|
||
Changes made and submitted the patch file
Attachment #8999326 -
Flags: review?(ahal)
Comment 9•6 years ago
|
||
Comment on attachment 8999326 [details] [diff] [review] tip.patch Apologies for the confusion here. Nikshepsvn asked first and was in the middle of working on this, so they have priority. Nikshepsvn, can you confirm that you are still planning to submit a patch? Sahil, if I don't hear back from nikshepsvn by the start of next week I'll assign the bug to you. Though fyi this patch doesn't apply cleanly and we don't want to completely remove the call to `doc.activateApplication`.
Flags: needinfo?(nikshepsvn)
Attachment #8999326 -
Flags: review?(ahal) → review-
Comment 10•6 years ago
|
||
Apologies for the confusion here, we should have set an assignee quicker. Nikshepsvn asked first and was in the middle of working on this, so he gets priority. Nikshepsvn, can you confirm that you are still planning to submit a patch? Sahil, if I don't hear back from nikshepsvn by the end of the week I'll assign the bug to you and review your patch.
Assignee: nobody → nikshepsvn
Status: NEW → ASSIGNED
Comment 11•6 years ago
|
||
Hey Andrew, How's it going! Thank you for reacognizing that I started working on this, I really appreciate it. I've mostly finished the patch but I'm outside right now so I'll test and upload it as soon as I get back home. Thanks again!
Flags: needinfo?(nikshepsvn)
Comment 12•6 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #10) > Apologies for the confusion here, we should have set an assignee quicker. > Nikshepsvn asked first and was in the middle of working on this, so he gets > priority. Nikshepsvn, can you confirm that you are still planning to submit > a patch? > > Sahil, if I don't hear back from nikshepsvn by the end of the week I'll > assign the bug to you and review your patch. Ok Andrew and sorry nikshepsvn for submitting the patch before you. I started working on patch without getting the confirmation from the mentor and submitted the patch. I apologise for that.
Reporter | ||
Comment 13•6 years ago
|
||
(In reply to nikshepsvn from comment #11) > Hey Andrew, > > How's it going! Thank you for reacognizing that I started working on this, I > really appreciate it. I've mostly finished the patch but I'm outside right > now so I'll test and upload it as soon as I get back home. Thanks again! nikshepsvn are you still working on this or should Sahil take over?
Comment 14•6 years ago
|
||
forgive me for the delay, will upload it today by 11:00PM EST. thanks for the patience btw
Comment 15•6 years ago
|
||
Attachment #9002992 -
Flags: review?(mcastelluccio)
Comment 16•6 years ago
|
||
just submitted the patch @marco, testing is buggy for my locally, but is this what you're expecting? when i try testing locally I get this message ` know you are trying to run a crashtest test. Unfortunately, I can't run those`
Flags: needinfo?(mcastelluccio)
Reporter | ||
Comment 17•6 years ago
|
||
You can use `./mach crashtest XXX` instead of `./mach test XXX`.
Flags: needinfo?(mcastelluccio)
Reporter | ||
Comment 18•6 years ago
|
||
Comment on attachment 9002992 [details] [diff] [review] fix.patch Review of attachment 9002992 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/tools/reftest/manifest.jsm @@ -464,1 @@ > sandbox.AndroidVersion = sysInfo.getPropertyAsInt32("version"); The same applies to this file. ::: layout/tools/reftest/reftest.jsm @@ -267,4 @@ > g.compareRetainedDisplayLists = prefs.getBoolPref("reftest.compareRetainedDisplayLists"); > } catch (e) {} > > -#ifdef MOZ_ENABLE_SKIA_PDF We don't want to remove the code altogether, we want to just stop using the preprocessor (#ifdef). Since we create a MOZ_ENABLE_SKIA_PDF variable in AppConstants.jsm, you can use that one here with a normal if. @@ -580,4 @@ > { > var fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager); > fm.focusedWindow = g.containingWindow; > -#ifdef XP_MACOSX Here we won't need to use AppConstants, we can just always run the code since the catch is not doing anything and the try block doesn't have any effect on non macOS platforms. ::: toolkit/modules/AppConstants.jsm @@ +340,5 @@ > #else > false, > #endif > + > + MOZ_ENABLE_SKIA_PDF: In this file (AppConstants.jsm), which is still preprocessed, we only want to define these variables, so we can use them in reftest.jsm and manifest.jsm. Moving the entire code from reftest.jsm and manifest.jsm here won't work.
Attachment #9002992 -
Flags: review?(mcastelluccio) → review-
Comment 19•5 years ago
|
||
Can I work on this??
Comment 20•5 years ago
|
||
Sure, looks like the other contributor hasn't responded to the review feedback. Feel free to ask for help if you get stuck. Thanks!
Assignee: nikshepsvn → sahilbhosale63
Comment 21•5 years ago
|
||
Comment 22•4 years ago
|
||
Updated•4 years ago
|
Attachment #9117230 -
Attachment is obsolete: true
Comment 23•3 years ago
|
||
This good-first-bug hasn't had any activity for 6 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Assignee: sahilbhosale63 → nobody
Status: ASSIGNED → NEW
Comment 25•3 years ago
|
||
Hi @marco, is this bug still open and if so, can I submit a patch?
Reporter | ||
Comment 26•3 years ago
|
||
Hello Sanket, sure, feel free to work on it!
Assignee | ||
Comment 27•3 years ago
|
||
Hello, I am an outreachy applicant and want to work on this. Can you please assign this to me? Thanks.
Flags: needinfo?(mcastelluccio)
Reporter | ||
Comment 28•3 years ago
|
||
Hello Shazib, feel free to work on this bug. Bugs are assigned when there is a patch to fix them.
Flags: needinfo?(mcastelluccio)
Assignee | ||
Comment 29•3 years ago
|
||
Updated•3 years ago
|
Assignee: nobody → ssummar.bee16seecs
Status: NEW → ASSIGNED
Assignee | ||
Comment 30•3 years ago
|
||
Hi again, I submitted a patch. Hopefully I didnt miss anything. Please feel free to comment on it.
Updated•3 years ago
|
Attachment #9245746 -
Attachment description: Bug 1475503 - Removed preprocesser use in reftest.jsm. r=marco → Bug 1475503 - Removed preprocessor use in reftest.jsm. r=marco
Comment 31•3 years ago
|
||
Pushed by mcastelluccio@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/50ba34a0c174 Removed preprocessor use in reftest.jsm. r=marco DONTBUILD
Comment 32•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox95:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•