From eead9dfa87de80a205c60f5f7d03f2afbd884e3f Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Sat, 17 Jan 2015 18:50:58 +0100 Subject: Disable use of graphical symbols in test report Github changed their renderer so graphical symbols will stop rendering altogether if they exceed some number. So we have to go back to plain text. --- _testing/report-test.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '_testing') diff --git a/_testing/report-test.zsh b/_testing/report-test.zsh index ffe536a..6c05f46 100755 --- a/_testing/report-test.zsh +++ b/_testing/report-test.zsh @@ -8,9 +8,13 @@ local T= if [[ $MARKDOWN_REPORT == 1 ]] { echo '## Irssi Scripts Test Report' - failmark=:x: - passmark=:white_check_mark: - skipmark=:construction: + # github started to block excess use of emojis + #failmark=:x: + #passmark=:white_check_mark: + #skipmark=:construction: + failmark=✘ + passmark=✔ + skipmark=☡ T="|" } \ else { -- cgit v1.2.3 From a0c44c8634c89038c8cab1ade7802d08ddde0ec6 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Sat, 17 Jan 2015 17:49:19 +0100 Subject: Extract only required keys from %IRSSI headers This change will limit the keys in scripts.yaml to a set of explicitly specified keys, omitting such entries as default_package and changed --- _testing/README.markdown | 1 + _testing/config.yml | 16 ++++++++++++++++ _testing/travis/update-scripts-yaml.pl | 31 ++++++++++++++++++++++++++----- 3 files changed, 43 insertions(+), 5 deletions(-) (limited to '_testing') diff --git a/_testing/README.markdown b/_testing/README.markdown index 0a5b751..7e2f8f1 100644 --- a/_testing/README.markdown +++ b/_testing/README.markdown @@ -42,3 +42,4 @@ The following keys are recognised in config.yml: * broken_modules: - modules to never auto-install, for example because they hang Travis * whitelist: - list of scripts that are allowed to fail +* scripts_yaml_keys: - list of keys to copy from irssi header to scripts.dmp diff --git a/_testing/config.yml b/_testing/config.yml index e5118c4..75998e5 100644 --- a/_testing/config.yml +++ b/_testing/config.yml @@ -1,4 +1,20 @@ --- +scripts_yaml_keys: + # required + - filename + - version + - authors + - contact + - name + - description + - license + # optional + - url + - commands + - note + - modules + # explicit + - modified additional_system_deps: - libconfig-simple-perl - libyaml-perl diff --git a/_testing/travis/update-scripts-yaml.pl b/_testing/travis/update-scripts-yaml.pl index d3384a8..5762096 100644 --- a/_testing/travis/update-scripts-yaml.pl +++ b/_testing/travis/update-scripts-yaml.pl @@ -1,5 +1,21 @@ use strict; use warnings; use YAML::Tiny; +use Scalar::Util; +BEGIN { + sub YAML::Tiny::_has_internal_string_value { + !Scalar::Util::looks_like_number($_[0]) + } +} + +my @config; +if (open my $ef, '<:utf8', '_testing/config.yml') { + @config = Load(do { local $/; <$ef> }); +} +my @yaml_keys; +if (@config) { + @yaml_keys = @{ $config[0]{scripts_yaml_keys}//[] }; +} +die "no keys defined in config.yaml\n" unless @yaml_keys; my @docs; { open my $ef, '<:utf8', '_data/scripts.yaml' or die $!; @@ -49,15 +65,20 @@ for my $file () { print "MISSING META FOR $base\n"; } } -my @newdoc = map { $newmeta{$_} } sort keys %newmeta; +my @newdoc = map { + my $v = $newmeta{$_}; + +{ + map { + exists $v->{$_} + ? ($_ => $v->{$_}) + : () + } sort @yaml_keys + } +} sort keys %newmeta; { open my $ef, '>:utf8', '_data/scripts.yaml' or die $!; print $ef Dump \@newdoc; } -my @config; -if (open my $ef, '<:utf8', '_testing/config.yml') { - @config = Load(do { local $/; <$ef> }); -} if (@config && @{$config[0]{whitelist}//[]}) { my $changed; my @wl; -- cgit v1.2.3 From 097ea77e54af0266b70844a23ee1f03224f5143a Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Sat, 17 Jan 2015 18:26:31 +0100 Subject: Make prereq-scanner more noisy Avoid stalled builds by outputting the prereq-scanner result. --- _testing/travis/autoinstall-perl-prereqs.zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to '_testing') diff --git a/_testing/travis/autoinstall-perl-prereqs.zsh b/_testing/travis/autoinstall-perl-prereqs.zsh index 11c9824..4e47b37 100755 --- a/_testing/travis/autoinstall-perl-prereqs.zsh +++ b/_testing/travis/autoinstall-perl-prereqs.zsh @@ -4,22 +4,26 @@ local -a modlist modlist=($(scan-perl-prereqs $filelist)) +echo -n ... >&2 -sudo apt-file update >/dev/null 2>&1 +sudo apt-file update local -a ubu_pkgs local -a cpan_mods for mod ($modlist) { mod=${mod%\~*} if [[ $mod != Irssi* && $mod != feature ]] { + echo -n $mod >&2 if { ! perl -M$mod -E1 2>/dev/null } { local -a ubu_pkg ubu_pkg=($(apt-file -l search "/perl5/${mod//:://}.pm")) - if [[ $#ubu_pkg -gt 0 ]] { ubu_pkgs+=($ubu_pkg) } \ + if [[ $#ubu_pkg -gt 0 ]] { ubu_pkgs+=($ubu_pkg); echo -n '(u)' >&2 } \ else { cpan_mods+=($mod) } } + echo -n ' ' >&2 } } +echo >&2 if [[ $#ubu_pkgs -gt 0 ]] { sudo apt-get install -qq $ubu_pkgs } @@ -29,6 +33,7 @@ typeset -A broken_mods broken_tests=($(perl -MYAML::Tiny=LoadFile -e'print "$_ 1 " for @{LoadFile(+shift)->{cpan}{broken_tests}}' _testing/config.yml)) broken_mods=($(perl -MYAML::Tiny=LoadFile -e'print "$_ 1 " for @{LoadFile(+shift)->{cpan}{broken_modules}}' _testing/config.yml)) +echo ... >&2 for mod ($cpan_mods) { if { ! perl -M$mod -E1 2>/dev/null } { local skip_test= -- cgit v1.2.3