mirror of
https://github.com/drwetter/testssl.sh.git
synced 2026-06-23 08:47:38 +02:00
Provide better debugging means
This is just to assist debugging of the runners, so that we can grab in a case needed the screen and stderr . * there's a script t/03_debug.t.DISABLED which needs to be renamed then * it utilises IPC::Run3 - also showing the PATH is added for both runners - Readme amended accordingly
This commit is contained in:
@@ -45,6 +45,8 @@ jobs:
|
|||||||
printf "%s\n" "----------"
|
printf "%s\n" "----------"
|
||||||
bash --version
|
bash --version
|
||||||
printf "%s\n" "----------"
|
printf "%s\n" "----------"
|
||||||
|
echo $PATH
|
||||||
|
printf "%s\n" "----------"
|
||||||
|
|
||||||
- name: Install perl modules
|
- name: Install perl modules
|
||||||
run: |
|
run: |
|
||||||
@@ -52,6 +54,7 @@ jobs:
|
|||||||
cpanm --notest Data::Dumper
|
cpanm --notest Data::Dumper
|
||||||
cpanm --notest JSON
|
cpanm --notest JSON
|
||||||
cpanm --notest Text::Diff
|
cpanm --notest Text::Diff
|
||||||
|
cpanm --notest IPC::Run3
|
||||||
|
|
||||||
- name: run it
|
- name: run it
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ jobs:
|
|||||||
printf "%s\n" "----------"
|
printf "%s\n" "----------"
|
||||||
bash --version
|
bash --version
|
||||||
printf "%s\n" "----------"
|
printf "%s\n" "----------"
|
||||||
|
echo $PATH
|
||||||
|
printf "%s\n" "----------"
|
||||||
|
|
||||||
- name: Install perl modules
|
- name: Install perl modules
|
||||||
run: |
|
run: |
|
||||||
@@ -58,6 +60,7 @@ jobs:
|
|||||||
cpanm --notest Data::Dumper
|
cpanm --notest Data::Dumper
|
||||||
cpanm --notest JSON
|
cpanm --notest JSON
|
||||||
cpanm --notest Text::Diff
|
cpanm --notest Text::Diff
|
||||||
|
cpanm --notest IPC::Run3
|
||||||
|
|
||||||
- name: run it
|
- name: run it
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Executable
+39
@@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
# Example for debugging what the runners do, here MacOS only
|
||||||
|
# (we used that before), To get output on the screen it's
|
||||||
|
# needed to encapsulate the functions you want to debug with
|
||||||
|
# set -x/+x and comment the last function @ 00_testssl_help.t
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use Test::More;
|
||||||
|
use IPC::Run3;
|
||||||
|
|
||||||
|
my $os="$^O";
|
||||||
|
my $prg="./testssl.sh";
|
||||||
|
my $check2run ="-p";
|
||||||
|
my $uri="testssl.sh";
|
||||||
|
my $stdout = '';
|
||||||
|
my $stderr = '';
|
||||||
|
|
||||||
|
# if ( $os eq "darwin" ){
|
||||||
|
printf "%s\n", "testing MacOS ";
|
||||||
|
run3(["/bin/bash", $prg, $check2run, $uri], \undef, \$stdout, \$stderr);
|
||||||
|
print STDERR $stderr;
|
||||||
|
print STDOUT $stdout;
|
||||||
|
# } elsif ( $os eq "linux" ){
|
||||||
|
# printf "skipped check on Linux\n\n";
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
# Use the following when you want to run everything below ~/t
|
||||||
|
# done_testing();
|
||||||
|
|
||||||
|
|
||||||
|
# This stops, no further checks within ~/t will run:
|
||||||
|
BAIL_OUT("Fundamental check done, aborting");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# vim:ts=5:sw=5:expandtab
|
||||||
|
|
||||||
@@ -8,3 +8,7 @@
|
|||||||
Please help to write CI tests! Documentation can be found [here](https://perldoc.perl.org/Test/More.html).
|
Please help to write CI tests! Documentation can be found [here](https://perldoc.perl.org/Test/More.html).
|
||||||
You can consult the existing code here. Feel free to use `10_baseline_ipv4_http.t` or `12_diff_opensslversions.t` as a
|
You can consult the existing code here. Feel free to use `10_baseline_ipv4_http.t` or `12_diff_opensslversions.t` as a
|
||||||
template. The latter is newer and code is cleaner.
|
template. The latter is newer and code is cleaner.
|
||||||
|
|
||||||
|
|
||||||
|
* `03_debug.t.DISABLED` is a handy tool when the runner is not in line with checks outside github. It provides debugging means
|
||||||
|
* IPv6 was (status 2025) not allowed, thus the file `11_baseline_ipv6_http.t.DISABLED` which can be renamed if that will change.
|
||||||
|
|||||||
Reference in New Issue
Block a user