File tree 1 file changed +4
-4
lines changed
src/darwin/Framework/CHIPTests
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -722,11 +722,11 @@ + (void)shutdownStack
722
722
*/
723
723
- (NSString *)absolutePathFor : (NSString *)matterRootRelativePath
724
724
{
725
- // Find the right absolute path to our file. PWD should
726
- // point to our src/darwin/Framework .
727
- NSString * pwd = [[ NSProcessInfo processInfo ] environment ][ @" PWD " ];
725
+ // Start with the absolute path to our file, then remove the suffix that
726
+ // comes after the path to the Matter SDK root .
727
+ NSString * pathToTest = [NSString stringWithUTF8String: __FILE__ ];
728
728
NSMutableArray * pathComponents = [[NSMutableArray alloc ] init ];
729
- [pathComponents addObject: [pwd substringToIndex: (pwd .length - @" src/darwin/Framework" .length)]];
729
+ [pathComponents addObject: [pathToTest substringToIndex: (pathToTest .length - @" src/darwin/Framework/CHIPTests/MTROTAProviderTests.m " .length)]];
730
730
[pathComponents addObjectsFromArray: [matterRootRelativePath pathComponents ]];
731
731
return [NSString pathWithComponents: pathComponents];
732
732
}
You can’t perform that action at this time.
0 commit comments