Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with dub test --build=x86 on Windows #15

Open
jmh530 opened this issue Sep 27, 2017 · 9 comments
Open

Errors with dub test --build=x86 on Windows #15

jmh530 opened this issue Sep 27, 2017 · 9 comments
Assignees
Labels

Comments

@jmh530
Copy link
Contributor

jmh530 commented Sep 27, 2017

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).

@wilzbach
Copy link
Member

Travis doesn't support Windows, but there's an AppVeyor setup: https://github.com/libmir/numir/blob/master/appveyor.yml

@jmh530
Copy link
Contributor Author

jmh530 commented Sep 27, 2017

Ah, I see the issue. They're only testing x64, not x86.

@jmh530 jmh530 changed the title Add Windows to Travis CI Add Windows x86 to Appveyor Sep 27, 2017
@jmh530 jmh530 changed the title Add Windows x86 to Appveyor Errors with dub test --build=x86 on Windows Sep 27, 2017
@jmh530
Copy link
Contributor Author

jmh530 commented Sep 27, 2017

@wilzbach I have updated the title and first post to reflect this.

@ShigekiKarita
Copy link
Member

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 ShigekiKarita self-assigned this Sep 29, 2017
@jmh530
Copy link
Contributor Author

jmh530 commented Oct 2, 2017

@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

@ShigekiKarita
Copy link
Member

@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

@jmh530
Copy link
Contributor Author

jmh530 commented Oct 2, 2017

@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.

@ShigekiKarita
Copy link
Member

Thanks for your advice. I will fix unittests to skip tests if *.npy does not found.

@jmh530
Copy link
Contributor Author

jmh530 commented Oct 19, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants