Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#11867 closed defect (bug) (fixed)

Increase Cross-Plattform portability of the Testsuite

Reported by: hakre's profile hakre Owned by: westi's profile westi
Milestone: WordPress.org Priority: normal
Severity: normal Version:
Component: Unit Tests Keywords: has-patch tested
Focuses: Cc:

Description

The attached patch increases cross plattform compability for the testsuite. It does two things:

  1. Getopt compability for non PHP 5.3 systems (especially Windows but also certain *NIX Systems).
  2. Usage of the PATH_SEPARATOR constant for the include path to allow it to be used on windows as well.

With these changes I was able to get the suite to run under windows.

The 1. deficency is documented in codex (see Note for Windows Users remark), the 2. is not. After the patch is provided that notice can be removed in codex.

Additionally I've extended the README.txt for the commandline parameters and wordwrapped it.

Attachments (2)

11867.patch (14.6 KB) - added by hakre 15 years ago.
11867-interoperability.patch (11.8 KB) - added by hakre 15 years ago.
Interoperability / Cross Plattform related changes only.

Download all attachments as: .zip

Change History (10)

@hakre
15 years ago

@hakre
15 years ago

Interoperability / Cross Plattform related changes only.

#1 @hakre
15 years ago

  • Type changed from feature request to defect (bug)

#2 follow-up: @dd32
15 years ago

  • Milestone set to WordPress.org site

Its long been known that the test suite requires PHP 5.3 on windows, And was always a given.

Now that PHP 5.3 is available, theres no reason not to use it.

I use the test set on Windows atm with absolutely no problems.

-ini_set('include_path', ini_get('include_path') . ':'.ABSPATH.'/wp-includes'); 
+ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . ABSPATH . '/wp-includes'); 

That'll break it. The seperator there isnt a PATH_SEPERATOR, its the seperation string in the include path, PHP uses : from memory, as that shows.

Milestone: Need to choose something, WordPress.org will do for now i think.

#3 @westi
15 years ago

  • Status changed from new to accepted

Thank You, Great Work.

I'll commit this soon :-)

#4 in reply to: ↑ 2 @hakre
15 years ago

Replying to dd32:

-ini_set('include_path', ini_get('include_path') . ':'.ABSPATH.'/wp-includes'); 
+ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . ABSPATH . '/wp-includes'); 

That'll break it. The seperator there isnt a PATH_SEPERATOR, its the seperation string in the include path, PHP uses : from memory, as that shows.

I think you're mixing PATH_SEPERATOR and DIRECTORY_SEPERATOR. PATH_SEPERATOR does not break anything and has been made to seperade paths in the include_path setting cross plattform.

#5 @dd32
15 years ago

I think you're mixing PATH_SEPERATOR and DIRECTORY_SEPERATOR

Indeed i was :)

#6 @westi
15 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Thanks for this.

Committed to wordpress-tests.

#7 @hakre
15 years ago

See also: #11892

#8 @hakre
15 years ago

Testsuite/Windows Related: #12277

Note: See TracTickets for help on using tickets.