Closed
Bug 499016
Opened 17 years ago
Closed 17 years ago
lirasm - Provide testing support for lirasm
Categories
(Core :: JavaScript Engine, enhancement)
Tracking
()
RESOLVED
FIXED
People
(Reporter: contactparitosh, Unassigned)
References
Details
(Keywords: student-project)
Attachments
(2 files, 3 obsolete files)
|
4.64 KB,
patch
|
Details | Diff | Splinter Review | |
|
6.42 KB,
patch
|
graydon
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11
Build Identifier:
A testing mechanism is required to ensure modifications made to the source don't introduce bugs/still produce correct output on all the tests.
Reproducible: Always
| Reporter | ||
Updated•17 years ago
|
Keywords: student-project
| Reporter | ||
Comment 1•17 years ago
|
||
Attachment #383799 -
Flags: review?(jorendorff)
Comment 2•17 years ago
|
||
Comment on attachment 383799 [details] [diff] [review]
Adds testlirc.sh and few test cases
Great, thanks for the patch.
> if [[ `$LIR_ASM "$ASM_FLAGS" $LIR_FILE` && -z `$LIR_ASM "$ASM_FLAGS" $LIR_FILE|diff - $LIR_RES` ]]
I can't tell what this is trying to do. It seems like the way to do this would be like:
if "$LIR_ASM" $ASM_FLAGS "$LIR_FILE" | cmp -s - "$LIR_RES"
Or maybe:
if "$LIR_ASM" $ASM_FLAGS "$LIR_FILE" > tmpfile
&& cmp -s "$LIR_RES" tmpfile
You have some extra indentation on lines 18-19.
Attachment #383799 -
Flags: review?(jorendorff)
Comment 3•17 years ago
|
||
Also, you would of course get bonus points if "make check" in an objdir ran the tests.
Comment 4•17 years ago
|
||
Sorry for the spam-- another obstacle is that lirasm currently has different output in debug vs. release builds. I think we should change it so that the verbose output is an option (when NJ_VERBOSE is defined).
Comment 5•17 years ago
|
||
(In reply to comment #4)
> Sorry for the spam-- another obstacle is that lirasm currently has different
> output in debug vs. release builds. I think we should change it so that the
> verbose output is an option (when NJ_VERBOSE is defined).
Agreed. You probably want to look at the initialization path for the new logging code that's landing in bug 494864.
| Reporter | ||
Comment 6•17 years ago
|
||
Hopefully the make check is done correctly.
Fixed the other recommendations you suggested above.
Attachment #383799 -
Attachment is obsolete: true
Attachment #383994 -
Flags: review?(jorendorff)
| Reporter | ||
Updated•17 years ago
|
Attachment #383994 -
Attachment is obsolete: true
Attachment #383994 -
Attachment is patch: false
Attachment #383994 -
Flags: review?(jorendorff)
| Reporter | ||
Comment 7•17 years ago
|
||
Attachment #383997 -
Flags: review?(jorendorff)
Comment 8•17 years ago
|
||
This is the same as Paritosh's patch but with these changes:
1. Move all the files to the source directory, and changes needed after that to keep "make check" working.
2. General tidying up in the shell script.
3. Change "make check" so it doesn't build lirasm (I think *not* having a dependency "check:: program_being_tested" is customary for us.)
4. Don't include tests that won't run yet (we should add them in time).
There are some tests that don't pass yet, but that will be fixed in bug 497991.
Attachment #383997 -
Attachment is obsolete: true
Attachment #384011 -
Flags: review?(graydon)
Attachment #383997 -
Flags: review?(jorendorff)
| Reporter | ||
Comment 9•17 years ago
|
||
Same as above patch with tests without the debug spew, and an option to display debug spew only when required. That is, default behaviour now changes to display required output only.
Attachment #384124 -
Flags: review?(jorendorff)
| Reporter | ||
Comment 10•17 years ago
|
||
A couple of additional changes included in the above patch:
- Remove support for LIR_calli and LIR_fcalli, since those have been removed.
- Add a rm testout.txt line in testlirc.sh, to clean up temporary file.
Updated•17 years ago
|
Attachment #384011 -
Flags: review?(graydon)
Updated•17 years ago
|
Attachment #384124 -
Flags: review?(jorendorff) → review?(graydon)
Comment 11•17 years ago
|
||
Comment on attachment 384124 [details] [diff] [review]
Above patch with clean(without debug spew) tests and option to display debug output
Looks good. Also consider as a followup testing task a disassembly tester that objdumps the s-record results (static output, not by executing the code) and compares against an expected objdump. I wrote an example test script in the original lirasm bug but did not commit it.
Attachment #384124 -
Flags: review?(graydon) → review+
Comment 12•17 years ago
|
||
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•