Bug 57992

Summary: old-run-webkit-tests: add support for audio files
Product: WebKit Reporter: Dirk Pranke <dpranke>
Component: Tools / TestsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, crogers, ossy, rgabor, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 57977    
Attachments:
Description Flags
Patch
none
update w/ review feedback from Tony none

Description Dirk Pranke 2011-04-06 15:23:14 PDT
See bug 57969 - we're adding support to DRT to output audio files to test web audio, and we need to add support to ORWT to handle the output correctly.
Comment 1 Dirk Pranke 2011-04-06 17:50:13 PDT
See bug 57987 for the changes that needed to happen for NRWT.
Comment 2 Dirk Pranke 2011-05-31 18:13:18 PDT
Created attachment 95524 [details]
Patch
Comment 3 Tony Chang 2011-06-01 10:10:23 PDT
Comment on attachment 95524 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=95524&action=review

> Tools/Scripts/old-run-webkit-tests:2305
> +            } elsif ($lineIn =~ /(.*)#EOF$/) {
> +                if ($1) {

This will do the wrong thing if $1 is "0".  Perl silently converts that to a number, which then becomes false.  You could just compare to "".

> Tools/Scripts/old-run-webkit-tests:2336
> +    my $joined_error = join("", @error);

Nit: Pulling this out into a variable doesn't seem to add any value.
Comment 4 Dirk Pranke 2011-06-01 10:32:59 PDT
Comment on attachment 95524 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=95524&action=review

>> Tools/Scripts/old-run-webkit-tests:2305
>> +                if ($1) {
> 
> This will do the wrong thing if $1 is "0".  Perl silently converts that to a number, which then becomes false.  You could just compare to "".

Good catch. Will fix.

>> Tools/Scripts/old-run-webkit-tests:2336
>> +    my $joined_error = join("", @error);
> 
> Nit: Pulling this out into a variable doesn't seem to add any value.

I thought this made the return slightly easier to read. I'll revert it.
Comment 5 Dirk Pranke 2011-06-01 13:59:43 PDT
Created attachment 95656 [details]
update w/ review feedback from Tony
Comment 6 WebKit Commit Bot 2011-06-01 19:09:52 PDT
Comment on attachment 95656 [details]
update w/ review feedback from Tony

Clearing flags on attachment: 95656

Committed r87873: <http://trac.webkit.org/changeset/87873>
Comment 7 WebKit Commit Bot 2011-06-01 19:09:56 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Csaba Osztrogonác 2011-06-02 07:27:48 PDT
I have no idea how, but this patch broke two tests on Qt port:

--- /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/overflow-viewport-renderer-deleted-expected.txt	2011-06-02 07:01:35.955265937 -0700
+++ /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/overflow-viewport-renderer-deleted-actual.txt	2011-06-02 07:01:35.955265937 -0700
@@ -0,0 +1 @@
+ERROR: nil result from [documentElement innerText]
\ No newline at end of file


--- /ramdisk/qt-linux-64-release/build/layout-test-results/plugins/document-open-expected.txt	2011-06-02 07:04:46.240269339 -0700
+++ /ramdisk/qt-linux-64-release/build/layout-test-results/plugins/document-open-actual.txt	2011-06-02 07:04:46.240269339 -0700
@@ -1 +1,2 @@
 CONSOLE MESSAGE: line 0: PLUGIN: DOCUMENT OPEN SUCCESS
+ERROR: nil result from [documentElement innerText]
\ No newline at end of file
Comment 9 Csaba Osztrogonác 2011-06-02 07:28:17 PDT
.
Comment 10 Dirk Pranke 2011-06-02 20:32:07 PDT
(In reply to comment #8)
> I have no idea how, but this patch broke two tests on Qt port:
> 
> --- /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/overflow-viewport-renderer-deleted-expected.txt    2011-06-02 07:01:35.955265937 -0700
> +++ /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/overflow-viewport-renderer-deleted-actual.txt    2011-06-02 07:01:35.955265937 -0700
> @@ -0,0 +1 @@
> +ERROR: nil result from [documentElement innerText]
> \ No newline at end of file
> 
> 
> --- /ramdisk/qt-linux-64-release/build/layout-test-results/plugins/document-open-expected.txt    2011-06-02 07:04:46.240269339 -0700
> +++ /ramdisk/qt-linux-64-release/build/layout-test-results/plugins/document-open-actual.txt    2011-06-02 07:04:46.240269339 -0700
> @@ -1 +1,2 @@
>  CONSOLE MESSAGE: line 0: PLUGIN: DOCUMENT OPEN SUCCESS
> +ERROR: nil result from [documentElement innerText]
> \ No newline at end of file

The patch changed things so that if you had text on the final line of output from DRT but no trailing newline, then that text would be included in the -actual output (previously it would have been dropped), e.g.:

foo\n
bar#EOF

would produce an actual.txt of

foo\n
bar^D

whereas previously the bar would've been dropped. 

If your DRT was somehow not appending a final newline for some tests, this would break that. The fix would be to update the baselines to contain the newly appended text and (optionally) fix DRT, since it should always be putting in a final newline for text files.

(This change was needed because there is no final newline for audio files at the moment).
Comment 11 Dirk Pranke 2011-06-02 20:34:06 PDT
I think we can (and should) close this again; Ossy, do you agree?
Comment 12 Csaba Osztrogonác 2011-06-03 03:00:56 PDT
(In reply to comment #11)
> I think we can (and should) close this again; Ossy, do you agree?

Yes. Thanks for the information. I updated Qt specific 
results: http://trac.webkit.org/changeset/87998.

Gabor, could you check this EOF/newline problem? As far 
as I remember you fixed a similar bug in DRT before.