Moodle
  1. Moodle
  2. MDL-34885

PHPunit cygwin dectection failing for me

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
            Tim Hunt added a comment -

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

            Show
            Tim Hunt added a comment - I have $_SERVER ['TERM'] === 'cygwin'. I think I will do a fix on the basis of that.
            Hide
            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
            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
            Tim Hunt added a comment -

            Petr, any chance of a quick peer-review?

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

            looks ok, +1

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

            Thanks Petr.

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

            Integrated, thanks (23 and master).

            Show
            Eloy Lafuente (stronk7) added a comment - Integrated, thanks (23 and master).
            Hide
            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
            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
            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
            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: