testapi should handle a missing testapiScripts directory cleaner
Created attachment 451912 [details] Patch
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 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 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?
<rdar://problem/89239279>