1.8.0 build from source - test fails

Elixir 1.8.0 build from source - test fails

System: Ubuntu 18.04.1 LTS/Virtualbox
Erlang: 21.2
Elixir: 1.8.0

Earlier 1.8-rc versions didn’t have any error when built from source.

Here is the command used:

(export PATH=/home/vagrant/apps/erlang_21.2/bin:$PATH; export PREFIX=/home/vagrant/apps/elixir_1.8.0; make -e clean; make -e test --trace)

Didn’t have the --trace option for test before. Added it after getting timeouts. Still fails.

The following warning shows up:

  "warning: redefining module GitRepo
    (current version loaded from /tmp/__ex_build/elixir-1.8.0/lib/mix/tmp/Mix.Tasks.DepsGitTest/test
    gets and updates many levels deep dependencies/_build/dev/lib/git_repo/ebin/Elixir.GitRepo.beam)
    lib/git_repo.ex:2

Here is the test failure:

  cd lib/mix && ../../bin/elixir -r \"test/test_helper.exs\" -pr \"test/**/*_test.exs\";
  Excluding tags: [windows: true]
  ....................................................................................................................................................................
    1) test --failed: loads only files with failures and runs just the failures (Mix.Tasks.TestTest)
       /tmp/__ex_build/elixir-1.8.0/lib/mix/test/mix/tasks/test_test.exs:147
       ** (ExUnit.TimeoutError) test timed out after 60000ms. You can change the timeout:

         1. per test by setting \"@tag timeout: x\"
         2. per case by setting \"@moduletag timeout: x\"
         3. globally via \"ExUnit.start(timeout: x)\" configuration
         4. or set it to infinity per run by calling \"mix test --trace\"
            (useful when using IEx.pry/0)

       Timeouts are given as integers in milliseconds.

       stacktrace:
         (elixir) lib/system.ex:652: System.do_cmd/3
         (elixir) lib/system.ex:641: System.cmd/3
         test/test_helper.exs:156: MixTest.Case.mix/2
         test/mix/tasks/test_test.exs:174: anonymous fn/0 in Mix.Tasks.TestTest.\"test --failed: loads only files with failures and runs just the failures\"/1
         (elixir) lib/file.ex:1506: File.cd!/2
         test/test_helper.exs:124: MixTest.Case.in_fixture/3
         test/mix/tasks/test_test.exs:148: (test)
         (ex_unit) lib/ex_unit/runner.ex:355: ExUnit.Runner.exec_test/1
         (stdlib) timer.erl:166: :timer.tc/1
         (ex_unit) lib/ex_unit/runner.ex:306: anonymous fn/4 in ExUnit.Runner.spawn_test_monitor/4
  .........................................................................................................................................................................................................................................................................................................................................................................
  Finished in 1032.5 seconds (59.1s on load, 973.3s on tests)
  8 doctests, 518 tests, 1 failure

Any ideas? This is part of an ansible setup. Because of the test failure, ansible stops.

A minute just for loading the tests? My first bet were your machine is underpowered…

That seems to happen during the testing of mix, which on my machine does not time out and the final line looks like this:

Finished in 85.5 seconds (4.3s on load, 81.2s on tests)
8 doctests, 518 tests, 0 failures

So, its only a fraction of the time it ran on your machine. Perhaps you should throw more cores and memory at the VM?

1 Like

It is a dual core vbox/vagrant instance. Yes it is not super fast! :slight_smile: But it was enough for the purpose of Erlang and Elixir builds from sources earlier. It doesn’t matter if it finished in 4 seconds or even few minutes.

Not sure what the root cause is. The ansible playbook was running as sudoers. Just pull out the Elixir part so that it didn’t use sudoers. It complete the build and test successfully now.

There is a similar issue in closed state:

https://github.com/elixir-lang/elixir/issues/3312

Will open an issue if this shows up again and is reproducible.