-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrun-feature-combinations
executable file
·44 lines (38 loc) · 1.04 KB
/
run-feature-combinations
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/perl -w
my @list;
push @list, '';
sub add {
my @tmp = ();
for my $a (@_) {
for my $f (@list) {
push @tmp, "$f$a";
}
}
@list = @tmp;
}
if (@ARGV > 0 && $ARGV[0] eq '--max') {
add('', 'multi-thread,');
add('', 'multi-stakker,');
add('', 'logger,');
add('', 'no-unsafe-queue,');
add('', 'no-unsafe,');
add('', 'inline-deferrer,');
add('', 'inter-thread,');
} else {
# multi-stakker implies multi-thread; logger is independent
add('', 'multi-thread,', 'multi-stakker,logger,');
# no-unsafe implies no-unsafe-queue
add('', 'no-unsafe-queue,', 'no-unsafe,');
# These features are independent and can be switched together
add('', 'inline-deferrer,inter-thread,');
}
# Sort by length which biases towards testing single features before
# combined features
for (sort { length($a) <=> length($b) } @list) {
s/,$//;
if ($_ eq '') {
print("--no-default-features\n");
} else {
print("--no-default-features --features $_\n");
}
}