FFIG / ffig

Generate code to call C++ libraries from other languages
MIT License
29 stars 9 forks source link

test-docker tests fail on windows #175

Open MattHerring opened 7 years ago

MattHerring commented 7 years ago

Running "./scripts/test-docker.py -t" on w windows machine produces the following error:

Removing intermediate container fc8e1c1cd9c9 Successfully built c762a30b7264 SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories. /usr/bin/env: 'python\r': No such file or directory Traceback (most recent call last): File "./scripts/test-docker.py", line 16, in main(sys.argv) File "./scripts/test-docker.py", line 13, in main './scripts/build.py {}'.format(' '.join(args[1:]))]) File "C:\Users\Matt Herring\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['docker', 'run', 'ffig_local', '/bin/bash', '-c', './scripts/build.py -t']' returned non-zero exit status 127.

FYI the regular ffig tests pass.

jbcoe commented 7 years ago

The trailing \r suggests to me that Windows line endings are being found on Linux. I wonder if running d2u on copied files as part of the docker setup might fix this issue?

Testing may be challenging if appveyor has not got docker support.

ajbennieston commented 7 years ago

I suspect this is Git's fault... it will convert line endings to 'native' on checkout. We may have to add a .gitattributes file to set .py files to force eol=lf.

jbcoe commented 7 years ago

I think this is fixed now, @MattHerring can you confirm?