[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Testing isolated builds
From: |
Marius Bakke |
Subject: |
Re: Testing isolated builds |
Date: |
Wed, 20 Sep 2017 17:49:05 +0200 |
User-agent: |
Notmuch/0.25.1 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) |
Pjotr Prins <address@hidden> writes:
> On Wed, Sep 20, 2017 at 02:18:01PM +0200, Pjotr Prins wrote:
>> I am facing some issues try to upgrade Elixir. The problem is that the
>> build fails on tests, but when I build by hand inside
>> /tmp/guix-build-elixir-1.5.1.drv-0/ the build passes.
>>
>> Is there an easy way to create a similarly restricted environment when
>> doing a build outside Guix? I.e., no $HOME, no /tmp access, no
>> network? Any hints on an approach?
>
> When I build with Guix I get an error
>
> test/elixir/kernel/dialyzer_test.exs:95
> ** (File.CopyError) could not copy from
> "/tmp/guix-build-elixir-1.5.1.drv-0/elixir-1.5.1/lib/elixir/tmp/dialyzer/Elixir.Dialyzer.ForBooleanCheck.beam"
> to
> "/tmp/guix-build-elixir-1.5.1.drv-0/elixir-1.5.1/lib/elixir/tmp/dialyzer/line95/Elixir.Dialyzer.ForBooleanCheck.beam":
> no such file or directory
> code: copy_beam! context, Dialyzer.ForBooleanCheck
> stacktrace:
> (elixir) lib/file.ex:631: File.cp!/3
> test/elixir/kernel/dialyzer_test.exs:96: (test)
>
>
> When I try:
>
> ./pre-inst-env guix environment erlang -C --ad-hoc erlang vim make \
> glibc-utf8-locales git --pure \
> --share=/tmp/guix-build-elixir-1.5.1.drv-12
>
> That gives me a clean environment, but now all effing tests pass!
>
> The Guix build environment does not create
> /tmp/guix-build-elixir-1.5.1.drv-0/elixir-1.5.1/lib/elixir/tmp for some
> reason.
> Because when then test fails it does not exist. The
> Elixir.Dialyzer.ForBooleanCheck.beam is never created.
>
> It is weird.
>
> Could it be file permissions? I think mkdir_p would throw a descriptive error
> if it fails.
>
> If no one has an idea here I'll try and plug in informative errors. But it is
> a
> royal pain I can't reproduce the error in guix environment.
IIRC the main difference between `guix environment -C` and the build
container is that /bin/sh is present in the former. Maybe grep for it?
signature.asc
Description: PGP signature