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

Tests don't work on native Windows #542

Open
AP2008 opened this issue Nov 27, 2020 · 5 comments
Open

Tests don't work on native Windows #542

AP2008 opened this issue Nov 27, 2020 · 5 comments

Comments

@AP2008
Copy link

AP2008 commented Nov 27, 2020

Tests doesn't seem to work on native windows.
Are there any fixes on it ?
This is the output after running mingw32-make to test:

mingw32-make "test^lisp^step0"

C:/MyProgs/TDM-GCC-64/bin/mingw32-make -C impls/lisp step0_repl.lisp
mingw32-make[1]: Entering directory 'C:/user/Work/mal/impls/lisp'
mingw32-make[1]: Nothing to be done for 'step0_repl.lisp'.
mingw32-make[1]: Leaving directory 'C:/user/Work/mal/impls/lisp'
(call STEP_TEST_FILES,lisp,step0): impls/tests/step0_repl.mal
----------------------------------------------
Testing test^lisp^step0; step file: impls/lisp/step0_repl.lisp, test file: tests/step0_repl.mal
Running: env STEP=step0_repl MAL_IMPL=js ../../runtest.py  --deferrable --optional   ../tests/step0_repl.mal -- ../lisp/run
Traceback (most recent call last):
  File "C:\user\runtest.py", line 12, in <module>
    import pty, array, fcntl, termios
  File "Python39\lib\pty.py", line 12, in <module>
    import tty
  File "Python39\lib\tty.py", line 5, in <module>
    from termios import *
ModuleNotFoundError: No module named 'termios'
Makefile:410: recipe for target 'test^lisp^step0' failed
mingw32-make: *** [test^lisp^step0] Error 1
@calroc
Copy link

calroc commented Jan 3, 2021

The problem is you're running Python 3.9 and the runtest.py script is written to Python 2. (I just had the same problem.)

That's why it can't import the termios module, I think. No, I'm wrong. Python 3 has that lib but "It is only available for those Unix versions that support POSIX termios style tty I/O control configured during installation.", so... hmm.

@kanaka
Copy link
Owner

kanaka commented Apr 21, 2021

@AP2008 @calroc sorry for the really slow followup. I basically took a long break from open source/mal stuff.

It probably wouldn't be that hard to conditionalize the termios import and usage (in just a single place). That might not be the only Windows incompatibility though. I don't have easy access to a Windows system to do these changes (nor the motivation). However, I'm willing to review and merge changes to enable Windows support as long as they are straight forwards and clean changes that don't add complication or problems for running under Linux.

@calroc
Copy link

calroc commented Apr 25, 2021 via email

@differentsmoke
Copy link

differentsmoke commented Jun 3, 2021

@kanaka I ran into the same issue. It is easy to circumvent by using the Windows Subsystem for Linux (WSL), at least in my use case, but on a broader level shouldn't the tests be updated to rely on Python 3 since Python 2 is no longer supported?

@cy20lin
Copy link

cy20lin commented Jul 9, 2023

I made a pull request (#640) which enable the runtest.py script to run mal implementation tests on Windows. You may refer to that PR and see if the script helps.

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

No branches or pull requests

5 participants