Bug 236623 - [GTK] Let run-gtk-tests execute test by name
Summary: [GTK] Let run-gtk-tests execute test by name
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Diego Pino
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-14 17:09 PST by Diego Pino
Modified: 2022-02-16 16:42 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.45 KB, patch)
2022-02-14 17:22 PST, Diego Pino
no flags Details | Formatted Diff | Diff
Patch (3.87 KB, patch)
2022-02-14 22:32 PST, Diego Pino
no flags Details | Formatted Diff | Diff
Patch (1.42 KB, patch)
2022-02-15 20:02 PST, Diego Pino
no flags Details | Formatted Diff | Diff
Patch (1.52 KB, patch)
2022-02-16 04:24 PST, Diego Pino
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Pino 2022-02-14 17:09:31 PST
[GTK] Let run-gtk-tests execute test by name
Comment 1 Diego Pino 2022-02-14 17:22:53 PST
Created attachment 451966 [details]
Patch
Comment 2 Diego Pino 2022-02-14 17:25:32 PST
In branch 'main':

./Tools/Scripts/run-gtk-tests --release WebKitBuild/GTK/Release/bin/TestWebKitAPI/TestWebCore -p Color.Equality: SUCCESS
./Tools/Scripts/run-gtk-tests --release GTK/Release/bin/TestWebKitAPI/TestWebCore -p Color.Equality: ERROR
./Tools/Scripts/run-gtk-tests --release TestWebCore -p Color.Equality: ERROR

Patch applied:

./Tools/Scripts/run-gtk-tests --release WebKitBuild/GTK/Release/bin/TestWebKitAPI/TestWebCore -p Color.Equality: SUCCESS
./Tools/Scripts/run-gtk-tests --release GTK/Release/bin/TestWebKitAPI/TestWebCore -p Color.Equality: ERROR
./Tools/Scripts/run-gtk-tests --release TestWebCore -p Color.Equality: SUCCESS
Comment 3 Diego Pino 2022-02-14 22:32:19 PST
Created attachment 451996 [details]
Patch
Comment 4 Carlos Garcia Campos 2022-02-15 00:29:50 PST
Comment on attachment 451996 [details]
Patch

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

> Tools/glib/common.py:161
> +    return os.path.join(root_path, "WebKitBuild/{}/{}/bin/TestWebKitAPI".format(platform.upper(), configuration))

I like the idea but this only works when using flatpak. You should use build_path() to get the path to the build directory
Comment 5 Diego Pino 2022-02-15 20:02:40 PST
Created attachment 452126 [details]
Patch
Comment 6 Carlos Garcia Campos 2022-02-16 00:40:39 PST
Comment on attachment 452126 [details]
Patch

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

> Tools/glib/api_test_runner.py:93
> +                if not os.path.exists(test):
> +                    candidate = os.path.join(self._test_programs_base_dir(), test)
> +                    if os.path.exists(candidate):
> +                        test = candidate

Much simpler! We should probably show an error message if candidate doesn't exit either, no?
Comment 7 Diego Pino 2022-02-16 04:24:39 PST
Created attachment 452181 [details]
Patch
Comment 8 EWS 2022-02-16 16:41:48 PST
Committed r289982 (247368@main): <https://commits.webkit.org/247368@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452181 [details].
Comment 9 Radar WebKit Bug Importer 2022-02-16 16:42:17 PST
<rdar://problem/89056142>