Bug: Functional tests do not run on windows VM
filhodanuvem opened this issue · comments
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
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).
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?