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

Improve unit test re-run hints on cygwin

    Details

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

      1/ execute phpunit in cygwin - no changes expected
      2/ bump up main version - expected unix path in init hint
      2/ break some test and execute again - expected unix path in reexecution hint

      Show
      1/ execute phpunit in cygwin - no changes expected 2/ bump up main version - expected unix path in init hint 2/ break some test and execute again - expected unix path in reexecution hint
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w28_MDL-34147_m24_cygwin

      Description

      When using cygwin you need

      1. to run phpunit.bat, instead of phpunit.

      2. to use the proper path separator /, instead of \. (This also affects git bash users on Windows.)

      It would be good to fix Hint_ResultPrinter so that it outputs the right commands for cygwin users.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              timhunt Tim Hunt added a comment -

              Petr, if you have not already spotted, the / \ think affects the code that tells you to run init.php again.

              Show
              timhunt Tim Hunt added a comment - Petr, if you have not already spotted, the / \ think affects the code that tells you to run init.php again.
              Hide
              skodak Petr Skoda added a comment -

              Thanks for the report and ciao.

              Show
              skodak Petr Skoda added a comment - Thanks for the report and ciao.
              Hide
              timhunt Tim Hunt added a comment -

              Changes look good. +1 from me. Thanks Petr.

              Show
              timhunt Tim Hunt added a comment - Changes look good. +1 from me. Thanks Petr.
              Hide
              poltawski Dan Poltawski added a comment -

              Integrated, thanks.

              Show
              poltawski Dan Poltawski added a comment - Integrated, thanks.
              Hide
              salvetore Michael de Raadt added a comment -

              Test result: Unsuccessful

              I tested this using the Git shell for Windows and it still promoted with backslashes instead of forward-slashes.

              $ phpunit
              Moodle PHPUnit environment was initialised for different version, please use:
               php admin\tool\phpunit\cli\init.php

              If you pass this path, it removes the slashes.

              $ php admin\tool\phpunit\cli\init.php
              Could not open input file: admintoolphpunitcliinit.php

              Replacing the backslashes with forward-slashes works still.

              When I ran this under a normal command prompt window (DOS) it gave the appropriate backslashes.

              Show
              salvetore Michael de Raadt added a comment - Test result: Unsuccessful I tested this using the Git shell for Windows and it still promoted with backslashes instead of forward-slashes. $ phpunit Moodle PHPUnit environment was initialised for different version, please use: php admin\tool\phpunit\cli\init.php If you pass this path, it removes the slashes. $ php admin\tool\phpunit\cli\init.php Could not open input file: admintoolphpunitcliinit.php Replacing the backslashes with forward-slashes works still. When I ran this under a normal command prompt window (DOS) it gave the appropriate backslashes.
              Hide
              skodak Petr Skoda added a comment -

              oh, git shell is not supported, I was unable to make phpunit work with it

              Show
              skodak Petr Skoda added a comment - oh, git shell is not supported, I was unable to make phpunit work with it
              Hide
              skodak Petr Skoda added a comment -

              I have created new issue for the git shell MDL-34268, please test only cygwin for now.

              Show
              skodak Petr Skoda added a comment - I have created new issue for the git shell MDL-34268 , please test only cygwin for now.
              Hide
              salvetore Michael de Raadt added a comment -

              Test result: Success

              Tested under Cygwin proper.

              Show
              salvetore Michael de Raadt added a comment - Test result: Success Tested under Cygwin proper.
              Hide
              poltawski Dan Poltawski added a comment -

              Congratulations!

              You've made it into the weekly release!

              Thanks for your contribution - here are some random drummers to keep you inspired for the next week!
              http://www.youtube.com/watch?v=_QhpHUmVCmY

              Show
              poltawski Dan Poltawski added a comment - Congratulations! You've made it into the weekly release! Thanks for your contribution - here are some random drummers to keep you inspired for the next week! http://www.youtube.com/watch?v=_QhpHUmVCmY
              Hide
              timhunt Tim Hunt added a comment -

              This is failing for me. For some reason, on my system, $_SERVER['SHELL'] is not set. I will create a new issue and fix it: MDL-34885.

              Show
              timhunt Tim Hunt added a comment - This is failing for me. For some reason, on my system, $_SERVER ['SHELL'] is not set. I will create a new issue and fix it: MDL-34885 .
              Hide
              skodak Petr Skoda added a comment -

              You might better get a real operating system instead...

              Show
              skodak Petr Skoda added a comment - You might better get a real operating system instead...

                People

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

                  Dates

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