Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-34885

PHPunit cygwin dectection failing for me

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1, 2.4
    • Fix Version/s: 2.3.2
    • Component/s: Unit tests
    • Labels:
    • Testing Instructions:
      Hide

      You need to be on Windows to test this.

      1. edit version.php and increase the version number by 1.
      2. in a cygwin or msysgit bash terminal, type phpunit. Make sure the error tells you to run php admin/tool/phpunit/cli/init.php (with forward slashes)
      3. in a standard windows command prompt, type phpunit. Make sure the error tells you to run php admin\tool\phpunit\cli\init.php (with backslashes)
      Show
      You need to be on Windows to test this. edit version.php and increase the version number by 1. in a cygwin or msysgit bash terminal, type phpunit. Make sure the error tells you to run php admin/tool/phpunit/cli/init.php (with forward slashes) in a standard windows command prompt, type phpunit. Make sure the error tells you to run php admin\tool\phpunit\cli\init.php (with backslashes)
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      The cygwin detection implemented in MDL-34147 is failing for me. I don't know why, but I plan to investigate.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            timhunt Tim Hunt added a comment -

            I have $_SERVER['TERM'] === 'cygwin'. I think I will do a fix on the basis of that.

            Show
            timhunt Tim Hunt added a comment - I have $_SERVER ['TERM'] === 'cygwin'. I think I will do a fix on the basis of that.
            Hide
            timhunt Tim Hunt added a comment -

            You need to be on Windows to test this.

            1. edit version.php and increase the version number by 1.
            2. in a cygwin or msysgit bash terminal, type phpunit. Make sure the error tells you to run php admin/tool/phpunit/cli/init.php (with forward slashes)
            3. in a standard windows command prompt, type phpunit. Make sure the error tells you to run php admin\tool\phpunit\cli\init.php (with backslashes)
            Show
            timhunt Tim Hunt added a comment - You need to be on Windows to test this. edit version.php and increase the version number by 1. in a cygwin or msysgit bash terminal, type phpunit. Make sure the error tells you to run php admin/tool/phpunit/cli/init.php (with forward slashes) in a standard windows command prompt, type phpunit. Make sure the error tells you to run php admin\tool\phpunit\cli\init.php (with backslashes)
            Hide
            timhunt Tim Hunt added a comment -

            Petr, any chance of a quick peer-review?

            Show
            timhunt Tim Hunt added a comment - Petr, any chance of a quick peer-review?
            Hide
            skodak Petr Skoda added a comment -

            looks ok, +1

            Show
            skodak Petr Skoda added a comment - looks ok, +1
            Hide
            timhunt Tim Hunt added a comment -

            Thanks Petr.

            Show
            timhunt Tim Hunt added a comment - Thanks Petr.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated, thanks (23 and master).

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks (23 and master).
            Hide
            salvetore Michael de Raadt added a comment -

            Test result: Success!

            Tested in 2.3 and master.

            Cygwin...

            $ ../../php/phpunit
            Moodle PHPUnit environment is not initialised, please use:
             php admin/tool/phpunit/cli/init.php

            DOS prompt...

            D:\xampp\htdocs\moodle_23_test_mysql>phpunit
            Moodle PHPUnit environment is not initialised, please use:
             php admin\tool\phpunit\cli\init.php

            msysGit...

            Michael@MICHAEL-PC /d/xampp/htdocs/moodle_23_test_mysql (MOODLE_23_STABLE)
            $ phpunit
            Moodle PHPUnit environment is not initialised, please use:
             php admin/tool/phpunit/cli/init.php

            Show
            salvetore Michael de Raadt added a comment - Test result: Success! Tested in 2.3 and master. Cygwin... $ ../../php/phpunit Moodle PHPUnit environment is not initialised, please use: php admin/tool/phpunit/cli/init.php DOS prompt... D:\xampp\htdocs\moodle_23_test_mysql>phpunit Moodle PHPUnit environment is not initialised, please use: php admin\tool\phpunit\cli\init.php msysGit... Michael@MICHAEL-PC /d/xampp/htdocs/moodle_23_test_mysql (MOODLE_23_STABLE) $ phpunit Moodle PHPUnit environment is not initialised, please use: php admin/tool/phpunit/cli/init.php
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility!

            Many thanks for your collaboration, yay!

            Closing, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility! Many thanks for your collaboration, yay! Closing, ciao

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/12