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

Add support for windows run with cygwin #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PurHur
Copy link

@PurHur PurHur commented May 5, 2019

I removed the php command because there is a cygwin support layer in bin/phpunit. Im no windows guy but looks fine for me?

Error:

purhur@purhur-PC MINGW64 ~/php-compiler (master)
$ docker run -v /c/Users/purhur/php-compiler:/compiler ircmaxell/php-compiler:1
6.04-dev php vendor/bin/phpunit

dir=$(cd "${0%[/\\]*}" > /dev/null; cd '../phpunit/phpunit' && pwd)

if [ -d /proc/cygdrive ]; then
    case $(which php) in
        $(readlink -n /proc/cygdrive)/*)
            # We are in Cygwin using Windows php, so the path must be translated
            dir=$(cygpath -m "$dir");
            ;;
    esac
fi

"${dir}/phpunit" "$@"

With the fix:

purhur@purhur-PC MINGW64 ~/php-compiler (master)
$ docker run -v /c/Users/purhur/php-compiler:/compiler ircmaxell/php-compiler:1
6.04-dev vendor/bin/phpunit
PHPUnit 8.2-g21ee615 by Sebastian Bergmann and contributors.

..........................................................        58 / 58 (100%)

Time: 1.29 minutes, Memory: 6.00 MB

OK (58 tests, 86 assertions)

Without the php it runs fine with Ubutu 16 as host and windows 7 with cygwin docker-for-windows console as host system.

@driusan
Copy link
Collaborator

driusan commented May 5, 2019

Maybe there should be an Appveyor build to test on Windows too?

@PurHur
Copy link
Author

PurHur commented May 5, 2019

It works very easy under windows, even testing.

Git for Windows
Docker for Windows
Make Port for Windows
copy content to ...\Git\mingw64\

And it runs.

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

Successfully merging this pull request may close these issues.

2 participants