Re: [PATCH v5 14/15] trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.sh
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 13, 2019, 13:15 UTC
- Message-ID
- <87h8d7kex4.fsf@evledraar.gmail.com>
- In-Reply-To
- <00b25da38bd107b543a34833e5e363385c9eaa37.1549043937.git.gitgitgadget@gmail.com>
On Fri, Feb 01 2019, Jeff Hostetler via GitGitGadget wrote:
> +test_expect_success 'event stream, error event' ' > + test_when_finished "rm trace.event actual expect" && > + GIT_TR2_EVENT="$(pwd)/trace.event" test-tool trace2 003error "hello world" "this is a test" && > + perl "$TEST_DIRECTORY/t0212/parse_events.perl" <trace.event >actual &&
These & similar tests on some systems ...
Show 13 quoted lines
> [...] > diff --git a/t/t0212/parse_events.perl b/t/t0212/parse_events.perl > new file mode 100644 > index 0000000000..a2776ba216 > --- /dev/null > +++ b/t/t0212/parse_events.perl > @@ -0,0 +1,251 @@ > [...] > +use strict; > +use warnings; > +use JSON::PP; > +use Data::Dumper; > +use Getopt::Long;
...because JSON::PP is not a core perl module. See e.g. t/t9501-gitweb-standalone-http-status.sh for how we deal with this, i.e.:
perl -MJSON::PP -e 0 >/dev/null 2>&1 && test_set_prereq JSON_PP
Then later e.g.:
test_expect_success JSON_PP 'event stream, error event' '[...]