BuildID: 3816
Status: OK
Image: melezhik/sparrow:alpine_arm
Worker status: OK
---
Date: 17.11.2023 @ 12:38
Time elapsed: 750 sec
---
SCM:
https://github.com/melezhik/Humming-Bird.git
Git sha: ace3535
Git comment: better report
tasks:
-
name: zef-build
language: Bash
default: true
code: |
set -e
cd source/
zef install . --force-install
zef install App::Prove6 --force-install
prove6 -I. t/ it/
followup:
-
name: intergration_tests
-
name: intergration_tests
language: Raku
followup:
-
name: test_report
init: |
"{cache_root_dir()}/command.raku".IO.spurt(config()<code>);
run_task "smoke_test", %(
command => "{cache_root_dir()}/command.raku",
cnt => config()<cnt>,
);
subtasks:
-
name: smoke_test
language: Bash
code: |
echo "run: ["
cat $command
echo "]"
nohup raku $command 1>&2 1>log.txt &
pid=$!
echo "pid: $pid"
echo "====="
echo "GET localhost:8080"
echo "====="
sleep 10
mkdir -p $cache_root_dir/tests/
curl http://localhost:8080 -s -D - -L --verbose -f && touch $cache_root_dir/tests/$cnt.ok
echo "====="
kill $pid
echo "log:"
cat log.txt
code: |
say "Finished";
if "{cache_root_dir()}/tests/{config()<cnt>}.ok".IO ~~ :e {
say ">>> PASSED";
update_state(%( test => config()<cnt>, result => "PASSED" ))
} else {
say ">>> FAILED";
update_state(%( test => config()<cnt>, result => "FAILED" ))
}
hub:
language: Raku
code: |
my $code;
my @examples;
my $fh = open("source/README.md");
my $cnt = 1;
for $fh.lines -> $i {
if $i ~~ /^ "```raku"/ ^fff^ $i ~~ /^ "```"/ {
$code ~= "$i\n"
} elsif ($i ~~ /^ "```raku"/ or $fh.eof) {
@examples.push(%( config => %( code => $code, cnt => $cnt++ ) )) if $code;
$code = "";
}
}
$fh.close();
update_state(%( list => @examples ));
-
name: test_report
language: Raku
code: |
for config()<parent><state><> -> $i {
say "test_{$i<test>} >>> {$i<result>}";
}
[35m12:26:11[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
source directory does not yet exist, download source archive from storage
[35m12:26:14[0m :: [repository] - installing pack-unpack, version 0.000001
[1;36m[task run: task.bash - unpack source archive][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2]
[3] file=$(config file)
[4] dir=$(config dir)
[5]
[6] echo "tar -xzf $file "
[7]
[8] tar -xzf $file
[9]
[10] if test $dir; then
[11] ls -l $dir
[12] fi
[13]
[14]
[1;36m[task stdout][0m
[35m12:26:17[0m :: tar -xzf source.tar.gz
[1;36m[task run: task.bash - tasks/zef-build][0m
[1;36m[dump code: task.bash][0m
[1] set -e
[2] cd source/
[3] zef install . --force-install
[4] zef install App::Prove6 --force-install
[5] prove6 -I. t/ it/
[6]
[1;36m[task stdout][0m
[35m12:26:21[0m :: ===> Searching for missing dependencies: HTTP::Status, DateTime::Format, MIME::Types, URI::Encode, UUID::V4, Test::When, Test::Notice, Test::Util::ServerPort, Cro::HTTP::Client
[35m12:30:33[0m :: ===> Searching for missing dependencies: Test::META, Crypt::Random, IO::Socket::Async::SSL, OO::Monitors, IO::Path::ChildSecure, Base64, HTTP::HPACK:ver<1.0.0>, Cro::Core:ver<0.8.9>, Cro::TLS:ver<0.8.9>, JSON::JWT, DateTime::Parse, Log::Timeline
[35m12:30:33[0m :: ===> Searching for missing dependencies: if, META6:ver<0.0.24+>, URI, License::SPDX, Digest::HMAC, CBOR::Simple
[35m12:30:33[0m :: ===> Searching for missing dependencies: TinyFloats:ver<0.0.3+>, JSON::Class:ver<0.0.14+>, JSON::Class:ver<0.0.20+>, JSON::Name, Digest:ver<1+>
[35m12:30:33[0m :: ===> Searching for missing dependencies: JSON::Marshal:ver<0.0.25+>, JSON::Unmarshal:ver<0.14+>, JSON::OptIn
[35m12:30:33[0m :: ===> Staging HTTP::Status:ver<0.0.4>:auth<zef:lizmat>
[35m12:30:33[0m :: ===> Staging [OK] for HTTP::Status:ver<0.0.4>:auth<zef:lizmat>
[35m12:30:33[0m :: ===> Staging DateTime::Format:ver<0.1.5>:auth<zef:raku-community-modules>:api<1.0>
[35m12:30:33[0m :: ===> Staging [OK] for DateTime::Format:ver<0.1.5>:auth<zef:raku-community-modules>:api<1.0>
[35m12:30:33[0m :: ===> Staging MIME::Types:ver<0.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging [OK] for MIME::Types:ver<0.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging URI::Encode:ver<0.09>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging [OK] for URI::Encode:ver<0.09>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging if:ver<0.1.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging [OK] for if:ver<0.1.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging Crypt::Random:ver<0.4.1>
[35m12:30:33[0m :: ===> Staging [OK] for Crypt::Random:ver<0.4.1>
[35m12:30:33[0m :: ===> Staging UUID::V4:ver<1.0.0>:auth<zef:masukomi>:api<1>
[35m12:30:33[0m :: ===> Staging [OK] for UUID::V4:ver<1.0.0>:auth<zef:masukomi>:api<1>
[35m12:30:33[0m :: ===> Staging Test::When:ver<1.001009>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging [OK] for Test::When:ver<1.001009>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging JSON::OptIn:ver<0.0.2>:auth<zef:jonathanstowe>
[35m12:30:33[0m :: ===> Staging [OK] for JSON::OptIn:ver<0.0.2>:auth<zef:jonathanstowe>
[35m12:30:33[0m :: ===> Staging JSON::Name:ver<0.0.7>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging [OK] for JSON::Name:ver<0.0.7>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging JSON::Marshal:ver<0.0.25>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging [OK] for JSON::Marshal:ver<0.0.25>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging [OK] for JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging JSON::Class:ver<0.0.21>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging [OK] for JSON::Class:ver<0.0.21>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging META6:ver<0.0.30>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging [OK] for META6:ver<0.0.30>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging URI:ver<0.3.7>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging [OK] for URI:ver<0.3.7>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging License::SPDX:ver<3.22.0>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging [OK] for License::SPDX:ver<3.22.0>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging Test::META:ver<0.0.20>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging [OK] for Test::META:ver<0.0.20>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging Test::Notice:ver<1.001005>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging [OK] for Test::Notice:ver<1.001005>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging Test::Util::ServerPort:ver<0.0.5>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging [OK] for Test::Util::ServerPort:ver<0.0.5>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Staging IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
[35m12:30:33[0m :: ===> Staging [OK] for IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
[35m12:30:33[0m :: ===> Staging OO::Monitors:ver<1.1.1>
[35m12:30:33[0m :: ===> Staging [OK] for OO::Monitors:ver<1.1.1>
[35m12:30:33[0m :: ===> Staging IO::Path::ChildSecure:ver<1.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging [OK] for IO::Path::ChildSecure:ver<1.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging Base64:ver<0.1.0>:auth<github:ugexe>
[35m12:30:33[0m :: ===> Staging [OK] for Base64:ver<0.1.0>:auth<github:ugexe>
[35m12:30:33[0m :: ===> Staging HTTP::HPACK:ver<1.0.0>:auth<zef:jnthn>
[35m12:30:33[0m :: ===> Staging [OK] for HTTP::HPACK:ver<1.0.0>:auth<zef:jnthn>
[35m12:30:33[0m :: ===> Staging Cro::Core:ver<0.8.9>:auth<zef:cro>
[35m12:30:33[0m :: ===> Staging [OK] for Cro::Core:ver<0.8.9>:auth<zef:cro>
[35m12:30:33[0m :: ===> Staging Cro::TLS:ver<0.8.9>:auth<zef:cro>
[35m12:30:33[0m :: ===> Staging [OK] for Cro::TLS:ver<0.8.9>:auth<zef:cro>
[35m12:30:33[0m :: ===> Staging Digest:ver<1.0.1>:auth<zef:grondilu>
[35m12:30:33[0m :: ===> Staging [OK] for Digest:ver<1.0.1>:auth<zef:grondilu>
[35m12:30:33[0m :: ===> Staging Digest::HMAC:ver<1.0.7>:auth<zef:jjmerelo>
[35m12:30:33[0m :: ===> Staging [OK] for Digest::HMAC:ver<1.0.7>:auth<zef:jjmerelo>
[35m12:30:33[0m :: ===> Staging JSON::JWT:ver<1.1.1>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging [OK] for JSON::JWT:ver<1.1.1>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Staging DateTime::Parse:ver<0.9.3>:auth<github:sergot>
[35m12:30:33[0m :: ===> Staging [OK] for DateTime::Parse:ver<0.9.3>:auth<github:sergot>
[35m12:30:33[0m :: ===> Staging TinyFloats:ver<0.0.4>:auth<zef:japhb>
[35m12:30:33[0m :: ===> Staging [OK] for TinyFloats:ver<0.0.4>:auth<zef:japhb>
[35m12:30:33[0m :: ===> Staging CBOR::Simple:ver<0.1.3>:auth<zef:japhb>
[35m12:30:33[0m :: ===> Staging [OK] for CBOR::Simple:ver<0.1.3>:auth<zef:japhb>
[35m12:30:33[0m :: ===> Staging Log::Timeline:ver<0.5.1>:auth<zef:jnthn>
[35m12:30:33[0m :: ===> Staging [OK] for Log::Timeline:ver<0.5.1>:auth<zef:jnthn>
[35m12:30:33[0m :: ===> Staging Cro::HTTP:ver<0.8.9>:auth<zef:cro>
[35m12:30:33[0m :: ===> Staging [OK] for Cro::HTTP:ver<0.8.9>:auth<zef:cro>
[35m12:30:33[0m :: ===> Staging Humming-Bird:ver<3.0.2>:auth<zef:rawleyfowler>
[35m12:30:33[0m :: ===> Staging [OK] for Humming-Bird:ver<3.0.2>:auth<zef:rawleyfowler>
[35m12:30:33[0m :: ===> Testing: HTTP::Status:ver<0.0.4>:auth<zef:lizmat>
[35m12:30:33[0m :: ===> Testing [OK] for HTTP::Status:ver<0.0.4>:auth<zef:lizmat>
[35m12:30:33[0m :: ===> Testing: DateTime::Format:ver<0.1.5>:auth<zef:raku-community-modules>:api<1.0>
[35m12:30:33[0m :: ===> Testing [OK] for DateTime::Format:ver<0.1.5>:auth<zef:raku-community-modules>:api<1.0>
[35m12:30:33[0m :: ===> Testing: MIME::Types:ver<0.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing [OK] for MIME::Types:ver<0.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing: URI::Encode:ver<0.09>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing [OK] for URI::Encode:ver<0.09>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing: if:ver<0.1.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing [OK] for if:ver<0.1.2>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing: Crypt::Random:ver<0.4.1>
[35m12:30:33[0m :: ===> Testing [OK] for Crypt::Random:ver<0.4.1>
[35m12:30:33[0m :: ===> Testing: UUID::V4:ver<1.0.0>:auth<zef:masukomi>:api<1>
[35m12:30:33[0m :: ===> Testing [OK] for UUID::V4:ver<1.0.0>:auth<zef:masukomi>:api<1>
[35m12:30:33[0m :: ===> Testing: Test::When:ver<1.001009>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing [OK] for Test::When:ver<1.001009>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing: JSON::OptIn:ver<0.0.2>:auth<zef:jonathanstowe>
[35m12:30:33[0m :: ===> Testing [OK] for JSON::OptIn:ver<0.0.2>:auth<zef:jonathanstowe>
[35m12:30:33[0m :: ===> Testing: JSON::Name:ver<0.0.7>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing [OK] for JSON::Name:ver<0.0.7>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing: JSON::Marshal:ver<0.0.25>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing [OK] for JSON::Marshal:ver<0.0.25>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing: JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing [OK] for JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing: JSON::Class:ver<0.0.21>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing [OK] for JSON::Class:ver<0.0.21>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing: META6:ver<0.0.30>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing [OK] for META6:ver<0.0.30>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing: URI:ver<0.3.7>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing [OK] for URI:ver<0.3.7>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: ===> Testing: License::SPDX:ver<3.22.0>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing [OK] for License::SPDX:ver<3.22.0>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing: Test::META:ver<0.0.20>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: [Test::META] # the following may make some diagnostics from the module itself
[35m12:30:33[0m :: ===> Testing [OK] for Test::META:ver<0.0.20>:auth<zef:jonathanstowe>:api<1.0>
[35m12:30:33[0m :: ===> Testing: Test::Notice:ver<1.001005>:auth<zef:raku-community-modules>
[35m12:30:33[0m :: [Test::Notice] #
[35m12:30:33[0m :: [Test::Notice] # [1;31;42m##############################################################################[0m
[35m12:30:33[0m :: [Test::Notice] # [1;34;42m##############################################################################[0m
[35m12:30:33[0m :: [Test::Notice] # [1;33;42m##############################################################################[0m
[35m12:30:33[0m :: [Test::Notice] # [1;37;40m# #
[35m12:34:39[0m :: [Test::Notice] # [1;37;40m# #
[35m12:34:39[0m :: [Test::Notice] # [1;37;40m# This is a test message #
[35m12:34:39[0m :: [Test::Notice] # [1;37;40m# #
[35m12:34:39[0m :: [Test::Notice] # [1;37;40m# #
[35m12:34:39[0m :: [Test::Notice] # [1;33;42m##############################################################################[0m
[35m12:34:39[0m :: [Test::Notice] # [1;34;42m##############################################################################[0m
[35m12:34:39[0m :: [Test::Notice] # [1;31;42m##############################################################################[0m
[35m12:34:39[0m :: ===> Testing [OK] for Test::Notice:ver<1.001005>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Testing: Test::Util::ServerPort:ver<0.0.5>:auth<zef:jonathanstowe>:api<1.0>
[35m12:34:39[0m :: ===> Testing [OK] for Test::Util::ServerPort:ver<0.0.5>:auth<zef:jonathanstowe>:api<1.0>
[35m12:34:39[0m :: ===> Testing: IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
[35m12:34:39[0m :: ===> Testing [OK] for IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
[35m12:34:39[0m :: ===> Testing: OO::Monitors:ver<1.1.1>
[35m12:34:39[0m :: ===> Testing [OK] for OO::Monitors:ver<1.1.1>
[35m12:34:39[0m :: ===> Testing: IO::Path::ChildSecure:ver<1.2>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Testing [OK] for IO::Path::ChildSecure:ver<1.2>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Testing: Base64:ver<0.1.0>:auth<github:ugexe>
[35m12:34:39[0m :: ===> Testing [OK] for Base64:ver<0.1.0>:auth<github:ugexe>
[35m12:34:39[0m :: ===> Testing: HTTP::HPACK:ver<1.0.0>:auth<zef:jnthn>
[35m12:34:39[0m :: ===> Testing [OK] for HTTP::HPACK:ver<1.0.0>:auth<zef:jnthn>
[35m12:34:39[0m :: ===> Testing: Cro::Core:ver<0.8.9>:auth<zef:cro>
[35m12:34:39[0m :: ===> Testing [OK] for Cro::Core:ver<0.8.9>:auth<zef:cro>
[35m12:34:39[0m :: ===> Testing: Cro::TLS:ver<0.8.9>:auth<zef:cro>
[35m12:34:39[0m :: ===> Testing [OK] for Cro::TLS:ver<0.8.9>:auth<zef:cro>
[35m12:34:39[0m :: ===> Testing: Digest:ver<1.0.1>:auth<zef:grondilu>
[35m12:34:39[0m :: ===> Testing [OK] for Digest:ver<1.0.1>:auth<zef:grondilu>
[35m12:34:39[0m :: ===> Testing: Digest::HMAC:ver<1.0.7>:auth<zef:jjmerelo>
[35m12:34:39[0m :: ===> Testing [OK] for Digest::HMAC:ver<1.0.7>:auth<zef:jjmerelo>
[35m12:34:39[0m :: ===> Testing: JSON::JWT:ver<1.1.1>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Testing [OK] for JSON::JWT:ver<1.1.1>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Testing: DateTime::Parse:ver<0.9.3>:auth<github:sergot>
[35m12:34:39[0m :: ===> Testing [OK] for DateTime::Parse:ver<0.9.3>:auth<github:sergot>
[35m12:34:39[0m :: ===> Testing: TinyFloats:ver<0.0.4>:auth<zef:japhb>
[35m12:34:39[0m :: ===> Testing [OK] for TinyFloats:ver<0.0.4>:auth<zef:japhb>
[35m12:34:39[0m :: ===> Testing: CBOR::Simple:ver<0.1.3>:auth<zef:japhb>
[35m12:34:39[0m :: ===> Testing [OK] for CBOR::Simple:ver<0.1.3>:auth<zef:japhb>
[35m12:34:39[0m :: ===> Testing: Log::Timeline:ver<0.5.1>:auth<zef:jnthn>
[35m12:34:39[0m :: ===> Testing [OK] for Log::Timeline:ver<0.5.1>:auth<zef:jnthn>
[35m12:34:39[0m :: ===> Testing: Cro::HTTP:ver<0.8.9>:auth<zef:cro>
[35m12:34:39[0m :: ===> Testing [OK] for Cro::HTTP:ver<0.8.9>:auth<zef:cro>
[35m12:34:39[0m :: ===> Testing: Humming-Bird:ver<3.0.2>:auth<zef:rawleyfowler>
[35m12:34:39[0m :: ===> Testing [OK] for Humming-Bird:ver<3.0.2>:auth<zef:rawleyfowler>
[35m12:34:39[0m :: ===> Installing: HTTP::Status:ver<0.0.4>:auth<zef:lizmat>
[35m12:34:39[0m :: ===> Installing: DateTime::Format:ver<0.1.5>:auth<zef:raku-community-modules>:api<1.0>
[35m12:34:39[0m :: ===> Installing: MIME::Types:ver<0.2>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Installing: URI::Encode:ver<0.09>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Installing: if:ver<0.1.2>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Installing: Crypt::Random:ver<0.4.1>
[35m12:34:39[0m :: ===> Installing: UUID::V4:ver<1.0.0>:auth<zef:masukomi>:api<1>
[35m12:34:39[0m :: ===> Installing: Test::When:ver<1.001009>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Installing: JSON::OptIn:ver<0.0.2>:auth<zef:jonathanstowe>
[35m12:34:39[0m :: ===> Installing: JSON::Name:ver<0.0.7>:auth<zef:jonathanstowe>:api<1.0>
[35m12:34:39[0m :: ===> Installing: JSON::Marshal:ver<0.0.25>:auth<zef:jonathanstowe>:api<1.0>
[35m12:34:39[0m :: ===> Installing: JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Installing: JSON::Class:ver<0.0.21>:auth<zef:jonathanstowe>:api<1.0>
[35m12:34:39[0m :: ===> Installing: META6:ver<0.0.30>:auth<zef:jonathanstowe>:api<1.0>
[35m12:34:39[0m :: ===> Installing: URI:ver<0.3.7>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Installing: License::SPDX:ver<3.22.0>:auth<zef:jonathanstowe>:api<1.0>
[35m12:34:39[0m :: ===> Installing: Test::META:ver<0.0.20>:auth<zef:jonathanstowe>:api<1.0>
[35m12:34:39[0m :: ===> Installing: Test::Notice:ver<1.001005>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Installing: Test::Util::ServerPort:ver<0.0.5>:auth<zef:jonathanstowe>:api<1.0>
[35m12:34:39[0m :: ===> Installing: IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
[35m12:34:39[0m :: ===> Installing: OO::Monitors:ver<1.1.1>
[35m12:34:39[0m :: ===> Installing: IO::Path::ChildSecure:ver<1.2>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Installing: Base64:ver<0.1.0>:auth<github:ugexe>
[35m12:34:39[0m :: ===> Installing: HTTP::HPACK:ver<1.0.0>:auth<zef:jnthn>
[35m12:34:39[0m :: ===> Installing: Cro::Core:ver<0.8.9>:auth<zef:cro>
[35m12:34:39[0m :: ===> Installing: Cro::TLS:ver<0.8.9>:auth<zef:cro>
[35m12:34:39[0m :: ===> Installing: Digest:ver<1.0.1>:auth<zef:grondilu>
[35m12:34:39[0m :: ===> Installing: Digest::HMAC:ver<1.0.7>:auth<zef:jjmerelo>
[35m12:34:39[0m :: ===> Installing: JSON::JWT:ver<1.1.1>:auth<zef:raku-community-modules>
[35m12:34:39[0m :: ===> Installing: DateTime::Parse:ver<0.9.3>:auth<github:sergot>
[35m12:34:39[0m :: ===> Installing: TinyFloats:ver<0.0.4>:auth<zef:japhb>
[35m12:34:39[0m :: ===> Installing: CBOR::Simple:ver<0.1.3>:auth<zef:japhb>
[35m12:34:39[0m :: ===> Installing: Log::Timeline:ver<0.5.1>:auth<zef:jnthn>
[35m12:34:39[0m :: ===> Installing: Cro::HTTP:ver<0.8.9>:auth<zef:cro>
[35m12:34:39[0m :: ===> Installing: Humming-Bird:ver<3.0.2>:auth<zef:rawleyfowler>
[35m12:34:41[0m :: ===> Searching for: App::Prove6
[35m12:35:30[0m :: ===> Searching for missing dependencies: Getopt::Long:ver<0.3.0+>, Path::Finder:ver<0.4.4+>, Pod::Usage, TAP:ver<0.3.4+>, sigpipe
[35m12:35:30[0m :: ===> Searching for missing dependencies: File::Temp
[35m12:35:30[0m :: ===> Staging Getopt::Long:ver<0.4.2>
[35m12:35:30[0m :: ===> Staging [OK] for Getopt::Long:ver<0.4.2>
[35m12:35:30[0m :: ===> Staging File::Temp:ver<0.0.10>:auth<zef:rbt>
[35m12:35:30[0m :: ===> Staging [OK] for File::Temp:ver<0.0.10>:auth<zef:rbt>
[35m12:35:30[0m :: ===> Staging Path::Finder:ver<0.4.6>:auth<zef:leont>
[35m12:35:30[0m :: ===> Staging [OK] for Path::Finder:ver<0.4.6>:auth<zef:leont>
[35m12:35:30[0m :: ===> Staging Pod::Usage:ver<0.0.1>:auth<zef:leont>
[35m12:35:30[0m :: ===> Staging [OK] for Pod::Usage:ver<0.0.1>:auth<zef:leont>
[35m12:35:30[0m :: ===> Staging TAP:ver<0.3.14>
[35m12:35:30[0m :: ===> Staging [OK] for TAP:ver<0.3.14>
[35m12:35:30[0m :: ===> Staging sigpipe:ver<0.0.3>:auth<zef:leont>
[35m12:35:30[0m :: ===> Staging [OK] for sigpipe:ver<0.0.3>:auth<zef:leont>
[35m12:35:30[0m :: ===> Staging App::Prove6:ver<0.0.17>:auth<cpan:LEONT>
[35m12:35:30[0m :: ===> Staging [OK] for App::Prove6:ver<0.0.17>:auth<cpan:LEONT>
[35m12:35:30[0m :: ===> Testing: Getopt::Long:ver<0.4.2>
[35m12:35:30[0m :: ===> Testing [OK] for Getopt::Long:ver<0.4.2>
[35m12:35:30[0m :: ===> Testing: File::Temp:ver<0.0.10>:auth<zef:rbt>
[35m12:35:30[0m :: ===> Testing [OK] for File::Temp:ver<0.0.10>:auth<zef:rbt>
[35m12:35:30[0m :: ===> Testing: Path::Finder:ver<0.4.6>:auth<zef:leont>
[35m12:35:30[0m :: ===> Testing [OK] for Path::Finder:ver<0.4.6>:auth<zef:leont>
[35m12:35:30[0m :: ===> Testing: Pod::Usage:ver<0.0.1>:auth<zef:leont>
[35m12:35:30[0m :: ===> Testing [OK] for Pod::Usage:ver<0.0.1>:auth<zef:leont>
[35m12:35:30[0m :: ===> Testing: TAP:ver<0.3.14>
[35m12:35:30[0m :: ===> Testing [OK] for TAP:ver<0.3.14>
[35m12:35:30[0m :: ===> Testing: sigpipe:ver<0.0.3>:auth<zef:leont>
[35m12:35:30[0m :: ===> Testing [OK] for sigpipe:ver<0.0.3>:auth<zef:leont>
[35m12:35:30[0m :: ===> Testing: App::Prove6:ver<0.0.17>:auth<cpan:LEONT>
[35m12:35:30[0m :: ===> Testing [OK] for App::Prove6:ver<0.0.17>:auth<cpan:LEONT>
[35m12:35:30[0m :: ===> Installing: Getopt::Long:ver<0.4.2>
[35m12:35:30[0m :: ===> Installing: File::Temp:ver<0.0.10>:auth<zef:rbt>
[35m12:35:30[0m :: ===> Installing: Path::Finder:ver<0.4.6>:auth<zef:leont>
[35m12:35:30[0m :: ===> Installing: Pod::Usage:ver<0.0.1>:auth<zef:leont>
[35m12:35:30[0m :: ===> Installing: TAP:ver<0.3.14>
[35m12:35:30[0m :: ===> Installing: sigpipe:ver<0.0.3>:auth<zef:leont>
[35m12:35:30[0m :: ===> Installing: App::Prove6:ver<0.0.17>:auth<cpan:LEONT>
[35m12:35:30[0m ::
[35m12:35:30[0m :: 1 bin/ script [prove6] installed to:
[35m12:35:30[0m :: /home/worker/rakudo-2023.10/install/share/perl6/site/bin
[35m12:35:38[0m :: it/01-basic.rakutest ............. ok
[35m12:35:53[0m :: it/02-error-handlers.rakutest .... ok
[35m12:35:53[0m :: it/03-middlewares.rakutest ....... ok
[35m12:35:53[0m :: it/04-catch-all-routes.rakutest .. ok
[35m12:35:53[0m :: t/01-basic.rakutest .............. ok
[35m12:35:53[0m :: t/02-request_encoding.rakutest ... ok
[35m12:35:53[0m :: t/03-response_decoding.rakutest .. ok
[35m12:35:53[0m :: t/04-middleware.rakutest ......... ok
[35m12:35:53[0m :: t/05-cookie.rakutest ............. ok
[35m12:35:53[0m :: t/06-redirect.rakutest ........... ok
[35m12:35:53[0m :: t/07-advice.rakutest ............. ok
[35m12:35:53[0m :: t/08-static.rakutest ............. ok
[35m12:35:53[0m :: t/09-routers.rakutest ............ ok
[35m12:35:53[0m :: t/10-content-guessing.rakutest ... ok
[35m12:35:53[0m :: t/11-advanced-query.rakutest ..... ok
[35m12:35:53[0m :: t/12-headers.rakutest ............ ok
[35m12:35:53[0m :: All tests successful.
[35m12:35:53[0m :: Files=16, Tests=123, 22 wallclock secs
[35m12:35:53[0m :: Result: PASS
[1;36m[task stderr][0m
[35m12:35:53[0m :: ===> Updating fez mirror: https://360.zef.pm/
[35m12:35:53[0m :: ===> Updated fez mirror: https://360.zef.pm/
[35m12:35:53[0m :: ===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
[35m12:35:53[0m :: ===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
[35m12:36:19[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[1;36m[task run: task.raku - tasks/intergration_tests-hub][0m
[1;36m[dump code: task.raku][0m
[1] my $code;
[2] my @examples;
[3] my $fh = open("source/README.md");
[4] my $cnt = 1;
[5] for $fh.lines -> $i {
[6] if $i ~~ /^ "```raku"/ ^fff^ $i ~~ /^ "```"/ {
[7] $code ~= "$i\n"
[8] } elsif ($i ~~ /^ "```raku"/ or $fh.eof) {
[9] @examples.push(%( config => %( code => $code, cnt => $cnt++ ) )) if $code;
[10] $code = "";
[11] }
[12] }
[13] $fh.close();
[14] update_state(%( list => @examples ));
[15]
[1;36m[task stdout][0m
[1;36m[task run: task.bash - tasks/intergration_tests][0m
[1;36m[dump code: task.bash][0m
[1] echo "run: ["
[2] cat $command
[3] echo "]"
[4] nohup raku $command 1>&2 1>log.txt &
[5] pid=$!
[6] echo "pid: $pid"
[7] echo "====="
[8] echo "GET localhost:8080"
[9] echo "====="
[10] sleep 10
[11] mkdir -p $cache_root_dir/tests/
[12] curl http://localhost:8080 -s -D - -L --verbose -f && touch $cache_root_dir/tests/$cnt.ok
[13] echo "====="
[14] kill $pid
[15] echo "log:"
[16] cat log.txt
[17]
[1;36m[task stdout][0m
[35m12:36:25[0m :: run: [
[35m12:36:25[0m :: use v6.d;
[35m12:36:25[0m ::
[35m12:36:25[0m :: use Humming-Bird::Core;
[35m12:36:25[0m ::
[35m12:36:25[0m :: get('/', -> $request, $response {
[35m12:36:25[0m :: $response.html('<h1>Hello World</h1>');
[35m12:36:25[0m :: });
[35m12:36:25[0m ::
[35m12:36:25[0m :: listen(8080);
[35m12:36:25[0m ::
[35m12:36:25[0m :: # Navigate to localhost:8080!
[35m12:36:25[0m :: ]
[35m12:36:25[0m :: pid: 1804
[35m12:36:25[0m :: =====
[35m12:36:25[0m :: GET localhost:8080
[35m12:36:25[0m :: =====
[35m12:36:35[0m :: HTTP/1.1 200 OK
[35m12:36:35[0m :: Content-Length: 20
[35m12:36:35[0m :: Date: Fri, 17 Nov 2023 12:36:35 +0000
[35m12:36:35[0m :: X-Server: Humming-Bird (Raku)
[35m12:36:35[0m :: content-type: text/html; charset=utf8
[35m12:36:35[0m ::
[35m12:36:35[0m :: <h1>Hello World</h1>=====
[35m12:36:35[0m :: log:
[35m12:36:35[0m :: Humming-Bird listening on port http://localhost:8080
[1;36m[task stderr][0m
[35m12:36:35[0m :: * Trying [::1]:8080...
[35m12:36:35[0m :: * Immediate connect fail for ::1: Address not available
[35m12:36:35[0m :: * Trying 127.0.0.1:8080...
[35m12:36:35[0m :: * Connected to localhost (127.0.0.1) port 8080
[35m12:36:35[0m :: > GET / HTTP/1.1
[35m12:36:35[0m :: > Host: localhost:8080
[35m12:36:35[0m :: > User-Agent: curl/8.4.0
[35m12:36:35[0m :: > Accept: */*
[35m12:36:35[0m :: >
[35m12:36:35[0m :: < HTTP/1.1 200 OK
[35m12:36:35[0m :: < Content-Length: 20
[35m12:36:35[0m :: < Date: Fri, 17 Nov 2023 12:36:35 +0000
[35m12:36:35[0m :: < X-Server: Humming-Bird (Raku)
[35m12:36:35[0m :: < content-type: text/html; charset=utf8
[35m12:36:35[0m :: <
[35m12:36:35[0m :: { [20 bytes data]
[35m12:36:35[0m :: * Connection #0 to host localhost left intact
[1;36m[task run: task.raku - tasks/intergration_tests][0m
[1;36m[dump code: task.raku][0m
[1] say "Finished";
[2] if "{cache_root_dir()}/tests/{config()<cnt>}.ok".IO ~~ :e {
[3] say ">>> PASSED";
[4] update_state(%( test => config()<cnt>, result => "PASSED" ))
[5] } else {
[6] say ">>> FAILED";
[7] update_state(%( test => config()<cnt>, result => "FAILED" ))
[8] }
[9]
[1;36m[task stdout][0m
[35m12:36:36[0m :: Finished
[35m12:36:36[0m :: >>> PASSED
[1;36m[task run: task.bash - tasks/intergration_tests][0m
[1;36m[dump code: task.bash][0m
[1] echo "run: ["
[2] cat $command
[3] echo "]"
[4] nohup raku $command 1>&2 1>log.txt &
[5] pid=$!
[6] echo "pid: $pid"
[7] echo "====="
[8] echo "GET localhost:8080"
[9] echo "====="
[10] sleep 10
[11] mkdir -p $cache_root_dir/tests/
[12] curl http://localhost:8080 -s -D - -L --verbose -f && touch $cache_root_dir/tests/$cnt.ok
[13] echo "====="
[14] kill $pid
[15] echo "log:"
[16] cat log.txt
[17]
[1;36m[task stdout][0m
[35m12:36:37[0m :: run: [
[35m12:36:37[0m :: use v6.d;
[35m12:36:37[0m ::
[35m12:36:37[0m :: use Humming-Bird::Core;
[35m12:36:37[0m :: use JSON::Fast; # A dependency of Humming-Bird
[35m12:36:37[0m ::
[35m12:36:37[0m :: my %users = Map.new('bob', %('name', 'bob'), 'joe', %('name', 'joe'));
[35m12:36:37[0m ::
[35m12:36:37[0m :: get('/users/:user', -> $request, $response {
[35m12:36:37[0m :: my $user = $request.param('user');
[35m12:36:37[0m ::
[35m12:36:37[0m :: if %users{$user}:exists {
[35m12:36:37[0m :: $response.json(to-json %users{$user});
[35m12:36:37[0m :: } else {
[35m12:36:37[0m :: $response.status(404).html("Sorry, $user does not exist.");
[35m12:36:37[0m :: }
[35m12:36:37[0m :: });
[35m12:36:37[0m ::
[35m12:36:37[0m :: post('/users', -> $request, $response {
[35m12:36:37[0m :: my %user = $request.content; # Different from $request.body, $request.content will do its best to decode the data to a Map.
[35m12:36:37[0m :: if my-user-validation-logic(%user) { # Validate somehow, i'll leave that up to you.
[35m12:36:37[0m :: %users{%user<name>} = %user;
[35m12:36:37[0m :: $response.status(201); # 201 created
[35m12:36:37[0m :: } else {
[35m12:36:37[0m :: $response.status(400).html('Bad request');
[35m12:36:37[0m :: }
[35m12:36:37[0m :: });
[35m12:36:37[0m ::
[35m12:36:37[0m :: listen(8080);
[35m12:36:37[0m :: ]
[35m12:36:37[0m :: pid: 1833
[35m12:36:37[0m :: =====
[35m12:36:37[0m :: GET localhost:8080
[35m12:36:37[0m :: =====
[35m12:36:47[0m :: =====
[35m12:36:47[0m :: log:
[1;36m[task stderr][0m
[35m12:36:47[0m :: [31m===[0mSORRY![31m===[0m Error while compiling /home/worker/.sparrow6/tmp/176911/command.raku
[35m12:36:47[0m :: Undeclared routine:
[35m12:36:47[0m :: my-user-validation-logic used at line 20
[35m12:36:47[0m ::
[35m12:36:47[0m :: * Trying [::1]:8080...
[35m12:36:47[0m :: * Immediate connect fail for ::1: Address not available
[35m12:36:47[0m :: * Trying 127.0.0.1:8080...
[35m12:36:47[0m :: * connect to 127.0.0.1 port 8080 failed: Connection refused
[35m12:36:47[0m :: * Failed to connect to localhost port 8080 after 0 ms: Couldn't connect to server
[35m12:36:47[0m :: * Closing connection
[35m12:36:47[0m :: /var/.sparrowdo/env/zef-build/.sparrowdo/tasks/intergration_tests/tasks/smoke_test/task.bash: line 14: kill: (1833) - No such process
[1;36m[task run: task.raku - tasks/intergration_tests][0m
[1;36m[dump code: task.raku][0m
[1] say "Finished";
[2] if "{cache_root_dir()}/tests/{config()<cnt>}.ok".IO ~~ :e {
[3] say ">>> PASSED";
[4] update_state(%( test => config()<cnt>, result => "PASSED" ))
[5] } else {
[6] say ">>> FAILED";
[7] update_state(%( test => config()<cnt>, result => "FAILED" ))
[8] }
[9]
[1;36m[task stdout][0m
[35m12:36:48[0m :: Finished
[35m12:36:48[0m :: >>> FAILED
[1;36m[task run: task.bash - tasks/intergration_tests][0m
[1;36m[dump code: task.bash][0m
[1] echo "run: ["
[2] cat $command
[3] echo "]"
[4] nohup raku $command 1>&2 1>log.txt &
[5] pid=$!
[6] echo "pid: $pid"
[7] echo "====="
[8] echo "GET localhost:8080"
[9] echo "====="
[10] sleep 10
[11] mkdir -p $cache_root_dir/tests/
[12] curl http://localhost:8080 -s -D - -L --verbose -f && touch $cache_root_dir/tests/$cnt.ok
[13] echo "====="
[14] kill $pid
[15] echo "log:"
[16] cat log.txt
[17]
[1;36m[task stdout][0m
[35m12:36:49[0m :: run: [
[35m12:36:49[0m :: use v6.d;
[35m12:36:49[0m ::
[35m12:36:49[0m :: use Humming-Bird::Core;
[35m12:36:49[0m :: use Humming-Bird::Middleware;
[35m12:36:49[0m ::
[35m12:36:49[0m :: # NOTE: Declared routes persist through multiple 'use Humming-Bird::Core' statements
[35m12:36:49[0m :: # allowing you to declare routing logic in multiple places if you want. This is true
[35m12:36:49[0m :: # regardless of whether you're using the sub or Router process for defining routes.
[35m12:36:49[0m :: my $router = Router.new(root => '/');
[35m12:36:49[0m ::
[35m12:36:49[0m :: $router.middleware(&middleware-logger); # middleware-logger is provided by the Middleware package
[35m12:36:49[0m ::
[35m12:36:49[0m :: $router.get(-> $request, $response { # Register a GET route on the root of the router
[35m12:36:49[0m :: $response.html('<h1>Hello World</h1>');
[35m12:36:49[0m :: });
[35m12:36:49[0m ::
[35m12:36:49[0m :: $router.get('/foo', -> $request, $response { # Register a GET route on /foo
[35m12:36:49[0m :: $response.html('<span style="color: blue;">Bar</span>');
[35m12:36:49[0m :: });
[35m12:36:49[0m ::
[35m12:36:49[0m :: my $other-router = Router.new(root => '/bar');
[35m12:36:49[0m ::
[35m12:36:49[0m :: $other-router.get('/baz', -> $request, $response { # Register a GET route on /bar/baz
[35m12:36:49[0m :: $response.file('hello-world.html'); # Will render hello-world.html and infer its content type
[35m12:36:49[0m :: });
[35m12:36:49[0m ::
[35m12:36:49[0m :: # No need to register routers, it's underlying routes are registered with Humming-Bird on creation.
[35m12:36:49[0m :: listen(8080);
[35m12:36:49[0m :: ]
[35m12:36:49[0m :: pid: 1854
[35m12:36:49[0m :: =====
[35m12:36:49[0m :: GET localhost:8080
[35m12:36:49[0m :: =====
[35m12:37:00[0m :: HTTP/1.1 200 OK
[35m12:37:00[0m :: Content-Length: 20
[35m12:37:00[0m :: Date: Fri, 17 Nov 2023 12:37:00 +0000
[35m12:37:00[0m :: X-Server: Humming-Bird (Raku)
[35m12:37:00[0m :: content-type: text/html; charset=utf8
[35m12:37:00[0m ::
[35m12:37:00[0m :: <h1>Hello World</h1>=====
[35m12:37:00[0m :: log:
[35m12:37:00[0m :: Humming-Bird listening on port http://localhost:8080
[1;36m[task stderr][0m
[35m12:37:00[0m :: * Trying [::1]:8080...
[35m12:37:00[0m :: * Immediate connect fail for ::1: Address not available
[35m12:37:00[0m :: * Trying 127.0.0.1:8080...
[35m12:37:00[0m :: * Connected to localhost (127.0.0.1) port 8080
[35m12:37:00[0m :: > GET / HTTP/1.1
[35m12:37:00[0m :: > Host: localhost:8080
[35m12:37:00[0m :: > User-Agent: curl/8.4.0
[35m12:37:00[0m :: > Accept: */*
[35m12:37:00[0m :: >
[35m12:37:00[0m :: < HTTP/1.1 200 OK
[35m12:37:00[0m :: < Content-Length: 20
[35m12:37:00[0m :: < Date: Fri, 17 Nov 2023 12:37:00 +0000
[35m12:37:00[0m :: < X-Server: Humming-Bird (Raku)
[35m12:37:00[0m :: < content-type: text/html; charset=utf8
[35m12:37:00[0m :: <
[35m12:37:00[0m :: { [20 bytes data]
[35m12:37:00[0m :: * Connection #0 to host localhost left intact
[1;36m[task run: task.raku - tasks/intergration_tests][0m
[1;36m[dump code: task.raku][0m
[1] say "Finished";
[2] if "{cache_root_dir()}/tests/{config()<cnt>}.ok".IO ~~ :e {
[3] say ">>> PASSED";
[4] update_state(%( test => config()<cnt>, result => "PASSED" ))
[5] } else {
[6] say ">>> FAILED";
[7] update_state(%( test => config()<cnt>, result => "FAILED" ))
[8] }
[9]
[1;36m[task stdout][0m
[35m12:37:00[0m :: Finished
[35m12:37:00[0m :: >>> PASSED
[1;36m[task run: task.bash - tasks/intergration_tests][0m
[1;36m[dump code: task.bash][0m
[1] echo "run: ["
[2] cat $command
[3] echo "]"
[4] nohup raku $command 1>&2 1>log.txt &
[5] pid=$!
[6] echo "pid: $pid"
[7] echo "====="
[8] echo "GET localhost:8080"
[9] echo "====="
[10] sleep 10
[11] mkdir -p $cache_root_dir/tests/
[12] curl http://localhost:8080 -s -D - -L --verbose -f && touch $cache_root_dir/tests/$cnt.ok
[13] echo "====="
[14] kill $pid
[15] echo "log:"
[16] cat log.txt
[17]
[1;36m[task stdout][0m
[35m12:37:02[0m :: run: [
[35m12:37:02[0m :: use v6.d;
[35m12:37:02[0m ::
[35m12:37:02[0m :: use Humming-Bird::Core;
[35m12:37:02[0m :: use Humming-Bird::Middleware;
[35m12:37:02[0m ::
[35m12:37:02[0m :: get('/logged', -> $request, $response {
[35m12:37:02[0m :: $response.html('This request has been logged!');
[35m12:37:02[0m :: }, [ &middleware-logger ]); # &middleware-logger is provided by Humming-Bird::Middleware
[35m12:37:02[0m ::
[35m12:37:02[0m :: # Custom middleware
[35m12:37:02[0m :: sub block-firefox($request, $response, &next) {
[35m12:37:02[0m :: return $response.status(400) if $request.header('User-Agent').starts-with('Mozilla');
[35m12:37:02[0m :: $response.status(200);
[35m12:37:02[0m :: }
[35m12:37:02[0m ::
[35m12:37:02[0m :: get('/no-firefox', -> $request, $response {
[35m12:37:02[0m :: $response.html('You are not using Firefox!');
[35m12:37:02[0m :: }, [ &middleware-logger, &block-firefox ]);
[35m12:37:02[0m :: ]
[35m12:37:02[0m :: pid: 1882
[35m12:37:02[0m :: =====
[35m12:37:02[0m :: GET localhost:8080
[35m12:37:02[0m :: =====
[35m12:37:12[0m :: =====
[35m12:37:12[0m :: log:
[1;36m[task stderr][0m
[35m12:37:12[0m :: * Trying [::1]:8080...
[35m12:37:12[0m :: * Immediate connect fail for ::1: Address not available
[35m12:37:12[0m :: * Trying 127.0.0.1:8080...
[35m12:37:12[0m :: * connect to 127.0.0.1 port 8080 failed: Connection refused
[35m12:37:12[0m :: * Failed to connect to localhost port 8080 after 0 ms: Couldn't connect to server
[35m12:37:12[0m :: * Closing connection
[35m12:37:12[0m :: /var/.sparrowdo/env/zef-build/.sparrowdo/tasks/intergration_tests/tasks/smoke_test/task.bash: line 14: kill: (1882) - No such process
[1;36m[task run: task.raku - tasks/intergration_tests][0m
[1;36m[dump code: task.raku][0m
[1] say "Finished";
[2] if "{cache_root_dir()}/tests/{config()<cnt>}.ok".IO ~~ :e {
[3] say ">>> PASSED";
[4] update_state(%( test => config()<cnt>, result => "PASSED" ))
[5] } else {
[6] say ">>> FAILED";
[7] update_state(%( test => config()<cnt>, result => "FAILED" ))
[8] }
[9]
[1;36m[task stdout][0m
[35m12:37:12[0m :: Finished
[35m12:37:12[0m :: >>> FAILED
[1;36m[task run: task.bash - tasks/intergration_tests][0m
[1;36m[dump code: task.bash][0m
[1] echo "run: ["
[2] cat $command
[3] echo "]"
[4] nohup raku $command 1>&2 1>log.txt &
[5] pid=$!
[6] echo "pid: $pid"
[7] echo "====="
[8] echo "GET localhost:8080"
[9] echo "====="
[10] sleep 10
[11] mkdir -p $cache_root_dir/tests/
[12] curl http://localhost:8080 -s -D - -L --verbose -f && touch $cache_root_dir/tests/$cnt.ok
[13] echo "====="
[14] kill $pid
[15] echo "log:"
[16] cat log.txt
[17]
[1;36m[task stdout][0m
[35m12:37:14[0m :: run: [
[35m12:37:14[0m :: use v6.d;
[35m12:37:14[0m ::
[35m12:37:14[0m :: use Humming-Bird::Core;
[35m12:37:14[0m ::
[35m12:37:14[0m :: get('/', -> $request, $response {
[35m12:37:14[0m :: $response.html('This request has been logged!');
[35m12:37:14[0m :: });
[35m12:37:14[0m ::
[35m12:37:14[0m :: # Run on a different backend, assuming:
[35m12:37:14[0m :: listen(:backend(Humming-Bird::Backend::MyBackend));
[35m12:37:14[0m :: ]
[35m12:37:14[0m :: pid: 1903
[35m12:37:14[0m :: =====
[35m12:37:14[0m :: GET localhost:8080
[35m12:37:14[0m :: =====
[35m12:37:24[0m :: =====
[35m12:37:24[0m :: log:
[1;36m[task stderr][0m
[35m12:37:24[0m :: Could not find symbol '&MyBackend' in 'Humming-Bird::Backend'
[35m12:37:24[0m :: in block <unit> at /home/worker/.sparrow6/tmp/17698/command.raku line 10
[35m12:37:24[0m ::
[35m12:37:24[0m :: * Trying [::1]:8080...
[35m12:37:24[0m :: * Immediate connect fail for ::1: Address not available
[35m12:37:24[0m :: * Trying 127.0.0.1:8080...
[35m12:37:24[0m :: * connect to 127.0.0.1 port 8080 failed: Connection refused
[35m12:37:24[0m :: * Failed to connect to localhost port 8080 after 0 ms: Couldn't connect to server
[35m12:37:24[0m :: * Closing connection
[35m12:37:24[0m :: /var/.sparrowdo/env/zef-build/.sparrowdo/tasks/intergration_tests/tasks/smoke_test/task.bash: line 14: kill: (1903) - No such process
[1;36m[task run: task.raku - tasks/intergration_tests][0m
[1;36m[dump code: task.raku][0m
[1] say "Finished";
[2] if "{cache_root_dir()}/tests/{config()<cnt>}.ok".IO ~~ :e {
[3] say ">>> PASSED";
[4] update_state(%( test => config()<cnt>, result => "PASSED" ))
[5] } else {
[6] say ">>> FAILED";
[7] update_state(%( test => config()<cnt>, result => "FAILED" ))
[8] }
[9]
[1;36m[task stdout][0m
[35m12:37:24[0m :: Finished
[35m12:37:24[0m :: >>> FAILED
[35m12:37:58[0m :: [repository] - index updated from https://sparrowhub.io/repo/api/v1/index
run stage: run
[1;36m[task run: task.raku - tasks/test_report][0m
[1;36m[dump code: task.raku][0m
[1] for config()<parent><state><> -> $i {
[2] say "test_{$i<test>} >>> {$i<result>}";
[3] }
[4]
[1;36m[task stdout][0m
[35m12:38:01[0m :: test_1 >>> PASSED
[35m12:38:01[0m :: test_2 >>> FAILED
[35m12:38:01[0m :: test_3 >>> PASSED
[35m12:38:01[0m :: test_4 >>> FAILED
[35m12:38:01[0m :: test_5 >>> FAILED