mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 15:32:04 +00:00
Add optional allow list, for ephemeral whittling.
This commit is contained in:
parent
9417996280
commit
8d4393275c
@ -33,9 +33,15 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1"
|
||||
|
||||
- (NSArray<NSString *> *)testFiles {
|
||||
NSString *path = [NSString stringWithUTF8String:TestSuiteHome];
|
||||
NSSet *allowList = [[NSSet alloc] initWithArray:@[
|
||||
@"00.json.gz",
|
||||
]];
|
||||
|
||||
NSArray<NSString *> *files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
|
||||
files = [files filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSString* evaluatedObject, NSDictionary<NSString *,id> *) {
|
||||
if(allowList && ![allowList containsObject:[evaluatedObject lastPathComponent]]) {
|
||||
return NO;
|
||||
}
|
||||
return [evaluatedObject hasSuffix:@"json.gz"];
|
||||
}]];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user