Bug 122519 - Fix ruby LoadError when running run-javascriptcore-tests
Summary: Fix ruby LoadError when running run-javascriptcore-tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-08 13:05 PDT by Mark Lam
Modified: 2013-10-08 13:25 PDT (History)
2 users (show)

See Also:


Attachments
the patch. (1.62 KB, patch)
2013-10-08 13:20 PDT, Mark Lam
mhahnenberg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2013-10-08 13:05:52 PDT
On MountainLion running ruby 1.8.7, run-javascriptcore-tests produced the following error:

Running: /usr/bin/env ruby Tools/Scripts/run-jsc-stress-tests -j /Volumes/Data/ws7/OpenSource/WebKitBuild/Debug/jsc -o /Volumes/Data/ws7/OpenSource/WebKitBuild/Debug/jsc-stress-results PerformanceTests/SunSpider/tests/sunspider-1.0 PerformanceTests/SunSpider/tests/v8-v6 Source/JavaScriptCore/tests/mozilla/mozilla-tests.yaml LayoutTests/js/regress/script-tests PerformanceTests/SunSpider/profiler-test.yaml LayoutTests/jsc-layout-tests.yaml
Warning: did not find json or highline; some features will be disabled.
Error: #<LoadError: no such file to load -- json>

This in spite of the json and highline gems both already installed.  The issue is that for earlier versions of ruby (probably before 1.9), we need to explicitly require "rubygems".  Adding this to the relevant scripts fixes the issue.
Comment 1 Mark Lam 2013-10-08 13:20:34 PDT
Created attachment 213712 [details]
the patch.
Comment 2 Mark Hahnenberg 2013-10-08 13:22:02 PDT
Comment on attachment 213712 [details]
the patch.

r=me. Did you test how this affects newer versions of ruby?
Comment 3 Mark Lam 2013-10-08 13:22:55 PDT
(In reply to comment #2)
> (From update of attachment 213712 [details])
> r=me. Did you test how this affects newer versions of ruby?

Thanks for the review.  Yes, I tested it.  Works fine on newer versions of ruby.
Comment 4 Mark Lam 2013-10-08 13:25:52 PDT
Landed in r157131: <http://trac.webkit.org/r157131>.