ugexe / zef

Raku Module Management
Artistic License 2.0
209 stars 45 forks source link

zef's test command fails without reason if `prove` is not available #277

Closed Tyil closed 5 years ago

Tyil commented 5 years ago

When trying to install a module with zef, the test phase fails without a reason if prove is not available.

Context

I'm playing around with Docker images, and was trying to create a Docker container based on Alpine with Rakudo Star installed. Rakudo Star will install zef as part of it's make install step. However, this step fails when prove isn't available:

===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
===> Testing [FAIL]: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.5.3>:auth<github:ugexe>:api<0> (use --force-test to override)

As you can see, there's no reason given as to why it actually failed.

Expected Behavior

Provide a reason as to why testing failed. In this case, installing perl-utils on Alpine fixes the failing test, as it contains the prove program.

Actual Behavior

Testing fails without providing any reason as to why it fails.

Steps to Reproduce

docker run -it alpine:latest sh
wget "https://rakudo.org/latest/star/source" 
tar xzf source 
cd rakudo-star-*
apk add --no-cache build-base git perl libressl
perl Configure.pl --prefix=/usr --backend=moar --gen-moar 
make
make install

Your Environment

This is Rakudo Star version 2018.10 built on MoarVM version 2018.10
implementing Perl 6.c.

zef failed to install, so there's no information on that available.

ugexe commented 5 years ago

Testing will fall back to the perl6 binary if prove is not found. It sounds like the build process for Rakudo star is flawed.

Tyil commented 5 years ago

I actually did clone this repo, and try it with perl6 -Ilib bin/zef install ., and that got the same error.

ugexe commented 5 years ago

https://github.com/ugexe/zef/blob/6f6ebbf7721b35fc1dc5c460d3e882f0a5711e4b/.travis.yml#L42-L43

You might try each of these. The second will explicitly run with prove, the first will explicitly run with perl6

ugexe commented 5 years ago

It certainly finds something -- it just doesn't seem to work on your system like it should. Consider if I disable all test plugins:

$ zef test . --/tap-harness --/prove --/perl6-test
===> Testing: App::Zef::WebAPI:ver<0.0.1>:auth<github:ugexe>:api<0>
Enabled testing backends [] don't understand /Users/ugexe/repos/Perl6-App--Zef--WebAPI
You may need to configure one of the following backends, or install its underlying software - [tap-harness prove perl6-test]

note how there is a message explaining it cannot find any available backends.

Tyil commented 5 years ago

Output of make install from Rakudo Star:

== Installing modules for MoarVM
cd modules/zef && sh -c "PATH='/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' /usr/bin/perl6-m -Ilib bin/zef install ."
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
===> Testing [FAIL]: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.5.3>:auth<github:ugexe>:api<0> (use --force-test to override)
make: *** [Makefile:66: modules-install-m] Error 1

Cloning zef:

/tmp # git clone https://github.com/ugexe/zef
Cloning into 'zef'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 9672 (delta 4), reused 6 (delta 0), pack-reused 9659
Receiving objects: 100% (9672/9672), 1.76 MiB | 2.79 MiB/s, done.
Resolving deltas: 100% (5941/5941), done.
/tmp # cd zef

Running standard installation with -I.:

/tmp/zef # perl6 -I. bin/zef install .
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
===> Testing [FAIL]: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.5.3>:auth<github:ugexe>:api<0> (use --force-test to override)

Running standard installation with -Ilib:

/tmp/zef # perl6 -Ilib bin/zef install .
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
===> Testing [FAIL]: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.5.3>:auth<github:ugexe>:api<0> (use --force-test to override)

Running with -Ilib --/tap-harness --/prove:

/tmp/zef # perl6 -Ilib bin/zef --/tap-harness --/prove test .
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
===> Testing [FAIL]: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.5.3>:auth<github:ugexe>:api<0> (use --force-test to override)

Running with -I. --/tap-harness --/prove --perl6-test:

/tmp/zef # perl6 -I. bin/zef --/tap-harness --/prove --perl6-test test .
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
===> Testing [FAIL]: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.5.3>:auth<github:ugexe>:api<0> (use --force-test to override)

Running with -I. --/tap-harness --prove --/perl6-test:

/tmp/zef # perl6 -I. bin/zef --/tap-harness --prove  --/perl6-test test .
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Enabled testing backends [] don't understand /tmp/zef
You may need to configure one of the following backends, or install its underlying software - [tap-harness prove perl6-test]

Running all the tests directly:

/tmp/zef # for i in t/*; do perl6 -Ilib "$i"; done
1..2
    ok 1 - Zef module can be use-d ok
    ok 2 - Zef::Build module can be use-d ok
    ok 3 - Zef::Config module can be use-d ok
    ok 4 - Zef::Extract module can be use-d ok
    ok 5 - Zef::Identity module can be use-d ok
    ok 6 - Zef::Test module can be use-d ok
    ok 7 - Zef::Fetch module can be use-d ok
    ok 8 - Zef::Client module can be use-d ok
    ok 9 - Zef::Repository module can be use-d ok
    ok 10 - Zef::Repository::MetaCPAN module can be use-d ok
    ok 11 - Zef::Repository::LocalCache module can be use-d ok
    ok 12 - Zef::Repository::Ecosystems module can be use-d ok
    ok 13 - Zef::Distribution module can be use-d ok
    ok 14 - Zef::Distribution::DependencySpecification module can be use-d ok
    ok 15 - Zef::Distribution::Local module can be use-d ok
    ok 16 - Zef::Utils::FileSystem module can be use-d ok
    ok 17 - Zef::Utils::SystemInfo module can be use-d ok
    ok 18 - Zef::Utils::URI module can be use-d ok
    1..18
ok 1 - Core
    ok 1 - Zef::Service::FetchPath module can be use-d ok
    ok 2 - Zef::Service::TAP module can be use-d ok
    ok 3 - Zef::Service::Shell::DistributionBuilder module can be use-d ok
    ok 4 - Zef::Service::Shell::LegacyBuild module can be use-d ok
    ok 5 - Zef::Service::Shell::Test module can be use-d ok
    ok 6 - Zef::Service::Shell::prove module can be use-d ok
    ok 7 - Zef::Service::Shell::unzip module can be use-d ok
    ok 8 - Zef::Service::Shell::tar module can be use-d ok
    ok 9 - Zef::Service::Shell::p5tar module can be use-d ok
    ok 10 - Zef::Service::Shell::curl module can be use-d ok
    ok 11 - Zef::Service::Shell::git module can be use-d ok
    ok 12 - Zef::Service::Shell::wget module can be use-d ok
    ok 13 - Zef::Service::Shell::PowerShell module can be use-d ok
    ok 14 - Zef::Service::Shell::PowerShell::download module can be use-d ok
    ok 15 - Zef::Service::Shell::PowerShell::unzip module can be use-d ok
    1..15
ok 2 - Plugins
1..4
ok 1 - 
ok 2 - 
ok 3 - 
ok 4 - 
1..8
        ok 1 - 
        ok 2 - 
        ok 3 - 
        1..3
    ok 1 - github:ugexe:Net--HTTP:1.0
        ok 1 - 
        ok 2 - 
        ok 3 - 
        1..3
    ok 2 - github:ugexe:Net-HTTP:*
        ok 1 - 
        ok 2 - 
        ok 3 - 
        1..3
    ok 3 - github:ugexe:Net-HTTP:1.0+
    1..3
ok 1 - Distribution URN
    ok 1 - 
    ok 2 - 
    ok 3 - 
    ok 4 - 
    ok 5 - 
    ok 6 - 
    ok 7 - 
    ok 8 - 
    ok 9 - 
    1..9
ok 2 - Require spec - exact
    ok 1 - 
    ok 2 - 
    ok 3 - 
    1..3
ok 3 - Require spec - range *
    ok 1 - 
    ok 2 - 
    ok 3 - 
    ok 4 - 
    ok 5 - 
    ok 6 - 
    ok 7 - 
    ok 8 - 
    ok 9 - 
    1..9
ok 4 - Require spec - range +
    ok 1 - 
    ok 2 - 
    ok 3 - 
    ok 4 - 
    1..4
ok 5 - methods
    ok 1 - 
        ok 1 - 
        ok 2 - 
        1..2
    ok 2 - exact
        ok 1 - 
        1..1
    ok 3 - not exact
        ok 1 - 
        1..1
    ok 4 - root namespace
    1..4
ok 6 - str2identity
    ok 1 - 
    ok 2 - 
    ok 3 - 
    ok 4 - 
    ok 5 - 
    1..5
ok 7 - identity2hash
    ok 1 - 
    ok 2 - 
    1..2
ok 8 - hash2identity
1..4
    ok 1 - Folder available to delete
    ok 2 - file was found in list-paths
    ok 3 - Deleted: /tmp/1544110719/1
    ok 4 - file was found in list-paths
    ok 5 - Deleted: /tmp/1544110719/1/deleteme-subfolder
    ok 6 - file was found in list-paths
    ok 7 - Deleted: /tmp/1544110719/1/base-delete.me
    ok 8 - file was found in list-paths
    ok 9 - Deleted: /tmp/1544110719/1/deleteme-subfolder/sub-delete.me
    1..9
ok 1 - list-paths and delete-paths :d :f :r (rm -rf)
    ok 1 - Folder available to delete
    ok 2 - File was found in list-paths
    ok 3 - Deleted: /tmp/1544110719/2/base-delete.me
    ok 4 - Did not delete sub-file or delete non-empty directory
    1..4
ok 2 - list-paths and delete-paths :d :f (no recursion)
    ok 1 - Folder available to delete
    ok 2 - File was found in list-paths
    ok 3 - Deleted: /tmp/1544110719/3/empty-subfolder
    ok 4 - Did not delete sub-file or delete non-empty directory
    1..4
ok 3 - list-paths and delete-paths :d :r
    ok 1 - Folder available to delete
    ok 2 - File was found in list-paths
    ok 3 - Deleted: /tmp/1544110719/4/base-delete.me
    ok 4 - Did not delete sub-file or delete non-empty directory
    ok 5 - File was found in list-paths
    ok 6 - Deleted: /tmp/1544110719/4/deleteme-subfolder/sub-delete.me
    ok 7 - Did not delete sub-file or delete non-empty directory
    1..7
ok 4 - list-paths and delete-paths :f :r

I've also tried the regular installations with --debug, which shows the following:

/tmp/zef # perl6 -Ilib bin/zef --debug install .
===> Dependencies: NativeCall, Test
===> Filtering: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
===> Filtering [OK] for zef:ver<0.5.3>:auth<github:ugexe>:api<0>
===> # SKIP: No need to build zef:ver<0.5.3>:auth<github:ugexe>:api<0>
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Testing with plugin: Zef::Service::Shell::Test+{<anon|1>}
===> Testing [FAIL]: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.5.3>:auth<github:ugexe>:api<0> (use --force-test to override)
ugexe commented 5 years ago

Confirmed broken since https://github.com/ugexe/zef/commit/403fb9f77ea62caa8d951bcef316f0fa42749e62 -- a bad copy paste of boilerplate left the plain perl6 binary tester still using the prove command as seen here: https://github.com/ugexe/zef/blob/6f6ebbf7721b35fc1dc5c460d3e882f0a5711e4b/lib/Zef/Service/Shell/Test.pm6#L30

I think just removing the 'prove', '-r', '-e' is all that should be needed as evident from the original working implementation: https://github.com/ugexe/zef/blob/4120eb0bac60daee4469ca681058d12da49d1808/lib/Zef/Service/Shell/Test.pm6#L28-L29

Tyil commented 5 years ago

Changing that line to my $proc = zrun(:cwd($path), :$env, :out, :err, $*EXECUTABLE.absolute, $relpath);, and trying to install again does mention that there's no suitable testing backend available:

/tmp/zef # perl6 -Ilib bin/zef install .
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Enabled testing backends [] don't understand /tmp/zef
You may need to configure one of the following backends, or install its underlying software - [tap-harness prove perl6-test]

When changing to my $proc = zrun($*EXECUTABLE.absolute, $test-path.relative($path));, it runs as follows:

/tmp/zef # perl6 -Ilib bin/zef install .
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Can not run directory t.
===> Testing [FAIL]: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.5.3>:auth<github:ugexe>:api<0> (use --force-test to override)
ugexe commented 5 years ago

Ah right. So it needs to use $test-file since it tests eash individual file unlike prove, so something like my $proc = zrun($*EXECUTABLE.absolute, $test-file.relative($path));

Tyil commented 5 years ago

That does seem to run the tests files, but fails on tests:

/tmp/zef # perl6 -Ilib bin/zef install .
===> Testing: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
1..2
    not ok 1 - Zef module can be use-d ok
    # Failed test 'Zef module can be use-d ok'
    # at t/00-load.t line 6
    # Could not find Zef at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 2 - Zef::Build module can be use-d ok
    # Failed test 'Zef::Build module can be use-d ok'
    # at t/00-load.t line 9
    # Could not find Zef::Build at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 3 - Zef::Config module can be use-d ok
    # Failed test 'Zef::Config module can be use-d ok'
    # at t/00-load.t line 10
    # Could not find Zef::Config at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 4 - Zef::Extract module can be use-d ok
    # Failed test 'Zef::Extract module can be use-d ok'
    # at t/00-load.t line 11
    # Could not find Zef::Extract at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 5 - Zef::Identity module can be use-d ok
    # Failed test 'Zef::Identity module can be use-d ok'
    # at t/00-load.t line 12
    # Could not find Zef::Identity at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 6 - Zef::Test module can be use-d ok
    # Failed test 'Zef::Test module can be use-d ok'
    # at t/00-load.t line 13
    # Could not find Zef::Test at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 7 - Zef::Fetch module can be use-d ok
    # Failed test 'Zef::Fetch module can be use-d ok'
    # at t/00-load.t line 14
    # Could not find Zef::Fetch at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 8 - Zef::Client module can be use-d ok
    # Failed test 'Zef::Client module can be use-d ok'
    # at t/00-load.t line 15
    # Could not find Zef::Client at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 9 - Zef::Repository module can be use-d ok
    # Failed test 'Zef::Repository module can be use-d ok'
    # at t/00-load.t line 17
    # Could not find Zef::Repository at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 10 - Zef::Repository::MetaCPAN module can be use-d ok
    # Failed test 'Zef::Repository::MetaCPAN module can be use-d ok'
    # at t/00-load.t line 18
    # Could not find Zef::Repository::MetaCPAN at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 11 - Zef::Repository::LocalCache module can be use-d ok
    # Failed test 'Zef::Repository::LocalCache module can be use-d ok'
    # at t/00-load.t line 19
    # Could not find Zef::Repository::LocalCache at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 12 - Zef::Repository::Ecosystems module can be use-d ok
    # Failed test 'Zef::Repository::Ecosystems module can be use-d ok'
    # at t/00-load.t line 20
    # Could not find Zef::Repository::Ecosystems at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 13 - Zef::Distribution module can be use-d ok
    # Failed test 'Zef::Distribution module can be use-d ok'
    # at t/00-load.t line 22
    # Could not find Zef::Distribution at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 14 - Zef::Distribution::DependencySpecification module can be use-d ok
    # Failed test 'Zef::Distribution::DependencySpecification module can be use-d ok'
    # at t/00-load.t line 23
    # Could not find Zef::Distribution::DependencySpecification at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 15 - Zef::Distribution::Local module can be use-d ok
    # Failed test 'Zef::Distribution::Local module can be use-d ok'
    # at t/00-load.t line 24
    # Could not find Zef::Distribution::Local at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 16 - Zef::Utils::FileSystem module can be use-d ok
    # Failed test 'Zef::Utils::FileSystem module can be use-d ok'
    # at t/00-load.t line 26
    # Could not find Zef::Utils::FileSystem at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 17 - Zef::Utils::SystemInfo module can be use-d ok
    # Failed test 'Zef::Utils::SystemInfo module can be use-d ok'
    # at t/00-load.t line 27
    # Could not find Zef::Utils::SystemInfo at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 18 - Zef::Utils::URI module can be use-d ok
    # Failed test 'Zef::Utils::URI module can be use-d ok'
    # at t/00-load.t line 28
    # Could not find Zef::Utils::URI at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    1..18
    # Looks like you failed 18 tests of 18
not ok 1 - Core
# Failed test 'Core'
# at t/00-load.t line 5
    not ok 1 - Zef::Service::FetchPath module can be use-d ok
    # Failed test 'Zef::Service::FetchPath module can be use-d ok'
    # at t/00-load.t line 32
    # Could not find Zef::Service::FetchPath at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 2 - Zef::Service::TAP module can be use-d ok
    # Failed test 'Zef::Service::TAP module can be use-d ok'
    # at t/00-load.t line 33
    # Could not find Zef::Service::TAP at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 3 - Zef::Service::Shell::DistributionBuilder module can be use-d ok
    # Failed test 'Zef::Service::Shell::DistributionBuilder module can be use-d ok'
    # at t/00-load.t line 34
    # Could not find Zef::Service::Shell::DistributionBuilder at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 4 - Zef::Service::Shell::LegacyBuild module can be use-d ok
    # Failed test 'Zef::Service::Shell::LegacyBuild module can be use-d ok'
    # at t/00-load.t line 35
    # Could not find Zef::Service::Shell::LegacyBuild at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 5 - Zef::Service::Shell::Test module can be use-d ok
    # Failed test 'Zef::Service::Shell::Test module can be use-d ok'
    # at t/00-load.t line 36
    # Could not find Zef::Service::Shell::Test at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 6 - Zef::Service::Shell::prove module can be use-d ok
    # Failed test 'Zef::Service::Shell::prove module can be use-d ok'
    # at t/00-load.t line 37
    # Could not find Zef::Service::Shell::prove at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 7 - Zef::Service::Shell::unzip module can be use-d ok
    # Failed test 'Zef::Service::Shell::unzip module can be use-d ok'
    # at t/00-load.t line 38
    # Could not find Zef::Service::Shell::unzip at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 8 - Zef::Service::Shell::tar module can be use-d ok
    # Failed test 'Zef::Service::Shell::tar module can be use-d ok'
    # at t/00-load.t line 39
    # Could not find Zef::Service::Shell::tar at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 9 - Zef::Service::Shell::p5tar module can be use-d ok
    # Failed test 'Zef::Service::Shell::p5tar module can be use-d ok'
    # at t/00-load.t line 40
    # Could not find Zef::Service::Shell::p5tar at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 10 - Zef::Service::Shell::curl module can be use-d ok
    # Failed test 'Zef::Service::Shell::curl module can be use-d ok'
    # at t/00-load.t line 41
    # Could not find Zef::Service::Shell::curl at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 11 - Zef::Service::Shell::git module can be use-d ok
    # Failed test 'Zef::Service::Shell::git module can be use-d ok'
    # at t/00-load.t line 42
    # Could not find Zef::Service::Shell::git at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 12 - Zef::Service::Shell::wget module can be use-d ok
    # Failed test 'Zef::Service::Shell::wget module can be use-d ok'
    # at t/00-load.t line 43
    # Could not find Zef::Service::Shell::wget at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 13 - Zef::Service::Shell::PowerShell module can be use-d ok
    # Failed test 'Zef::Service::Shell::PowerShell module can be use-d ok'
    # at t/00-load.t line 44
    # Could not find Zef::Service::Shell::PowerShell at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 14 - Zef::Service::Shell::PowerShell::download module can be use-d ok
    # Failed test 'Zef::Service::Shell::PowerShell::download module can be use-d ok'
    # at t/00-load.t line 45
    # Could not find Zef::Service::Shell::PowerShell::download at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    not ok 15 - Zef::Service::Shell::PowerShell::unzip module can be use-d ok
    # Failed test 'Zef::Service::Shell::PowerShell::unzip module can be use-d ok'
    # at t/00-load.t line 46
    # Could not find Zef::Service::Shell::PowerShell::unzip at line 1 in:
    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
    1..15
    # Looks like you failed 15 tests of 15
not ok 2 - Plugins
# Failed test 'Plugins'
# at t/00-load.t line 31
# Looks like you failed 2 tests of 2
===> Testing [FAIL]: zef:ver<0.5.3>:auth<github:ugexe>:api<0>
Aborting due to test failure: zef:ver<0.5.3>:auth<github:ugexe>:api<0> (use --force-test to override)

I'm wondering why it can't find Zef, as I'm passing -Ilib and Zef.pm6 exists in lib. The results are similar with -I.. I also don't see /tmp/zef/lib appear in the list of directories it's checking for modules:

    #     /root/.perl6
    #     /usr/share/perl6/site
    #     /usr/share/perl6/vendor
    #     /usr/share/perl6
    #     CompUnit::Repository::AbsolutePath<93857487911008>
    #     CompUnit::Repository::NQP<93857456650632>
    #     CompUnit::Repository::Perl5<93857456650672>
ugexe commented 5 years ago

That seems like ENV is not getting setup correctly or is not being sent properly to the spawned process. The code appears correct, but you might want to see what the following contains: https://github.com/ugexe/zef/blob/6f6ebbf7721b35fc1dc5c460d3e882f0a5711e4b/lib/Zef/Service/Shell/Test.pm6#L26

and if that is carrying over to https://github.com/ugexe/zef/blob/6f6ebbf7721b35fc1dc5c460d3e882f0a5711e4b/lib/Zef/Service/Shell/Test.pm6#L33

niner commented 5 years ago

You need to bind in line 23 instead of assign: https://github.com/ugexe/zef/blob/6f6ebbf7721b35fc1dc5c460d3e882f0a5711e4b/lib/Zef/Service/Shell/Test.pm6#L23 Otherwise the changes to the hash won't make it into %*ENV

niner commented 5 years ago

Oh, you're passing %ENV to Proc.start anyway, so it shouldn't matter

ugexe commented 5 years ago

We used to bind, but that was the cause of https://github.com/ugexe/zef/issues/270

ugexe commented 5 years ago

You should also be using zrun-async, not zrun, such that the code you posted my $proc = zrun(:cwd($path), :$env, :out, :err, $*EXECUTABLE.absolute, $relpath); actually reads my $proc = zrun-async($*EXECUTABLE.absolute, $relpath);

The way ENV is passed to run is not exactly the same as with Proc::Async

Tyil commented 5 years ago

With the line reading my $proc = zrun-async($*EXECUTABLE.absolute, $relpath);, perl6 -Ilib bin/zef install . tests and installs correctly.