Open jasagredo opened 1 month ago
Bat files are not a replacement for a real program on Windows, because we use Process.proc
, which cannot call .bat
files. See https://github.com/haskell/process/issues/140
I think the wisest thing would be to distinguish by extension if we should call proc
or shell
on Windows.
The other alternative is to use proc
with the executable being cmd.exe
and the batch file being the first parameter, I think.
I think then the arguments have to be inside the same string as the script such as cmd.exe /c "script.bat arg1 arg2"
and not as cmd.exe /c "script.bat" "arg1" "arg2"
.
Test failing because of this issue:
PackageTests\ForeignLibs\setup.test.hs
PackageTests\GHCJS\BuildRunner\cabal.test.hs
PackageTests\GhcPkgGuess\SameDirectory\setup.test.hs
PackageTests\GhcPkgGuess\SameDirectoryGhcVersion\setup.test.hs
PackageTests\GhcPkgGuess\SameDirectoryVersion\setup.test.hs
PackageTests\GhcPkgGuess\Symlink\setup.test.hs
PackageTests\GhcPkgGuess\SymlinkGhcVersion\setup.test.hs
PackageTests\GhcPkgGuess\SymlinkVersion\setup.test.hs
PackageTests\PkgConfigParse\setup.test.hs
Some of the tests in our test-suite rely on external scripts that are written in bash, and although MSYS2 comes with bash, they are not understood directly by Windows. For this reason some tests are marked as broken.
It would be good to provide .bat alternatives to these scripts (which are easy scripts, it should't be too difficult) or alternatively combine the sh and batch scripts (with some magic https://stackoverflow.com/questions/17510688/single-script-to-run-in-both-windows-batch-and-linux-bash) so that those tests are also runnable on Windows.