Skip to content

Commit 96d4b4f

Browse files
committed
Trying to reduced the runtime of travis
Often in the past travis was hitting a limit (50min?). This is a try to make reasonable cuts to the unit tests: - For STARTTLS some checks with OPenSSL are skipped - For JSON and HTML outputs --ids-friendly was added assumming we don't change the output of ticketbleed, CCSI, HeartBleed and ROBOT any more. - There's also not point to run those checks against badssl - for the diff check we switch to 'or diag' to display a dfifference
1 parent a5d9348 commit 96d4b4f

7 files changed

Lines changed: 42 additions & 32 deletions

t/21_baseline_starttls.t

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use Data::Dumper;
1717

1818
my $tests = 0;
1919
my $prg="./testssl.sh";
20-
my $check2run_smtp="--protocols --standard --fs --server-preference --headers --vulnerable --each-cipher -q --ip=one --color 0";
20+
my $check2run_smtp="--protocols --standard --fs --server-preference --headers --vulnerable -q --ip=one --color 0";
2121
my $check2run="-q --ip=one --color 0";
2222
my $uri="";
2323
my $socket_out="";
@@ -60,12 +60,14 @@ $socket_out = `./testssl.sh $check2run -t pop3 $uri 2>&1`;
6060
unlike($socket_out, qr/$socket_regex_bl/, "");
6161
$tests++;
6262

63+
# commented out, bc of travis' limits
64+
#
65+
#printf "\n%s\n", "STARTTLS POP3 unit tests via OpenSSL --> $uri ...";
6366
# unlink "tmp.json";
64-
printf "\n%s\n", "STARTTLS POP3 unit tests via OpenSSL --> $uri ...";
65-
$openssl_out = `./testssl.sh --ssl-native $check2run -t pop3 $uri 2>&1`;
67+
#$openssl_out = `./testssl.sh --ssl-native $check2run -t pop3 $uri 2>&1`;
6668
# $openssl_json = json('tmp.json');
67-
unlike($openssl_out, qr/$openssl_regex_bl/, "");
68-
$tests++;
69+
#unlike($openssl_out, qr/$openssl_regex_bl/, "");
70+
#$tests++;
6971

7072

7173
$uri="imap.gmx.net:143";
@@ -93,11 +95,13 @@ $socket_out = `./testssl.sh $check2run -t xmpp $uri 2>&1`;
9395
unlike($openssl_out, qr/$openssl_regex_bl/, "");
9496
$tests++;
9597

96-
printf "\n%s\n", "STARTTLS XMPP unit tests via OpenSSL --> $uri ...";
97-
$openssl_out = `./testssl.sh --ssl-native $check2run -t xmpp $uri 2>&1`;
98+
# commented out, bc of travis' limits
99+
#
100+
#printf "\n%s\n", "STARTTLS XMPP unit tests via OpenSSL --> $uri ...";
101+
#$openssl_out = `./testssl.sh --ssl-native $check2run -t xmpp $uri 2>&1`;
98102
# $openssl_json = json('tmp.json');
99-
unlike($openssl_out, qr/$openssl_regex_bl/, "");
100-
$tests++;
103+
#unlike($openssl_out, qr/$openssl_regex_bl/, "");
104+
#$tests++;
101105

102106
# $uri="jabber.ccc.de:5269";
103107
# printf "\n%s\n", "Quick STARTTLS XMPP S2S unit tests via sockets --> $uri ...";
@@ -118,13 +122,15 @@ $socket_out =~ s/ error querying OCSP responder .*\n//g;
118122
unlike($socket_out, qr/$socket_regex_bl/, "");
119123
$tests++;
120124

121-
printf "\n%s\n", "STARTTLS FTP unit tests via OpenSSL --> $uri ...";
122-
$openssl_out = `./testssl.sh --ssl-native $check2run -t ftp $uri 2>&1`;
125+
# commented out, bc of travis' limits
126+
#
127+
# printf "\n%s\n", "STARTTLS FTP unit tests via OpenSSL --> $uri ...";
128+
# $openssl_out = `./testssl.sh --ssl-native $check2run -t ftp $uri 2>&1`;
123129
# $openssl_json = json('tmp.json');
124130
# OCSP stapling fails sometimes with: 'offered, error querying OCSP responder (ERROR: No Status found)'
125-
$openssl_out =~ s/ error querying OCSP responder .*\n//g;
126-
unlike($openssl_out, qr/$openssl_regex_bl/, "");
127-
$tests++;
131+
# $openssl_out =~ s/ error querying OCSP responder .*\n//g;
132+
# unlike($openssl_out, qr/$openssl_regex_bl/, "");
133+
# $tests++;
128134

129135

130136
# https://ldapwiki.com/wiki/Public%20LDAP%20Servers
@@ -146,11 +152,13 @@ $socket_out = `./testssl.sh $check2run -t nntp $uri 2>&1`;
146152
unlike($socket_out, qr/$socket_regex_bl/, "");
147153
$tests++;
148154

149-
printf "\n%s\n", "STARTTLS NNTP unit tests via OpenSSL --> $uri ...";
150-
$openssl_out = `./testssl.sh --ssl-native $check2run -t nntp $uri 2>&1`;
155+
# commented out, bc of travis' limits
156+
#
157+
#printf "\n%s\n", "STARTTLS NNTP unit tests via OpenSSL --> $uri ...";
158+
#$openssl_out = `./testssl.sh --ssl-native $check2run -t nntp $uri 2>&1`;
151159
# $openssl_json = json('tmp.json');
152-
unlike($openssl_out, qr/$openssl_regex_bl/, "");
153-
$tests++;
160+
#unlike($openssl_out, qr/$openssl_regex_bl/, "");
161+
#$tests++;
154162

155163

156164
# IRC: missing

t/23_client_simulation.t

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ $socket_out = `./testssl.sh $check2run -t smtp $uri 2>&1`;
5353
unlike($socket_out, qr/$socket_regex_bl/, "");
5454
$tests++;
5555

56+
# commented out, bc of travis' limits
57+
#
5658
# unlink "tmp.json";
57-
printf "\n%s\n", "STARTTLS: Client simulations unit test via OpenSSL --> $uri ...";
58-
$openssl_out = `./testssl.sh --ssl-native $check2run -t smtp $uri 2>&1`;
59-
# $openssl_json = json('tmp.json');
60-
unlike($openssl_out, qr/$openssl_regex_bl/, "");
61-
$tests++;
59+
#printf "\n%s\n", "STARTTLS: Client simulations unit test via OpenSSL --> $uri ...";
60+
#$openssl_out = `./testssl.sh --ssl-native $check2run -t smtp $uri 2>&1`;
61+
## $openssl_json = json('tmp.json');
62+
#unlike($openssl_out, qr/$openssl_regex_bl/, "");
63+
#$tests++;
6264

6365
done_testing($tests);
6466
unlink "tmp.json";

t/31_isJSON_valid.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use JSON;
99

1010
my $tests = 0;
1111
my $prg="./testssl.sh";
12-
my $check2run ="--ip=one -q --color 0";
12+
my $check2run ="--ip=one --ids-friendly -q --color 0";
1313
my $uri="";
1414
my $json="";
1515
my $out="";
@@ -44,7 +44,7 @@ $tests++;
4444

4545

4646
#3
47-
# This testss.sh run deliberately does NOT work as travis-ci.org blocks port 25 egress.
47+
# This testssl.sh run deliberately does NOT work as travis-ci.org blocks port 25 egress.
4848
# but the output should be fine. The idea is to have a unit test for a failed connection.
4949
printf "%s\n", ".. plain JSON for a failed run: '--mx $uri' ...";
5050
$out = `./testssl.sh --ssl-native --openssl-timeout=10 $check2run --jsonfile tmp.json --mx $uri`;

t/32_isHTML_valid.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ my $out="";
1515
my $html="";
1616
my $debughtml="";
1717
my $edited_html="";
18-
my $check2run="--ip=one --color 0 --htmlfile tmp.html";
18+
my $check2run="--ip=one --ids-friendly --color 0 --htmlfile tmp.html";
1919
my $diff="";
2020
die "Unable to open $prg" unless -f $prg;
2121

t/33_isJSON_severitylevel_valid.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ unlink 'tmp.json';
2121

2222
#1
2323
pass(" .. running testssl.sh against badssl.com to create a JSON report with severity level equal greater than LOW (may take 2~3 minutes)"); $tests++;
24-
$out = `./testssl.sh -S -e -U --jsonfile tmp.json --severity LOW --color 0 badssl.com`;
24+
$out = `./testssl.sh -S -e -U --ids-friendly --jsonfile tmp.json --severity LOW --color 0 badssl.com`;
2525
$json = json('tmp.json');
2626
unlink 'tmp.json';
2727
$found = 0;
@@ -36,7 +36,7 @@ is($found,0,"We should not have any finding with INFO level"); $tests++;
3636

3737
#2
3838
pass(" .. running testssl.sh against badssl.com to create a JSON-PRETTY report with severity level equal greater than LOW (may take 2~3 minutes)"); $tests++;
39-
$out = `./testssl.sh -S -e -U --jsonfile-pretty tmp.json --severity LOW --color 0 badssl.com`;
39+
$out = `./testssl.sh -S -e -U --ids-friendly --jsonfile-pretty tmp.json --severity LOW --color 0 badssl.com`;
4040
$json_pretty = json('tmp.json');
4141
unlink 'tmp.json';
4242
$found = 0;

t/51_badssl.com.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ my (
1414
);
1515
# OK
1616
pass("Running testssl.sh against badssl.com to create a baseline (may take 2~3 minutes)"); $tests++;
17-
my $okout = `./testssl.sh -S -e --freak --logjam --drown --rc4 --sweet32 --breach --crime --jsonfile tmp.json --color 0 badssl.com`;
17+
my $okout = `./testssl.sh -S -e --freak --logjam --drown --rc4 --sweet32 --breach --winshock --crime --jsonfile tmp.json --color 0 badssl.com`;
1818
my $okjson = json('tmp.json');
1919
unlink 'tmp.json';
2020
cmp_ok(@$okjson,'>',10,"We have more then 10 findings"); $tests++;

t/61_diff_testsslsh.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ my $tests = 0;
1818
my $prg="./testssl.sh";
1919
my $master_socket_csv="./t/baseline_data/default_testssl.csvfile";
2020
my $socket_csv="tmp.csv";
21-
my $check2run="-p -s -P --fs -h -U -c -q --ip=one --color 0 --csvfile $socket_csv";
21+
my $check2run="-p -s -P --fs -h -U -c -q --ip=one --color 0 --csvfile $socket_csv";
2222
#my $check2run="-p --color 0 --csvfile $socket_csv";
2323
my $uri="testssl.sh";
2424
my $diff="";
@@ -49,8 +49,8 @@ $master_socket_csv=~ s/HTTP_clock_skew.*\n//g;
4949
# Compare the differences to the master file -- and print differences if there were detected.
5050
# Filtering takes place later, so if there will be a difference detected it'll also show HTTP_clock_skew :-(
5151
#
52-
cmp_ok($socket_csv, "eq", $master_socket_csv, "Check whether CSV output matches master file from $uri") and
53-
printf "\n%s\n", "$diff";
52+
cmp_ok($socket_csv, "eq", $master_socket_csv, "Check whether CSV output matches master file from $uri") or
53+
diag ("\n%s\n", "$diff");
5454

5555
$tests++;
5656

0 commit comments

Comments
 (0)