Errors with dub test --build=x86 on Windows
On my Windows machine, I am getting errors running dub test --build=x86 (the default is dub test, just making things clear) on the io.d module. This is not showing up in the Appveyor results, perhaps because it is not being testing (not entirely sure).
Travis doesn't support Windows, but there's an AppVeyor setup: https://github.com/libmir/numir/blob/master/appveyor.yml
Ah, I see the issue. They're only testing x64, not x86.
@wilzbach I have updated the title and first post to reflect this.
Thank you for reporting! I fixed it and added x86 on linux (travis) and windows (appveyor) in #16 Could you try new release v0.0.7?
@ShigekiKarita I'm getting an error about opening a file in rb mode.
C:\Users\[username]\Documents\GitHub\numir>dub test --arch=x86
Package mir-algorithm can be upgraded from 0.6.15 to 0.6.18.
Package mir-random can be upgraded from 0.2.5 to 0.2.6.
Use "dub upgrade" to perform those changes.
Generating test runner configuration 'numir-test-library' for 'library' (library).
Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847
Performing "unittest" build using dmd for x86.
mir-algorithm 0.6.15: target for configuration "library" is up to date.
mir-random 0.2.5: target for configuration "library" is up to date.
numir 0.0.7: building configuration "numir-test-library"...
Linking...
To force a rebuild of up-to-date targets, run again with --force.
Running .\numir-test-library.exe
std.exception.ErrnoException@std\stdio.d(403): Cannot open file `./test/a1_i4.npy' in mode `rb' (No such file or directory)
----------------
0x004F2F8A in @safe shared(core.stdc.stdio._iobuf)* std.exception.errnoEnforce!(shared(core.stdc.stdio._iobuf)*, "std\stdio.d", 403u).errnoEnforce(shared(core.stdc.stdio._iobuf)*, lazy immutable(char)[])
0x004DCDEE in void numir.io.__unittestL256_18() at C:\Users\[username]\Documents\GitHub\numir\source\numir\io.d(262)
0x004E290D in void numir.io.__modtest()
0x004EF855 in int core.runtime.runModuleUnitTests().__foreachbody1(object.ModuleInfo*)
0x004F3E8B in int object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)).__lambda2(immutable(object.ModuleInfo*))
Program exited with code 1
@jmh530 Have you generated test/a1_i4.npy by cd test && python test_npy_fileio.py && cd .. before dub test? https://github.com/libmir/numir/blob/master/appveyor.yml#L118
@ShigekiKarita I had not. Unittests pass after generating the file.
It might make sense to have this command included in the dub.json for the unittest configuration on Windows, or something like that. At a minimum, you could include a check that the file is available and give a specific error that it needs to be generated or something.
Also, this introduces a dependency on having python installed.
Thanks for your advice. I will fix unittests to skip tests if *.npy does not found.
I think that is a good idea. I was just thinking about it today.
Another possible addition is to insert a code to generate the file on Windows if it is not there and you can call python.
On Wed, Oct 18, 2017 at 9:43 PM Shigeki Karita [email protected] wrote:
Thanks for your advice. I will fix unittests to skip tests if *.npy does not found.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/libmir/numir/issues/15#issuecomment-337775330, or mute the thread https://github.com/notifications/unsubscribe-auth/AMJWyg5macqgxLzLlvcG9S0XydarLtX0ks5stqlGgaJpZM4PmhFt .