Bug 82877 - [GTK] Fix names of failed unit tests in Tools/Scripts/run-gtk-tests
Summary: [GTK] Fix names of failed unit tests in Tools/Scripts/run-gtk-tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2012-04-02 03:36 PDT by Carlos Garcia Campos
Modified: 2012-04-10 08:34 PDT (History)
1 user (show)

See Also:


Attachments
Patch (1.18 KB, patch)
2012-04-02 03:39 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2012-04-02 03:36:01 PDT
The method lstrip is incorrectly used to get the name of failed tests from the full path.
Comment 1 Carlos Garcia Campos 2012-04-02 03:39:50 PDT
Created attachment 135058 [details]
Patch
Comment 2 Philippe Normand 2012-04-02 03:45:05 PDT
Comment on attachment 135058 [details]
Patch

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

> Tools/Scripts/run-gtk-tests:268
> +            names = [test.replace(self._programs_path, '', 1) for test in failed_tests]

What about os.path.basename(test) ?
Comment 3 Carlos Garcia Campos 2012-04-02 03:47:46 PDT
(In reply to comment #2)
> (From update of attachment 135058 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=135058&action=review
> 
> > Tools/Scripts/run-gtk-tests:268
> > +            names = [test.replace(self._programs_path, '', 1) for test in failed_tests]
> 
> What about os.path.basename(test) ?

that would give you the name, but we also want the directory unittests/WebKit2APITests
Comment 4 Philippe Normand 2012-04-02 03:52:35 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 135058 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=135058&action=review
> > 
> > > Tools/Scripts/run-gtk-tests:268
> > > +            names = [test.replace(self._programs_path, '', 1) for test in failed_tests]
> > 
> > What about os.path.basename(test) ?
> 
> that would give you the name, but we also want the directory unittests/WebKit2APITests

Is it really useful?
The test naming conventions differ between WK1 and WK2
Comment 5 Carlos Garcia Campos 2012-04-02 03:54:52 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (From update of attachment 135058 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=135058&action=review
> > > 
> > > > Tools/Scripts/run-gtk-tests:268
> > > > +            names = [test.replace(self._programs_path, '', 1) for test in failed_tests]
> > > 
> > > What about os.path.basename(test) ?
> > 
> > that would give you the name, but we also want the directory unittests/WebKit2APITests
> 
> Is it really useful?
> The test naming conventions differ between WK1 and WK2

That's how we refer to tests, see SkippedTest class
Comment 6 Carlos Garcia Campos 2012-04-02 04:07:19 PDT
Committed r112853: <http://trac.webkit.org/changeset/112853>