[Webkit-unassigned] [Bug 44709] deduplicate-tests should be runnable from any WebKit directory

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 10 16:04:24 PDT 2010


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





--- Comment #19 from Tony Chang <tony at chromium.org>  2010-09-10 16:04:24 PST ---
(In reply to comment #11)
> (From update of attachment 67245 [details])
> Did you just want this?
> http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/system/ospath.py

Switched to using ospath.relpath, but the description is wrong.  It's like python2.6's os.path.relpath, but it returns None if |path| is outside |start_path|.  os.path.relpath is smart enough to put ../ in the returned value.  This is good enough for this script, which will now print nothing if you try to run it from, e.g., WebCore or WebKitTools.

> Why not use absolute paths?

Mainly because it's harder to read and these are really long path names.

> See how scm.py solves the run-from-anywhere problem by passing a cwd to executive.py:

Good idea, I switch to passing the cwd to run_command and using an absolute path the other place it mattered.

-- 
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