Moodle
  1. Moodle
  2. MDL-34147

Improve unit test re-run hints on cygwin

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      42479

      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.

        Issue Links

          Activity

          Hide
          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
          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
          Petr Škoda added a comment -

          Thanks for the report and ciao.

          Show
          Petr Škoda added a comment - Thanks for the report and ciao.
          Hide
          Tim Hunt added a comment -

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

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

          Integrated, thanks.

          Show
          Dan Poltawski added a comment - Integrated, thanks.
          Hide
          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
          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
          Petr Škoda added a comment -

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

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

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

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

          Test result: Success

          Tested under Cygwin proper.

          Show
          Michael de Raadt added a comment - Test result: Success Tested under Cygwin proper.
          Hide
          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
          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
          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
          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
          Petr Škoda added a comment -

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

          Show
          Petr Škoda 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: