Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#11867 closed defect (bug) (fixed)

Increase Cross-Plattform portability of the Testsuite

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

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 17 years ago.
11867-interoperability.patch​ (11.8 KB ) - added by hakre 17 years ago.
Interoperability / Cross Plattform related changes only.

Download all attachments as: .zip

Change History (10)

@hakre
17 years ago

@hakre
17 years ago

Interoperability / Cross Plattform related changes only.

#1 @hakre
17 years ago

  • Type feature request → defect (bug)

#2 follow-up: @dd32
17 years ago

  • Milestone → 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
17 years ago

  • Status new → accepted

Thank You, Great Work.

I'll commit this soon :-)

#4 in reply to: ↑ 2 @hakre
17 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
17 years ago

I think you're mixing PATH_SEPERATOR and DIRECTORY_SEPERATOR

Indeed i was :)

#6 @westi
17 years ago

  • Resolution → fixed
  • Status accepted → closed

Thanks for this.

Committed to wordpress-tests.

#7 @hakre
17 years ago

See also: #11892

#8 @hakre
17 years ago

Testsuite/Windows Related: #12277

Note: See TracTickets for help on using tickets.