elixir-lang / elixir

Elixir is a dynamic, functional language for building scalable and maintainable applications
https://elixir-lang.org/
Apache License 2.0
24.34k stars 3.36k forks source link

There are 8 failures from Elixir test suite on Windows #1280

Closed josevalim closed 11 years ago

josevalim commented 11 years ago

Down to 8 errors...

Failures:

  1) test_absname_with_binary (PathTest)
     ** (ExUnit.ExpectationError)
                  expected: "c:/foo/bar"
       to be equal to (==): "/foo/bar"
     at test/elixir/path_test.exs:84

  2) test_absname_with_list (PathTest)
     ** (ExUnit.ExpectationError)
                  expected: 'c:/foo/bar'
       to be equal to (==): '/foo/bar'
     at test/elixir/path_test.exs:96

  3) test_expand_path_with_binary (PathTest)
     ** (ExUnit.ExpectationError)
                  expected: "c:/foo/bar"
       to be equal to (==): "/foo/bar"
     at test/elixir/path_test.exs:118

  4) test_expand_path_with_list (PathTest)
     ** (ExUnit.ExpectationError)
                  expected: 'c:/foo/bar'
       to be equal to (==): '/foo/bar'
     at test/elixir/path_test.exs:134

  5) test_argv (SystemTest)
     ** (SyntaxError) nofile:1: syntax error before: 'ERROR'
     stacktrace:

  6) test_at_exit (Kernel.CLI.AtExitTest)
     ** (ExUnit.ExpectationError)
                  expected: 'goodbye '
       to be equal to (==): 'goodbye cruel world with status 0\n'
     at test/elixir/kernel/cli_test.exs:39

  7) test_possible_deadlock (Kernel.CLI.CompileTest)
     ** (ExUnit.AssertionError) expected foo.ex to miss module Bar
     at test/elixir/kernel/cli_test.exs:88

  8) test_rm_rf_with_symlink (FileTest.Rm)
     ** (ExUnit.AssertionError) Expected false to be true
     at test/elixir/file_test.exs:774

Finished in 8.5 seconds (5.1s on load, 3.3s on tests)
1091 tests, 8 failures
make: *** [test_kernel] Error 1
AlbertMoscow commented 11 years ago

Great job, guys! I've got 16 failures and 5 errors in tests on my Windows machine:

==> kernel (exunit) ................................................................................ ................................................................................ FF....FFF......................F................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ...................\ (TokenMissingError) nofile:1: missing terminator: ] (for " [" starting at line 1) :erlang.system_info({:purify,'Node: nonode@nohost'}) init.erl:757: :init.do_boot/3

.\ (SyntaxError) nofile:1: unexpected token: end :erlang.system_info({:purify,'Node: nonode@nohost'}) init.erl:757: :init.do_boot/3

F\ (SyntaxError) nofile:1: invalid token: \x{3042} :erlang.system_info({:purify,'Node: nonode@nohost'}) init.erl:757: :init.do_boot/3

\ (throw) 1 erl_eval.erl:569: :erl_eval.do_apply/6 src/elixir.erl:152: :elixir.eval_forms/3 u:/elixir/lib/elixir/lib/code.ex:113: Code.do_eval_string/3 u:/elixir/lib/elixir/lib/kernel/cli.ex:264: Kernel.CLI.process_command/2 u:/elixir/lib/elixir/lib/enum.ex:604: Enum."-map/2-lc$^0/1-0-"/2 u:/elixir/lib/elixir/lib/kernel/cli.ex:18: Kernel.CLI."-main/1-fun-2-"/1 u:/elixir/lib/elixir/lib/kernel/cli.ex:39: Kernel.CLI.run/2 init.erl:1054: :init.start_it/1

* (SyntaxError) nofile:1: invalid token: ц .* (ErlangError) erlang error: 1 erl_eval.erl:569: :erl_eval.do_apply/6 src/elixir.erl:152: :elixir.eval_forms/3 u:/elixir/lib/elixir/lib/code.ex:113: Code.do_eval_string/3 u:/elixir/lib/elixir/lib/kernel/cli.ex:264: Kernel.CLI.process_command/2 u:/elixir/lib/elixir/lib/enum.ex:604: Enum."-map/2-lc$^0/1-0-"/2 u:/elixir/lib/elixir/lib/kernel/cli.ex:18: Kernel.CLI."-main/1-fun-2-"/1 u:/elixir/lib/elixir/lib/kernel/cli.ex:39: Kernel.CLI.run/2 init.erl:1054: :init.start_it/1

...................F............................................................ ................................................................................ ................................................................................ ................................................................................ .................F..............................FFFF....................F....... ....FF.......................

Failures:

1) test_absname_with_binary (PathTest) \ (ExUnit.ExpectationError) expected: "u:/foo/bar" to be equal to (==): "/foo/bar" at test/elixir/path_test.exs:84

2) test_absname_with_list (PathTest) \ (ExUnit.ExpectationError) expected: 'u:/foo/bar' to be equal to (==): '/foo/bar' at test/elixir/path_test.exs:96

3) test_expand_path_with_binary (PathTest) \ (ExUnit.ExpectationError) expected: "u:/foo/bar" to be equal to (==): "/foo/bar" at test/elixir/path_test.exs:118

4) test_expand_path_with_list (PathTest) \ (ExUnit.ExpectationError) expected: 'u:/foo/bar' to be equal to (==): '/foo/bar' at test/elixir/path_test.exs:134

5) test_expand_path_with_user_home (PathTest) \ (ExUnit.ExpectationError) expected: "/c/erl5.10.1/erts-5.10.1/bin;C:/elixir/bin" to be equal to (==): "u:/c/erl5.10.1/erts-5.10.1/bin;C:elixir/bin" at test/elixir/path_test.exs:105

6) test_argv (SystemTest) \ (SyntaxError) nofile:1: syntax error before: 'ERROR' stacktrace:

7) test_possible_deadlock (Kernel.CLI.CompileTest) \ (ExUnit.AssertionError) expected foo.ex to miss module Bar at test/elixir/kernel/cli_test.exs:88

8) test_getn (IOTest) \ (ExUnit.ExpectationError) expected: "\n" to be equal to (==): "\r" at test/elixir/io_test.exs:29

9) test_rm_rf_with_symlink (FileTest.Rm) \ (ExUnit.AssertionError) Expected false to be true at test/elixir/file_test.exs:774

10) test_read! (FileTest.OpenReadWrite) \ (ExUnit.ExpectationError) expected: "FOO\r\n" to be equal to (==): "FOO\n" at test/elixir/file_test.exs:424

11) test_read_with_binary (FileTest.OpenReadWrite) \ (ExUnit.ExpectationError) expected: {:ok,"FOO\r\n"} to match pattern (=): {:ok, "FOO\n"} at test/elixir/file_test.exs:410

12) test_read_with_list (FileTest.OpenReadWrite) \ (ExUnit.ExpectationError) expected: {:ok,"FOO\r\n"} to match pattern (=): {:ok, "FOO\n"} at test/elixir/file_test.exs:415

13) test_read_with_utf8 (FileTest.OpenReadWrite) \ (ExUnit.ExpectationError) expected: {:ok,"╨а╤Г╤Б╤Б╨║╨╕╨╣\r\nцЧе\r\n"} to match pattern (=): {:ok, "╨а╤Г╤Б╤Б╨║╨╕╨╣\nцЧе\n"} at test/elixir/file_test.exs:420

14) test_cp_with_conflict (FileTest.Cp) \ (ExUnit.ExpectationError) expected: "FOO\r\n" to be equal to (==): "FOO\n" at test/elixir/file_test.exs:71

15) test_copy (FileTest) \ (ExUnit.ExpectationError) expected: {:ok,5} to be equal to (==): {:ok,4} at test/elixir/file_test.exs:975

16) test_copy! (FileTest) \ (ExUnit.ExpectationError) expected: 5 to be equal to (==): 4 at test/elixir/file_test.exs:1005

Finished in 73.9 seconds (20.1s on load, 53.8s on tests) 1091 tests, 16 failures make: *\ [test_kernel] Error 1

ToJans commented 11 years ago

Odd that you get more errors... That will be something we will have to look in to.

Anyway, I have created the following subroutine:

  defp strip_drive_letter_if_windows(path) do 
    {os,_subtype} = :os.type
    IO.inspect path
    if (:win32==os) && String.at(path,1) == ":" do
      String.slice(path,2,1500)
    else
      path
    end
  end

When I apply it, it works on some, but not on others; this has probably something todo with a binary <-> list mismatch?

This is the example function

  test :absname_with_list do
    assert (Path.absname('/foo/bar') |> strip_drive_letter_if_windows)  == '/foo/bar'
    assert (Path.absname('/foo/bar/') |> strip_drive_letter_if_windows)  == '/foo/bar'
    assert (Path.absname('/foo/bar/.')  |> strip_drive_letter_if_windows)  == '/foo/bar/.'
    assert (Path.absname('/foo/bar/../bar')  |> strip_drive_letter_if_windows) == '/foo/bar/../bar'
  end

And this is the output:

  1) test_absname_with_list (PathTest)
     ** (FunctionClauseError) no function clause matching in String.Unicode.next_grapheme/1
     stacktrace:
       priv/unicode.ex:171: String.Unicode.next_grapheme('c:/foo/bar')
       lib/string.ex:652: String.at/2
       test/elixir/path_test.exs:257: PathTest.strip_drive_letter_if_windows/1
       test/elixir/path_test.exs:96: PathTest.test_absname_with_list/1
josevalim commented 11 years ago

@ToJans that's because if Path.absname/1 receives a char list (single quotes) and String.split/2 just works with binary (double quotes). Please try this implementation instead:

if match? { :win32, _ }, :os.type do
  defp strip_drive_letter_if_windows([_d,?:|rest]), do: rest
  defp strip_drive_letter_if_windows(<<_d,?:,rest::binary>>), do: rest
else
  defp strip_drive_letter_if_windows(path), do : path
end
josevalim commented 11 years ago

Btw, I haven't checked the implementation above, so it may have bugs :P

ToJans commented 11 years ago

I think the extra errors @AlbertMoscow gets are all related to the fact that it expects \r\n and that it only finds a \n.

This is probably due to the git autocrlf config on his machine. The safest would probably be to use a function similar to strip_drive_letter_if_windows which replaces all \r\n with \r ?

josevalim commented 11 years ago

@ToJans A better solution may be to just stop writing new lines in those tests. I bet many of them are using IO.puts and we could just swap for IO.write. :)

ToJans commented 11 years ago

The problem is in the 2 files under fixtures: file.txtand utf8.txt.

I tried removing the \r everywhere, but this breaks a lot of the io_tests as well. I wonder if it is possible to just write those 2 files to disk in the setup of the test. AFAIK that would fix it?

josevalim commented 11 years ago

The issue with writing in the test setup is that we can race conditions in between the tests now because they may try to write to the same file. :( Let me give a quick try on something else.

josevalim commented 11 years ago

@ToJans maybe we can setup a .gitattributes file to avoid clrf conversion? What do you think?

ToJans commented 11 years ago

Sounds like a plan... I'll take a look if we can restrict it to the fixtures folder, or do you think that is not necessary?

josevalim commented 11 years ago

Restricting it to the fixtures folder sounds like a good plan. :)

ToJans commented 11 years ago

@AlbertMoscow Could you give it another try please? Thanks!

josevalim commented 11 years ago

@AlbertMoscow you may need to refetch the repository from scratch or wipe out your git cache :)

AlbertMoscow commented 11 years ago

Good news! There are 4 failures left on Windows. But do care about errors during tests? I believe it's much worse than just a test failure... At least we must consider there are about 4 or 5 extra test failures: my1

ToJans commented 11 years ago

That is good news. Regarding the tests failing and errors:

Failures:

1. expand_path_with_user_home

I am not sure what the expected behavior should be, f.e. I would assume to value it should be equal to should all start with C:/folderinstead of C:folder?. Also, apparently we need to loose the drive prefix from the expected value.

2. argv

I have taken a look, but I have no idea what the intent is here? system_test.exs line 43

3. possible_deadlock

kernel/cli_test.exs line 88: no idea what this should be(come).

4. rm_rf_with_symlink

file_test line 774 : I can take a look at what is happening here, why the file does not exist...

Errors

I have no clue how to get started with this...

josevalim commented 11 years ago

@ToJans unfortunately I have no idea what are the source for those test failures too. What if we do another screen sharing about those later? Unfortunately, I am busy the remaining of this week, so maybe over the weekend or next week.

I have an idea from where the errors are coming from though. They are probably happening because we are trying to execute bin/elixir but we should execute bin/elixir.bat on windows instead. I have pushed a fix to master that may have fixed those, could you please let me know?

ToJans commented 11 years ago

I used the new code, and while some errors disappeared, some remained:

Compiled lib/ex_unit/lib/ex_unit/runner.ex
Compiled lib/ex_unit/lib/ex_unit/doc_test.ex
Compiled lib/ex_unit/lib/ex_unit/assertions.ex
==> elixir (eunit)
  All 213 tests passed.

==> kernel (exunit)
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
.................................................................F..................................................................................** (TokenMis
singError) nofile:1: missing terminator: ] (for "[" starting at line 1)
................................** (throw) 1
..............................................................** (SyntaxError) nofile:1: unexpected token: end
..    :erlang.system_info({:purify,'Node: nonode@nohost'})
    init.erl:757: :init.do_boot/3

........................................................................................................** (ErlangError) erlang error: 1
.........................................................................................F.............................................................** (Synta
xError) nofile:1: invalid token: \x{3042}
    :erlang.system_info({:purify,'Node: nonode@nohost'})
    init.erl:757: :init.do_boot/3

....F..** (SyntaxError) nofile:1: invalid token: µ
    :erlang.system_info({:purify,'Node: nonode@nohost'})
    init.erl:757: :init.do_boot/3

............F...............................................................................................

Failures:

  1) test_argv (SystemTest)
     ** (SyntaxError) nofile:1: syntax error before: 'ERROR'
     stacktrace:

  2) test_at_exit (Kernel.CLI.AtExitTest)
     ** (ExUnit.ExpectationError)
                  expected: 'goodbye '
       to be equal to (==): 'goodbye cruel world with status 0\n'
     at test/elixir/kernel/cli_test.exs:39

  3) test_possible_deadlock (Kernel.CLI.CompileTest)
     ** (ExUnit.AssertionError) expected foo.ex to miss module Bar
     at test/elixir/kernel/cli_test.exs:88

  4) test_rm_rf_with_symlink (FileTest.Rm)
     ** (ExUnit.AssertionError) Expected false to be true
     at test/elixir/file_test.exs:774

Finished in 8.4 seconds (5.2s on load, 3.2s on tests)
1094 tests, 4 failures
make: *** [test_kernel] Error 1

We can setup a screen sharing session next week.

ToJans commented 11 years ago

Down to 3 on my machine after this pull request will be merged: image

ToJans commented 11 years ago

Still some errors left, but looking good; I also :+1 the new assert functionality in the test image

AlbertMoscow commented 11 years ago

Wow, one failure! @ToJans, I wish I could see the same result for ExDoc tool on Windows. :) https://github.com/elixir-lang/ex_doc

ToJans commented 11 years ago

Thanks! FYI I sometimes get 2 failures instead of one - race conditions probably -, and still some errors.

I might take a look at ex_doc later, but for now my next priority would probably be make test_mix, next to finally writing some stuff myself in Elixir ;-). If you run make test_mix without cleaning first, you get like 80 errors or so, so there is still some fine-tuning needed here.

image

ToJans commented 11 years ago

We seem to have a problem on windows with race conditions, some errors pop up occasionally, f.e. image

ToJans commented 11 years ago

:file.make_symlink does not seem to work on my machine... This might be a bug in the Erlang VM?

Proof: image

And yes, I run on windows 7 image

josevalim commented 11 years ago

Interesting. Yeah, it might be a bug.

ToJans commented 11 years ago

@AlbertMoscow could you check whether it works on your machine, i.e. run the commands in iex after creating a folder tolink?

AlbertMoscow commented 11 years ago

@ToJans, sure! It says :enotsup

my1

BTW, what all these :enotsup, :eio etc. mean?

ToJans commented 11 years ago

: exeception=not supported I assume... Which would imply whe can skip this test on windows.

alco commented 11 years ago

Windows does not support symlinks. So it's no surprise :file.make_symlink does not work in cmd.exe. However, I though it would work in Mingw.

Does Mingw run a cygwin shell? Does the shell command ln -s <source_file> <link_name> work for you?

thomas-holmes commented 11 years ago

Windows has symlinking capability via the command line tool mklink. It has had this since Vista and in lesser forms previously. Mklink supports soft and hard links, directory links, and directory junctions.

AlbertMoscow commented 11 years ago

Silly me... Here:

my2

I run it on Windows XP SP3.

AlbertMoscow commented 11 years ago

I can't belive my eyes! Where are all errors in kernel module? But there are still 8 failures in mix module to fix though:

my2

my3

ToJans commented 11 years ago

@AlbertMoscow The errors were supposed to happen, but due to one reason or another the beam vm on windows does not capture stderr when launching, so we added some functionality to redirect stderr to stdio when invoking the elixir shell...

The mix thing is something we are aware off... I will not have access to a laptop in the next few weeks, but after that we can try to get the error count down to 0.

If somebody else feels like fixing them, it should not be to hard, as most of them are about the \r\n vs \n, so feel free to take on the challenge!

AlbertMoscow commented 11 years ago

@ToJans, thank you for the answer! :)

ghost commented 11 years ago

seems to me that this failure


  1) test_expand_path_with_user_home (PathTest)
     ** (ExUnit.ExpectationError)
                  expected: "C:\\Users\\user"
       to be equal to (==): "c:/Users/user"
     at test/elixir/path_test.exs:105

can be fixed (here https://github.com/elixir-lang/elixir/blob/master/lib/elixir/test/elixir/path_test.exs#L103 ) like:

iex(5)> Path.absname(System.user_home!)
"c:/Users/user"

iex(1)> System.user_home!
"C:\\Users\\user"
iex(2)> Path.expand("~")
"c:/Users/user"

already tested it to work, though you may choose to "fix" it differently

ghost commented 11 years ago

why am i getting errors in different locations from running the same test command consecutively? like:

  1. run mingw32-make test_kernel
  2. wait until done, so i see command prompt
  3. goto 1.

result is: the first failure varies between these:


  1) test_path (Kernel.CLI.OptionParsingTest)
     ** (TokenMissingError) nofile:78: missing terminator: ' (for string s
tarting at line 78)
     stacktrace:
  1) test_at_exit (Kernel.CLI.AtExitTest)
     ** (ExUnit.ExpectationError)
                  expected: 'goodbye '
       to be equal to (==): 'goodbye cruel world with status 0\n'
     at test/elixir/kernel/cli_test.exs:39
 1) test_path (Kernel.CLI.OptionParsingTest)
    ** (Protocol.UndefinedError) protocol Enumerable not implemented for
nil
    at test/elixir/kernel/cli_test.exs:25

sometimes they are both (2 of the above) present like so:

  1) test_at_exit (Kernel.CLI.AtExitTest)
     ** (ExUnit.ExpectationError)
                  expected: 'goodbye '
       to be equal to (==): 'goodbye cruel world with status 0\n'
     at test/elixir/kernel/cli_test.exs:39

  2) test_path (Kernel.CLI.OptionParsingTest)
     ** (Protocol.UndefinedError) protocol Enumerable not implemented for
nil
     at test/elixir/kernel/cli_test.exs:25

the last one in the list of failures however is always this:

  3) test_rm_rf (FileTest.Rm)
     ** (MatchError) no match of right hand side value: {:error, {:error,
{:error, :eperm}, "s:/workspace.elixir.2013/elixir/lib/elixir/test/tmp/tmp
/link"}, "s:/workspace.elixir.2013/elixir/lib/elixir/test/tmp/tmp"}
     at test/elixir/file_test.exs:758

(though the 3) may be 2))

So i only noticed this because, I got this error at first

Failures:

  1) test_argv (SystemTest)
     ** (ExUnit.ExpectationError)
                  expected: nil
       to be equal to (==): ["-o", "opt", "arg1", "arg2", "--long-opt", "1
0"]
     at test/elixir/system_test.exs:46

  2) test_at_exit (Kernel.CLI.AtExitTest)
     ** (ExUnit.ExpectationError)
                  expected: 'goodbye '
       to be equal to (==): 'goodbye cruel world with status 0\n'
     at test/elixir/kernel/cli_test.exs:39

  3) test_path (Kernel.CLI.OptionParsingTest)
     ** (Protocol.UndefinedError) protocol Enumerable not implemented for
nil
     at test/elixir/kernel/cli_test.exs:25

  4) test_rm_rf (FileTest.Rm)
     ** (MatchError) no match of right hand side value: {:error, {:error,
{:error, :eperm}, "s:/workspace.elixir.2013/elixir/lib/elixir/test/tmp/tmp
/link"}, "s:/workspace.elixir.2013/elixir/lib/elixir/test/tmp/tmp"}
     at test/elixir/file_test.exs:758

the 1) error, which I was trying to track down and it disappeared without me doing any changes and to check i restored the system_test.exs file which was the only one I changed (when I added a bunch of IO.puts) by using git checkout

so, I don't understand why they vary... (not to mention why did my 1) test fail twice but not anymore later on) and I can see the first F in the list of dots changing its location (and sometimes one more appears nearby)

I just tested it again and only that FileTest.Rm error appeared, so there's the case of those errors not happening at all! Makes me wonder if it's something with parallel execution of tests?(if that's even the case) i don't know and the very next test poped 2 more errors (without me changing a thing!)

Failures:

  1) test_argv (SystemTest)
     ** (ExUnit.ExpectationError)
                  expected: nil
       to be equal to (==): ["-o", "opt", "arg1", "arg2", "--long-opt", "1
0"]
     at test/elixir/system_test.exs:46

  2) test_at_exit (Kernel.CLI.AtExitTest)
     ** (ExUnit.ExpectationError)
                  expected: 'goodbye '
       to be equal to (==): 'goodbye cruel world with status 0\n'
     at test/elixir/kernel/cli_test.exs:39

  3) test_rm_rf (FileTest.Rm)
     ** (MatchError) no match of right hand side value: {:error, {:error,
{:error, :eperm}, "s:/workspace.elixir.2013/elixir/lib/elixir/test/tmp/tmp
/link"}, "s:/workspace.elixir.2013/elixir/lib/elixir/test/tmp/tmp"}
     at test/elixir/file_test.exs:758

what teh....

ghost commented 11 years ago

right, now I see that was mentioned above: https://github.com/elixir-lang/elixir/issues/1280#issuecomment-19902022

ghost commented 11 years ago

I just realized that the parallel execution of tests happens because of use ExUnit.Case, async: true (well, still reading that intro doc xD ie. http://elixir-lang.org/getting_started/6.html )

EDIT: at first sight looks like there's a test that changes current dir and thus another test executing elixir would fail because it uses relative paths

defp executable_path(name) do
    Path.expand("../../../../../bin/#{name}#{executable_extension}", __FILE__)
  end

EDIT2: is there a way to mark a certain test to be executed synchronously while all others can go async (when async: true), basically I want some test that changes current dir (to temporary folder) to be executed synchronously... or maybe find a better way to executable elixir other than relative paths? But Maybe the current dir doesn't change for all tests? or it's isolated, not sure yet EDIT3: yep that cd is isolated

 cd!(path, function)

Changes the current directory to the given path, executes the given function and then revert back to the previous path regardless if there is an exception.

Raises an error if retrieving or changing the current directory fails.
ToJans commented 11 years ago

For future reference, there are some errors in the kernel module tests: image

ToJans commented 11 years ago

I think the problem with the stdout/race conditions on exit might be due to the implementation of :os.cmd; I will see if I can spike a version using ports.

ghost commented 11 years ago

:+1:

EDIT: I just wanna note that I'm piping the output through this utility called wac from here: https://github.com/aslakhellesoy/wac to enable colors, since latest master seems to have colors on (as you see in previous screenshot from ToJans) those escape sequences. EDIT2: and so it looks like this: wac1

I'm basically using a make.bat which has this inside: mingw32-make %* | wac EDIT5 27 july 2013 2:48am changed to avoid stderr/stdout mangling: mingw32-make %* 2>&1 | wac

EDIT3: however I've no solution yet for sublimetext2's output (when Ctrl+B is pressed) EDIT4: I modified the sublime plugin to execute a different batch file, which pipes elixir.bat through wac but sublime3 still won't show the colors but at least I don't see the escape codes

ghost commented 11 years ago

Looks like I've got new test errors on Windows after the fix for #1495 (not sure where I should've reported this, here or there) (while there are still no test errors on Linux Mint, as I've just tested)

they look like this:

  109) test_touch_with_no_file (FileTest)
     ** (RuntimeError) expected ExUnit callback in FileCase to return :ok  or { :ok, keywords }, go
t {:error, {:error, {:error, {:error, :eperm}, "s:/workspace.elixir.2013/elixir/lib/elixir/tmp/tmp/
from"}, "s:/workspace.elixir.2013/elixir/lib/elixir/tmp/tmp"}, "s:/workspace.elixir.2013/elixir/lib
/elixir/tmp"} instead
     stacktrace:
       test/elixir/file_test.exs:22: FileTest.__ex_unit__/2

  110) test_touch_with_success! (FileTest)
     ** (RuntimeError) expected ExUnit callback in FileCase to return :ok  or { :ok, keywords }, go
t {:error, {:error, {:error, {:error, :eperm}, "s:/workspace.elixir.2013/elixir/lib/elixir/tmp/tmp/
from"}, "s:/workspace.elixir.2013/elixir/lib/elixir/tmp/tmp"}, "s:/workspace.elixir.2013/elixir/lib
/elixir/tmp"} instead
     stacktrace:
       test/elixir/file_test.exs:22: FileTest.__ex_unit__/2

  111) test_touch_with_timestamp (FileTest)
     ** (RuntimeError) expected ExUnit callback in FileCase to return :ok  or { :ok, keywords }, go
t {:error, {:error, {:error, {:error, :eperm}, "s:/workspace.elixir.2013/elixir/lib/elixir/tmp/tmp/
from"}, "s:/workspace.elixir.2013/elixir/lib/elixir/tmp/tmp"}, "s:/workspace.elixir.2013/elixir/lib
/elixir/tmp"} instead
     stacktrace:
       test/elixir/file_test.exs:22: FileTest.__ex_unit__/2
josevalim commented 11 years ago

My bad, those should be fixed on master now.

ghost commented 11 years ago

Cool! Thanks1

I notice this error:

........F...FFFFF............'MIX_ENV' is not recognized as an internal or external command,
operable program or batch file.

Not sure how to fix it myself(is it acting like a SET aka export or as a set and run in one cmd, not sure), but it's from here: https://github.com/elixir-lang/elixir/blob/master/lib/mix/test/mix/cli_test.exs#L8

EDIT: ok I'm fixing this...EDIT3:fixed EDIT2: https://github.com/elixir-lang/elixir/pull/1501

ToJans commented 11 years ago

Progress!! image

ghost commented 11 years ago

:+1: awesome! btw, update to master, that MIX_ENV should be fixed ( EDIT: just making sure you don't do extra dup work :) )

ToJans commented 11 years ago

Never mind; put back the old code, and got the same results after a few runs.... Race conditions are :facepunch:

ghost commented 11 years ago

I'll take a look if you give up(or take a break) ... ?

josevalim commented 11 years ago

@ToJans for those tests that are failing, can you try passing a :init.stop() and check if it solves the issue? For example:

  test :argv do
    list = elixir('-e "IO.inspect System.argv" -e ":init.stop" -- -o opt arg1 arg2 --long-opt 10')
    { args, _ } = Code.eval_string list, []
    assert args == ["-o", "opt", "arg1", "arg2", "--long-opt", "10"]
  end
ToJans commented 11 years ago

@josevalim Tried, it does not help/work...

ToJans commented 11 years ago

@AtKaaZ Go ahead.. it is all yours!