[Webkit-unassigned] [Bug 104279] [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 17 18:58:34 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=104279





--- Comment #10 from Joseph Pecoraro <joepeck at webkit.org>  2012-12-17 19:00:51 PST ---
(From update of attachment 178047)
View in context: https://bugs.webkit.org/attachment.cgi?id=178047&action=review

>> Tools/Scripts/test-webkit-scripts:31
>> +"""Run unit tests of WebKit's Perl, Ruby, and Python scripts."""
> 
> Nit:  Should it be "Perl, Python and Ruby scripts" to keep them alphabetized?  :)

Heh, sure I can do that.

>> Tools/Scripts/test-webkitruby:30
>> +  puts %x{ ruby '#{test}' }
> 
> Does using "ruby" here imply that you're using the same ruby executable that was used to launch this script?  If not, we should use the path the ruby binary that was used to run this script (however you grab that in ruby; maybe "$0"?) to make the behavior more predictable.

Good call. I have yet to find a way to determine the current ruby executable running the script, so instead I'll just drop this "ruby" and run the test (which will use the env ruby). This line becomes:

    puts %x{ '#{test}' }

>> Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/run-test.rb:44
>> +  pass = output == expected_output
> 
> Also, if the test passes, I think the *-expected.txt file should have the word "PASS" with a newline in it (rather than just being blank).

These expected files are the expected results of running the check-* script. I wouldn't expect the script to ever output PASS.

Probably a better test would be, if the exit code is 0, ensure the output is empty. If the exit code is 1, ensure the output matches some error-expected.txt file. I'll try making that change.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list