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

Bug: Functional tests do not run on windows VM #132

Open
filhodanuvem opened this issue Oct 13, 2021 · 2 comments
Open

Bug: Functional tests do not run on windows VM #132

filhodanuvem opened this issue Oct 13, 2021 · 2 comments

Comments

@filhodanuvem
Copy link
Owner

We use bats to run functional tests on GitHub Actions.
But the action is failing in the setup only on Windows VMs. This might be a problem in the action version itself or it is not well configured.

C:\Windows\system32\tar.exe xz -C D:\a\_temp\443effea-912b-4f54-b64f-2707d310082a -f D:\a\_temp\c91d5722-6f45-42f2-b33d-4d132f5d8de8
bats-core-1.2.1/test/fixtures/parallel/setup_file/setup_file1.bats: Can't create '\\\\?\\D:\\a\\_temp\\443effea-912b-4f54-b64f-2707d310082a\\bats-core-1.2.1\\test\\fixtures\\parallel\\setup_file\\setup_file1.bats'
bats-core-1.2.1/test/fixtures/parallel/setup_file/setup_file2.bats: Can't create '\\\\?\\D:\\a\\_temp\\443effea-912b-4f54-b64f-2707d310082a\\bats-core-1.2.1\\test\\fixtures\\parallel\\setup_file\\setup_file2.bats'
bats-core-1.2.1/test/fixtures/parallel/setup_file/setup_file3.bats: Can't create '\\\\?\\D:\\a\\_temp\\443effea-912b-4f54-b64f-2707d310082a\\bats-core-1.2.1\\test\\fixtures\\parallel\\setup_file\\setup_file3.bats'
bats-core-1.2.1/test/fixtures/parallel/suite/parallel1.bats: Can't create '\\\\?\\D:\\a\\_temp\\443effea-912b-4f54-b64f-2707d310082a\\bats-core-1.2.1\\test\\fixtures\\parallel\\suite\\parallel1.bats'
bats-core-1.2.1/test/fixtures/parallel/suite/parallel2.bats: Can't create '\\\\?\\D:\\a\\_temp\\443effea-912b-4f54-b64f-2707d310082a\\bats-core-1.2.1\\test\\fixtures\\parallel\\suite\\parallel2.bats'
bats-core-1.2.1/test/fixtures/parallel/suite/parallel3.bats: Can't create '\\\\?\\D:\\a\\_temp\\443effea-912b-4f54-b64f-2707d310082a\\bats-core-1.2.1\\test\\fixtures\\parallel\\suite\\parallel3.bats'
bats-core-1.2.1/test/fixtures/parallel/suite/parallel4.bats: Can't create '\\\\?\\D:\\a\\_temp\\443effea-912b-4f54-b64f-2707d310082a\\bats-core-1.2.1\\test\\fixtures\\parallel\\suite\\parallel4.bats'
tar.exe: Error exit delayed from previous errors.
Error: The process 'C:\Windows\system32\tar.exe' failed with exit code 1

I've opened a PR to show how can you test that. #131
https://github.com/filhodanuvem/gitql/runs/3886290856?check_suite_focus=true

@radiantly
Copy link

After a bit of investigation, it looks like this particular step is failing because tar on Windows has trouble extracting symlinks in the bats source archive.

However, when I fixed this issue on my fork, it looks like there are other issues as well. Since the generated binary on windows is gitql.exe, I think bats has trouble finding the executable as well as not being able to use the standard set of unix tools (see this and this workflow run).

@filhodanuvem
Copy link
Owner Author

Amazing progress @radiantly . I think we have a few options to move on:

  • Force all the binaries to be compiled without the extension on their names during the build job
  • Add a new step that works only on windows and rename it to remove the .exe
  • Change all the tests to accept an optional env var that would define the binary name, this might be a bit more complicated.

Do you think you can handle any of those paths?

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

No branches or pull requests

2 participants