« blib/lib/Ukigumo/Server/Schema.pm
↑ Summary
blib/lib/auto/share/dist/Ukigumo-Server/eg/perlish-client.pl »
| 1 | #!/usr/bin/perl | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use utf8; | ||
| 5 | |||
| 6 | use LWP::UserAgent; | ||
| 7 | |||
| 8 | my $ua = LWP::UserAgent->new(); | ||
| 9 | my $res = $ua->post('http://localhost:9052/api/v1/report/add', [ | ||
| 10 | status => 1, # status code: SUCCESS:1, FAIL:2, N/A:3 | ||
| 11 | project => 'MyProj', # project name | ||
| 12 | branch => 'master', # branch name | ||
| 13 | vc_log => <<'...', # optional | ||
| 14 | commit 80202d0952c6f7d9aeb6dc24a12484e47e212c28 | ||
| 15 | Author: Tokuhiro Matsuno <tokuhirom@gmail.com> | ||
| 16 | Date: Tue Sep 6 10:11:08 2011 +0900 | ||
| 17 | |||
| 18 | do not index production.pl | ||
| 19 | ... | ||
| 20 | body => <<'...', # test report body | ||
| 21 | うーむ。。 | ||
| 22 | t/00_compile.t .. | ||
| 23 | 1..1 | ||
| 24 | ok 1 - use Acme::Failing; | ||
| 25 | ok | ||
| 26 | t/01_fail.t ..... | ||
| 27 | not ok 1 - oops.. | ||
| 28 | 1..1 | ||
| 29 | |||
| 30 | # Failed test 'oops..' | ||
| 31 | # at t/01_fail.t line 6. | ||
| 32 | # Looks like you failed 1 test of 1. | ||
| 33 | Dubious, test returned 1 (wstat 256, 0x100) | ||
| 34 | Failed 1/1 subtests | ||
| 35 | |||
| 36 | Test Summary Report | ||
| 37 | ------------------- | ||
| 38 | t/01_fail.t (Wstat: 256 Tests: 1 Failed: 1) | ||
| 39 | Failed test: 1 | ||
| 40 | Non-zero exit status: 1 | ||
| 41 | Files=2, Tests=2, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.05 cusr 0.02 csys = 0.12 CPU) | ||
| 42 | Result: FAIL | ||
| 43 | ... | ||
| 44 | revision => '80202d0952c6f7d9aeb6dc24a12484e47e212c28', # revision hash/number | ||
| 45 | repo => 'git://github.com/tokuhirom/Acme-Failing.git', # repository uri | ||
| 46 | ]); | ||
| 47 | $res->is_success or die $res->as_string; | ||
| 48 |