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

Rerun command on windows seems broken

    XMLWordPrintable

    Details

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

      Apply

      diff --git a/user/tests/search_test.php b/user/tests/search_test.php
      index 371185b..78858b5 100644
      --- a/user/tests/search_test.php
      +++ b/user/tests/search_test.php
      @@ -85,7 +85,7 @@ class user_search_testcase extends advanced_testcase {
               $recordset = $searcharea->get_recordset_by_timestamp(time() + 2);
       
               // No new records.
      -        $this->assertFalse($recordset->valid());
      +        $this->assertTrue($recordset->valid());
               $recordset->close();
           }
      

      1. Run vendor/bin/phpunit user/tests/search_test.php
      2. Copy-paste command shown in "To re-run" and ensure it works.
      3. Change working directory to user
      4. run ../vendor/bin/phpunit -c ../phpunit.xml tests/search_test.php
      5. Copy-paste command shown in "To re-run" and ensure it works.
      6. run ../vendor/bin/phpunit --config="../phpunit.xml" tests/search_test.php
      7. Copy-paste command shown in "To re-run" and ensure it works.
      8. run ../vendor/bin/phpunit --config "../phpunit.xml" tests/search_test.php
      9. Copy-paste command shown in "To re-run" and ensure it works.
      10. Update version in version.php
      11. run vendor/bin/phpunit and ensure the copy/paste of suggested command works.

      Test on windows cmd, gitbash, mingw and cygwin

      1. Initialize behat with 2 runs (php admin/tool/behat/cli/init.php -j=2)
      2. run behat and ensure behat runs starts. No need do complete run. (php admin/tool/behat/cli/run.php)
      3. change directory to user
      4. run behat and ensure it starts behat process without any problem (php ../admin/tool/behat/cli/run.php)
      5. Test on windows cmd, gitbash, mingw and cygwin
      Show
      Apply diff --git a/user/tests/search_test.php b/user/tests/search_test.php index 371185b..78858b5 100644 --- a/user/tests/search_test.php +++ b/user/tests/search_test.php @@ -85,7 +85,7 @@ class user_search_testcase extends advanced_testcase { $recordset = $searcharea->get_recordset_by_timestamp(time() + 2); // No new records. - $this->assertFalse($recordset->valid()); + $this->assertTrue($recordset->valid()); $recordset->close(); } Run vendor/bin/phpunit user/tests/search_test.php Copy-paste command shown in "To re-run" and ensure it works. Change working directory to user run ../vendor/bin/phpunit -c ../phpunit.xml tests/search_test.php Copy-paste command shown in "To re-run" and ensure it works. run ../vendor/bin/phpunit --config="../phpunit.xml" tests/search_test.php Copy-paste command shown in "To re-run" and ensure it works. run ../vendor/bin/phpunit --config "../phpunit.xml" tests/search_test.php Copy-paste command shown in "To re-run" and ensure it works. Update version in version.php run vendor/bin/phpunit and ensure the copy/paste of suggested command works. Test on windows cmd, gitbash, mingw and cygwin Initialize behat with 2 runs (php admin/tool/behat/cli/init.php -j=2) run behat and ensure behat runs starts. No need do complete run. (php admin/tool/behat/cli/run.php) change directory to user run behat and ensure it starts behat process without any problem (php ../admin/tool/behat/cli/run.php) Test on windows cmd, gitbash, mingw and cygwin
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      wip-mdl-55379

      Description

      See here:
      https://ci.appveyor.com/project/MoodleIntegration/prechecker/build/MDL-55355-master-dcd9506.224#L924

      To re-run:
       C:\projects\moodle\vendor\bin\/../phpunit/phpunit/phpunit user_search_testcase user\tests\search_test.php
      

      That rerun command seems broekn

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/16