Bug 236595

Summary: testapi should handle a missing testapiScripts directory cleaner
Product: WebKit Reporter: Keith Miller <keith_miller>
Component: New BugsAssignee: Keith Miller <keith_miller>
Status: NEW ---    
Severity: Normal CC: ews-watchlist, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ysuzuki: review+

Description Keith Miller 2022-02-14 09:20:43 PST
testapi should handle a missing testapiScripts directory cleaner
Comment 1 Keith Miller 2022-02-14 09:21:33 PST
Created attachment 451912 [details]
Patch
Comment 2 Yusuke Suzuki 2022-02-14 09:56:22 PST
Comment on attachment 451912 [details]
Patch

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

r=me

> Source/JavaScriptCore/API/tests/testapi.mm:2839
> +    if (![resolvePathToScripts() checkResourceIsReachableAndReturnError:nil]) {
> +        NSLog(@"File URL to testapiScripts: %@", resolvePathToScripts());
> +        checkResult(@"File URL to `testapiScripts` isn't reachable is the directory in place?", false);
> +        return;
> +    }
> +

How about always showing 

NSLog(@"File URL to testapiScripts: %@", resolvePathToScripts());

and doing,

checkResult(@"File URL to `testapiScripts` isn't reachable is the directory in place?", [resolvePathToScripts() checkResourceIsReachableAndReturnError:nil]);
Comment 3 Keith Miller 2022-02-14 10:39:01 PST
Comment on attachment 451912 [details]
Patch

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

>> Source/JavaScriptCore/API/tests/testapi.mm:2839
>> +
> 
> How about always showing 
> 
> NSLog(@"File URL to testapiScripts: %@", resolvePathToScripts());
> 
> and doing,
> 
> checkResult(@"File URL to `testapiScripts` isn't reachable is the directory in place?", [resolvePathToScripts() checkResourceIsReachableAndReturnError:nil]);

Ok, sounds good.
Comment 4 Keith Miller 2022-02-14 10:41:08 PST
Comment on attachment 451912 [details]
Patch

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

>>> Source/JavaScriptCore/API/tests/testapi.mm:2839
>>> +
>> 
>> How about always showing 
>> 
>> NSLog(@"File URL to testapiScripts: %@", resolvePathToScripts());
>> 
>> and doing,
>> 
>> checkResult(@"File URL to `testapiScripts` isn't reachable is the directory in place?", [resolvePathToScripts() checkResourceIsReachableAndReturnError:nil]);
> 
> Ok, sounds good.

Do you think we should return after finding the file is missing or just continue in case the test doesn't rely on that directory?
Comment 5 Radar WebKit Bug Importer 2022-02-21 09:21:18 PST
<rdar://problem/89239279>