Closed Bug 382682 Opened 18 years ago Closed 18 years ago

Add Makefile target to launch solo xpcshell test for debugging (check-interactive)

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9alpha6

People

(Reporter: WeirdAl, Assigned: WeirdAl)

References

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

Attached patch patch, v1Splinter Review
Lately, while working on my xpcshell testcases, I've been thinking: Wouldn't it be great if I could launch the testcase, load the files, but not execute it? That way, I could attach a debugger, and step through when I spot something I don't expect. This patch enables that.
Attachment #266805 - Flags: review?(sayrer)
Comment on attachment 266805 [details] [diff] [review] patch, v1 I'm psyched for this, but I can't review this. rcampbell is better.
Attachment #266805 - Flags: review?(sayrer) → review?(rcampbell)
Comment on attachment 266805 [details] [diff] [review] patch, v1 this looks good to me, but I'd like a second opinion on the rules.mk content before giving it the green-light. bsmedberg, how's your queue?
Attachment #266805 - Flags: review?(rcampbell) → review?(benjamin)
Comment on attachment 266805 [details] [diff] [review] patch, v1 I like the concept but not the rule name. Can we call it check-interactive ?
Attachment #266805 - Flags: review?(benjamin) → review+
yeah, I had slight issue with "solo" as well, thinking maybe "single" would be a better choice. "interactive" has a nice ring to it though.
So let's call it check-interactive. I'm fine with that too. robcee, I can't check this in (no CVS account, and not much time today anyway); do you want to make the trivial change and check it in? I don't see this code requiring sr, as it's strictly for testing/debugging - and not in the build process. I'll write a blog article about the new feature post-checkin (probably at night).
(In reply to comment #5) > So let's call it check-interactive. I'm fine with that too. > > robcee, I can't check this in (no CVS account, and not much time today anyway); > do you want to make the trivial change and check it in? I don't see this code > requiring sr, as it's strictly for testing/debugging - and not in the build > process. I'll try to get to this today and get it checked in for you. I'm not entirely sure about not requiring sr in this case as you're touching rules.mk. Ben, what's the word on this?
r+sr, or whatever the rules are now. The build system has typically been exempt in any case
Attached patch patch, v1.1Splinter Review
Updated to replace check-solo with check-interactive. Built on OSX and ran make check without problems from my objdir. Running make check-interactive from the objdir with no supplied arguments, seems to work, dropping into a js shell, but supplying arguments results in, ..objdir/> make SOLO_FILE=test_import.js -C ../js/src/xpconnect/tests/ check-interactive make: *** No rule to make target `check-interactive'. Stop. I need help validating this before I can check it in.
with further instructional aid from Alex, we were able to get this running with: make SOLO_FILE=test_import.js -C js/src/xpconnect/tests/ check-interactive (from in objdir) I'm going to check this in after reapplying to clean tree.
Checked in. CVS commit logs: config rob$ cvs -d ":ext:rcampbell%mozilla.com@cvs.mozilla.org:/cvsroot" ci -m "Bug 382682, Add makefile target to launch interactive xpcshell for debugging. Patch by Alex Vincent" cvs commit: Examining . cvs commit: Examining Moz cvs commit: Examining mkdepend cvs commit: Examining nspr cvs commit: Examining tests Checking in rules.mk; /cvsroot/mozilla/config/rules.mk,v <-- rules.mk new revision: 3.556; previous revision: 3.555 done xpcshell-simple rob$ cvs -d ":ext:rcampbell%mozilla.com@cvs.mozilla.org:/cvsroot" ci -m "Bug 382682, Add makefile target to launch interactive xpcshell for debugging. Patch by Alex Vincent" cvs commit: Examining . cvs commit: Examining example cvs commit: Examining example/unit RCS file: /cvsroot/mozilla/tools/test-harness/xpcshell-simple/execute_test.js,v done Checking in execute_test.js; /cvsroot/mozilla/tools/test-harness/xpcshell-simple/execute_test.js,v <-- execute_test.js initial revision: 1.1 done Checking in tail.js; /cvsroot/mozilla/tools/test-harness/xpcshell-simple/tail.js,v <-- tail.js new revision: 1.3; previous revision: 1.2 done Checking in test_all.sh; /cvsroot/mozilla/tools/test-harness/xpcshell-simple/test_all.sh,v <-- test_all.sh new revision: 1.10; previous revision: 1.9 done RCS file: /cvsroot/mozilla/tools/test-harness/xpcshell-simple/test_one.sh,v done Checking in test_one.sh; /cvsroot/mozilla/tools/test-harness/xpcshell-simple/test_one.sh,v <-- test_one.sh initial revision: 1.1 done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
I tried to hack on something similar in bug 369226. That's great to see your work on this now checked in :-) Didn't you felt like factorizing test_all.sh and test_one.sh? That makes lots of duplication.
I didn't really consider that, to be honest. I do agree there's duplication here, and the major difference is removing the "2>&1 >$target_js.log" part. On the other hand, I'm not that strong at shell script hacking. This was admittedly a quick & dirty solution. If you want to file a new bug for reducing the duplication and offer a patch, I'm sure people will be interested in reviewing it.
Keywords: dev-doc-needed
Summary: Add Makefile target to launch solo xpcshell test for debugging → Add Makefile target to launch solo xpcshell test for debugging (check-interactive)
Target Milestone: --- → mozilla1.9alpha6
Version: unspecified → Trunk
Depends on: 384235
Depends on: 384339
Added note to xpcshell test harness page mentioning the check-interactive mode.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: