Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run torsf and vanilla_tor in unattended/background mode #488

Merged
merged 2 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ooniprobe/Test/Suite/AbstractSuite.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@property (nonatomic) UIBackgroundTaskIdentifier backgroundTask;
@property BOOL interrupted;
@property BOOL storeDB;
@property BOOL autoRUn;
@property float totalTests;

-(id)initSuite:(NSString*)testSuite;
Expand Down
15 changes: 9 additions & 6 deletions ooniprobe/Test/Suite/ExperimentalSuite.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ -(id) init {
return self;
}

- (NSArray*)getTestList {
if ([self.testList count] == 0){
[self.testList addObject:[[Experimental alloc] initWithName:@"stunreachability"]];
[self.testList addObject:[[Experimental alloc] initWithName:@"dnscheck"]];
[self.testList addObject:[[Experimental alloc] initWithName:@"torsf"]];
[self.testList addObject:[[Experimental alloc] initWithName:@"vanilla_tor"]];
- (NSArray *)getTestList {
if ([self.testList count] == 0) {
if (self.autoRUn) {
[self.testList addObject:[[Experimental alloc] initWithName:@"torsf"]];
[self.testList addObject:[[Experimental alloc] initWithName:@"vanilla_tor"]];
} else {
[self.testList addObject:[[Experimental alloc] initWithName:@"stunreachability"]];
[self.testList addObject:[[Experimental alloc] initWithName:@"dnscheck"]];
}
aanorbel marked this conversation as resolved.
Show resolved Hide resolved
}
return super.getTestList;
}
Expand Down
4 changes: 4 additions & 0 deletions ooniprobe/Utility/BackgroundTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ + (void)checkIn {
CircumventionSuite *cTest = [[CircumventionSuite alloc] init];
[cTest setStoreDB:NO];
[tests addObject:cTest];
ExperimentalSuite *eTest = [[ExperimentalSuite alloc] init];
[eTest setStoreDB:NO];
[eTest setAutoRUn:YES];
[tests addObject:eTest];
[[RunningTest currentTest] setAndRun:[NSMutableArray arrayWithArray:tests] inView: nil];
}

Expand Down