mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-31 13:55:25 +01:00 
			
		
		
		
	Shutup Travis
... by adding the formerly intruoced "DEBUG" statement as a filter. Note: "DEBUG" can now / should now be taken preferably for extra output on debug level 1. Replacing badssl.com by testssl.net. The former needed almost 5 min for a run, whereas one IP of testssl.net needs ~80 secs. With --fast even less.
This commit is contained in:
		| @@ -9,12 +9,12 @@ use Data::Dumper; | |||||||
|  |  | ||||||
| my $tests = 0; | my $tests = 0; | ||||||
| my $prg="./testssl.sh"; | my $prg="./testssl.sh"; | ||||||
| my $uri="badssl.com"; | my $uri="testssl.net"; | ||||||
| my $out=""; | my $out=""; | ||||||
| my $html=""; | my $html=""; | ||||||
| my $debughtml=""; | my $debughtml=""; | ||||||
| my $edited_html=""; | my $edited_html=""; | ||||||
| my $check2run="--color 0 --htmlfile tmp.html"; | my $check2run="--fast --ip=one --color 0 --htmlfile tmp.html"; | ||||||
|  |  | ||||||
| die "Unable to open $prg" unless -f $prg; | die "Unable to open $prg" unless -f $prg; | ||||||
|  |  | ||||||
| @@ -22,7 +22,7 @@ printf "\n%s\n", "Doing HTML output checks"; | |||||||
| unlink 'tmp.html'; | unlink 'tmp.html'; | ||||||
|  |  | ||||||
| #1 | #1 | ||||||
| printf "%s\n", " .. running $prg against $uri to create HTML and terminal outputs (may take 2~3 minutes)"; | printf "%s\n", " .. running $prg against \"$uri\" to create HTML and terminal outputs (may take ~2 minutes)"; | ||||||
| # specify a TERM_WIDTH so that the two calls to testssl.sh don't create HTML files with different values of TERM_WIDTH | # specify a TERM_WIDTH so that the two calls to testssl.sh don't create HTML files with different values of TERM_WIDTH | ||||||
| $out = `TERM_WIDTH=120 $prg $check2run $uri`; | $out = `TERM_WIDTH=120 $prg $check2run $uri`; | ||||||
| $html = `cat tmp.html`; | $html = `cat tmp.html`; | ||||||
| @@ -49,7 +49,7 @@ cmp_ok($edited_html, "eq", $out, "HTML file matches terminal output"); | |||||||
| $tests++; | $tests++; | ||||||
|  |  | ||||||
| #2 | #2 | ||||||
| printf "\n%s\n", " .. running $prg against $uri with --debug 4 to create HTML output (may take another 2~3 minutes)"; | printf "\n%s\n", " .. running again $prg against \"$uri\", now with --debug 4 to create HTML output (may take another ~2 minutes)"; | ||||||
| # Redirect stderr to /dev/null in order to avoid some unexplained "date: invalid date" error messages | # Redirect stderr to /dev/null in order to avoid some unexplained "date: invalid date" error messages | ||||||
| $out = `TERM_WIDTH=120 $prg $check2run --debug 4 $uri 2> /dev/null`; | $out = `TERM_WIDTH=120 $prg $check2run --debug 4 $uri 2> /dev/null`; | ||||||
| $debughtml = `cat tmp.html`; | $debughtml = `cat tmp.html`; | ||||||
| @@ -68,6 +68,7 @@ $debughtml =~ s/HTTP clock skew              \+?-?[0-9]* /HTTP clock skew | |||||||
|  |  | ||||||
| $debughtml =~ s/ Pre-test: .*\n//g; | $debughtml =~ s/ Pre-test: .*\n//g; | ||||||
| $debughtml =~ s/.*OK: below 825 days.*\n//g; | $debughtml =~ s/.*OK: below 825 days.*\n//g; | ||||||
|  | $debughtml =~ s/.*DEBUG:.*\n//g; | ||||||
|  |  | ||||||
| printf "\n%s\n", " .. checking that using the --debug option doesn't affect the HTML file"; | printf "\n%s\n", " .. checking that using the --debug option doesn't affect the HTML file"; | ||||||
| cmp_ok($debughtml, "eq", $html, "HTML file created with --debug 4 matches HTML file created without --debug"); | cmp_ok($debughtml, "eq", $html, "HTML file created with --debug 4 matches HTML file created without --debug"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dirk
					Dirk