mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-31 05:45:26 +01:00 
			
		
		
		
	Several CI fixes
- don't output stdin on terminal - adapt to different google.com ip addresses - cleaner code
This commit is contained in:
		| @@ -25,18 +25,18 @@ die "Unable to open $prg" unless -f $prg; | ||||
| die "Unable to open $distro_openssl" unless -f $distro_openssl; | ||||
|  | ||||
| # Provide proper start conditions | ||||
| unlink "tmp.csv"; | ||||
| unlink "tmp2.csv"; | ||||
| unlink $csvfile; | ||||
| unlink $csvfile2; | ||||
|  | ||||
| #1 run | ||||
| printf "\n%s\n", "Diff test IPv4 with supplied openssl against \"$uri\""; | ||||
| @args="$prg $check2run $csvfile $uri 2>&1"; | ||||
| @args="$prg $check2run $csvfile $uri >/dev/null"; | ||||
| system("@args") == 0 | ||||
|      or die ("FAILED: \"@args\""); | ||||
|  | ||||
| # 2 | ||||
| printf "\n%s\n", "Diff test IPv4 with $distro_openssl against \"$uri\""; | ||||
| @args="$prg $check2run $csvfile2 --openssl=$distro_openssl $uri 2>&1"; | ||||
| @args="$prg $check2run $csvfile2 --openssl=$distro_openssl $uri >/dev/null"; | ||||
| system("@args") == 0 | ||||
|      or die ("FAILED: \"@args\" "); | ||||
|  | ||||
| @@ -63,6 +63,10 @@ $cat_csvfile  =~  s/ECDH\/MLKEM/ECDH 253  /g; | ||||
| $cat_csvfile  =~ s/.nonce-.* //g; | ||||
| $cat_csvfile2 =~ s/.nonce-.* //g; | ||||
|  | ||||
| +# Fix IP adresses. needed when we don't hit the same IP address. We just remove them | ||||
| $cat_csvfile  =~ s/","google.com\/.*","443/","google.com","443/; | ||||
| $cat_csvfile2 =~ s/","google.com\/.*","443/","google.com","443/; | ||||
|  | ||||
| $diff = diff \$cat_csvfile, \$cat_csvfile2; | ||||
|  | ||||
| # Compare the differences -- and print them if there were any | ||||
|   | ||||
| @@ -20,6 +20,7 @@ my $cat_csv="tmp.csv"; | ||||
| my $check2run="-p -s -P --fs -h -U -c -q --ip=one --color 0 --csvfile $cat_csv"; | ||||
| my $uri="testssl.sh"; | ||||
| my $diff=""; | ||||
| my @args=""; | ||||
|  | ||||
| die "Unable to open $prg" unless -f $prg; | ||||
| die "Unable to open $baseline_csv" unless -f $baseline_csv; | ||||
| @@ -27,11 +28,10 @@ die "Unable to open $baseline_csv" unless -f $baseline_csv; | ||||
| # Provide proper start conditions | ||||
| unlink $cat_csv; | ||||
|  | ||||
| my @args=("$prg", "$check2run", "$uri", "2>&1"); | ||||
|  | ||||
| #1 run | ||||
| printf "\n%s\n", "Diff unit test (IPv4) against \"$uri\""; | ||||
| printf "@args\n"; | ||||
| @args="$prg $check2run $uri >/dev/null"; | ||||
| system("@args") == 0 | ||||
|      or die ("FAILED: \"@args\" "); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dirk Wetter
					Dirk Wetter