Re: Test failures when installing 0install

Thomas Leonard <[email protected]>
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <CAG4opy9iw5H=G+tOZqmyd+OGAHDMV3h6mKnO-pmrktMf5zLmFw@mail.gmail.com>
On 4 September 2015 at 14:56, Thomas Leonard <[email protected]> wrote:
> On 4 September 2015 at 14:27, Ilja Honkonen <[email protected]> wrote:
>> Hello
>> I get a few errors when trying to install 0install using instructions at
>> http://0install.net/install-source.html:
>>
>> info: Getting new selections for http://example.com:8000/Hello.xml
>> warning: Test failed: Unix.Unix_error(Unix.ENOENT, "mkdir",
>> "/private/tmp/0install-test-a57bfd5/cache/0install.net/injector")
[...]
>>
>> E......................................................................................................................................(showing
>> full log)
>> info: stopping gpg agent
>> info: Shutting down server...
>> warning: Test failed: Test tried to spawn process port -v installed
>> Raised at file "map.ml", line 117, characters 16-25
>> Called from file "str.ml", line 253, characters 6-29
>>
>> E..................S...............S......................
>> ==============================================================================
>> Error: 0install:17:download:27:background-unsolvable
>>
>> Test tried to spawn process port -v installed
>> ------------------------------------------------------------------------------
>> ==============================================================================
>> Error: 0install:6:0install:0:select
>>
>> Unix.Unix_error(Unix.ENOENT, "mkdir",
>> "/private/tmp/0install-test-a57bfd5/cache/0install.net/injector")
>> ------------------------------------------------------------------------------
>> Ran: 273 tests in: 3.57 seconds.
>> FAILED: Cases: 273 Tried: 273 Errors: 2 Failures: 0 Skip:  3 Todo: 0
>> Timeouts: 0.
>>
>> Any ideas? port -v installed does work when run manually.
>
> It's complaining because the code tried to run "port -v", but the
> unit-test wasn't expecting it to do that.
>
> "port -v" comes from the MacPorts support, which was accidentally
> disabled for a couple of years but was recently reenabled. It may
> contain bugs.

Correction: MacPorts was working fine. It was plain OS X without
MacPorts which wasn't working (basically, this just meant native Java
wasn't found).

> In this case, it's called from "regenerate_cache" in
> distro_impls.ml:493, but I'm not sure why we're updating the cache
> anyway, since there are no package-implementations in the test case.

I think the problem was that this test was supposed to use
generic_distribution, but it detected the native MacPorts due to a
missing check in fake_system.ml. This might fix it:

https://github.com/0install/0install/commit/7e58551393b1db251bfcc68ab48a438409fe8162



-- 
Dr Thomas Leonard        http://roscidus.com/blog/
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.