diff --git a/.travis.yml b/.travis.yml index 358538c63..c16510f57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,12 @@ language: cpp compiler: - gcc -before_script: +before_script: - time TRAVIS=1 ./configure_ubuntu_12.04.sh -# for some tests +# for some tests - time sudo locale-gen de_DE && sudo locale-gen zh_CN.utf8 && sudo locale-gen fr_FR - time HPHP_HOME=`pwd` make -j 6 + - cd hphp/test/zend/good/ext/curl/tests/responder && ../../../../../../../hhvm/hhvm -m server -p 8444 & # mysql configuration for unit-tests - mysql -e 'CREATE DATABASE IF NOT EXISTS hhvm;' - export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=hhvm" @@ -40,7 +41,7 @@ env: - TEST_RUN_MODE="-m interp -r zend -I /^hphp\/test\/zend\/good\/(ext\/[a-ru-zA-Z0-9]|[Z]).*/" - TEST_RUN_MODE="-m interp -r zend -E /^hphp\/test\/zend\/good\/(ext\/[a-ru-zA-Z0-9]|[Z]).*/" -script: time hphp/hhvm/hhvm hphp/test/run $TEST_RUN_MODE +script: time PHP_CURL_HTTP_REMOTE_SERVER="http://localhost:8444" hphp/hhvm/hhvm hphp/test/run $TEST_RUN_MODE notifications: email: false diff --git a/hphp/runtime/ext/ext_simplexml.h b/hphp/runtime/ext/ext_simplexml.h index 40d4e4097..12919b8bd 100644 --- a/hphp/runtime/ext/ext_simplexml.h +++ b/hphp/runtime/ext/ext_simplexml.h @@ -27,7 +27,11 @@ namespace HPHP { Variant f_simplexml_import_dom(CObjRef node, const String& class_name = "SimpleXMLElement"); -Variant f_simplexml_load_string(const String& data, const String& class_name = "SimpleXMLElement", int64_t options = 0, const String& ns = "", bool is_prefix = false); +Variant f_simplexml_load_string(const String& data, + const String& class_name = "SimpleXMLElement", + int64_t options = 0, + const String& ns = "", + bool is_prefix = false); Variant f_simplexml_load_file(const String& filename, const String& class_name = "SimpleXMLElement", int64_t options = 0, const String& ns = "", bool is_prefix = false); Variant f_libxml_get_errors(); Variant f_libxml_get_last_error(); diff --git a/hphp/test/zend/bad/ext/curl/tests/bug55767.php b/hphp/test/zend/good/ext/curl/tests/bug55767.php similarity index 99% rename from hphp/test/zend/bad/ext/curl/tests/bug55767.php rename to hphp/test/zend/good/ext/curl/tests/bug55767.php index 4eedccee5..1dc76d9b2 100644 --- a/hphp/test/zend/bad/ext/curl/tests/bug55767.php +++ b/hphp/test/zend/good/ext/curl/tests/bug55767.php @@ -18,7 +18,7 @@ curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, array('Hello'=>'World','Foo'=>'Bar',100=>'John Doe')); curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use - + $curl_content = curl_exec($ch); curl_close($ch); diff --git a/hphp/test/zend/bad/ext/curl/tests/bug55767.php.expectf b/hphp/test/zend/good/ext/curl/tests/bug55767.php.expectf similarity index 100% rename from hphp/test/zend/bad/ext/curl/tests/bug55767.php.expectf rename to hphp/test/zend/good/ext/curl/tests/bug55767.php.expectf diff --git a/hphp/test/zend/good/ext/curl/tests/bug55767.php.skipif b/hphp/test/zend/good/ext/curl/tests/bug55767.php.skipif new file mode 100644 index 000000000..4af715e6b --- /dev/null +++ b/hphp/test/zend/good/ext/curl/tests/bug55767.php.skipif @@ -0,0 +1,3 @@ + diff --git a/hphp/test/zend/bad/ext/curl/tests/curl_basic_006.php.expectf b/hphp/test/zend/good/ext/curl/tests/curl_basic_006.php.expectf similarity index 100% rename from hphp/test/zend/bad/ext/curl/tests/curl_basic_006.php.expectf rename to hphp/test/zend/good/ext/curl/tests/curl_basic_006.php.expectf diff --git a/hphp/test/zend/good/ext/curl/tests/curl_basic_006.php.skipif b/hphp/test/zend/good/ext/curl/tests/curl_basic_006.php.skipif new file mode 100644 index 000000000..4af715e6b --- /dev/null +++ b/hphp/test/zend/good/ext/curl/tests/curl_basic_006.php.skipif @@ -0,0 +1,3 @@ + \ No newline at end of file + \ No newline at end of file + \ No newline at end of file + curl_init(), 2 => curl_init(), ); - + ob_start(); // start output buffering - + curl_setopt($chs[0], CURLOPT_URL, $url); //set the url we want to use curl_setopt($chs[1], CURLOPT_URL, $url); //set the url we want to use curl_setopt($chs[2], CURLOPT_URL, $url); //set the url we want to use - + $mh = curl_multi_init(); - + // add handlers curl_multi_add_handle($mh, $chs[0]); curl_multi_add_handle($mh, $chs[1]); curl_multi_add_handle($mh, $chs[2]); - + $running=null; //execute the handles $state = null; do { $state = curl_multi_exec($mh, $running); } while ($running > 0); - + //close the handles curl_multi_remove_handle($mh, $chs[0]); curl_multi_remove_handle($mh, $chs[1]); curl_multi_remove_handle($mh, $chs[2]); curl_multi_close($mh); - + $curl_content = ob_get_contents(); ob_end_clean(); diff --git a/hphp/test/zend/bad/ext/curl/tests/curl_basic_017.php.expectf b/hphp/test/zend/good/ext/curl/tests/curl_basic_017.php.expectf similarity index 100% rename from hphp/test/zend/bad/ext/curl/tests/curl_basic_017.php.expectf rename to hphp/test/zend/good/ext/curl/tests/curl_basic_017.php.expectf diff --git a/hphp/test/zend/good/ext/curl/tests/curl_basic_017.php.skipif b/hphp/test/zend/good/ext/curl/tests/curl_basic_017.php.skipif new file mode 100644 index 000000000..4af715e6b --- /dev/null +++ b/hphp/test/zend/good/ext/curl/tests/curl_basic_017.php.skipif @@ -0,0 +1,3 @@ + curl_init(), 2 => curl_init(), ); - + ob_start(); // start output buffering - + $options = array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $url, ); - + curl_setopt_array($chs[0], $options); //set the options curl_setopt_array($chs[1], $options); //set the options curl_setopt_array($chs[2], $options); //set the options - + $mh = curl_multi_init(); - + // add handlers curl_multi_add_handle($mh, $chs[0]); curl_multi_add_handle($mh, $chs[1]); curl_multi_add_handle($mh, $chs[2]); - + $running=null; //execute the handles do { @@ -45,14 +45,14 @@ $curl_content .= curl_multi_getcontent($chs[0]); $curl_content .= curl_multi_getcontent($chs[1]); $curl_content .= curl_multi_getcontent($chs[2]); - + //close the handles curl_multi_remove_handle($mh, $chs[0]); curl_multi_remove_handle($mh, $chs[1]); curl_multi_remove_handle($mh, $chs[2]); curl_multi_close($mh); - + var_dump( $curl_content ); - + ?> ===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext/curl/tests/curl_basic_018.php.expectf b/hphp/test/zend/good/ext/curl/tests/curl_basic_018.php.expectf similarity index 100% rename from hphp/test/zend/bad/ext/curl/tests/curl_basic_018.php.expectf rename to hphp/test/zend/good/ext/curl/tests/curl_basic_018.php.expectf diff --git a/hphp/test/zend/good/ext/curl/tests/curl_basic_018.php.skipif b/hphp/test/zend/good/ext/curl/tests/curl_basic_018.php.skipif new file mode 100644 index 000000000..4af715e6b --- /dev/null +++ b/hphp/test/zend/good/ext/curl/tests/curl_basic_018.php.skipif @@ -0,0 +1,3 @@ + ===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext/curl/tests/curl_basic_019.php.expectf b/hphp/test/zend/good/ext/curl/tests/curl_basic_019.php.expectf similarity index 100% rename from hphp/test/zend/bad/ext/curl/tests/curl_basic_019.php.expectf rename to hphp/test/zend/good/ext/curl/tests/curl_basic_019.php.expectf diff --git a/hphp/test/zend/good/ext/curl/tests/curl_basic_019.php.skipif b/hphp/test/zend/good/ext/curl/tests/curl_basic_019.php.skipif new file mode 100644 index 000000000..4af715e6b --- /dev/null +++ b/hphp/test/zend/good/ext/curl/tests/curl_basic_019.php.skipif @@ -0,0 +1,3 @@ + "World", "Foo" => "Bar", "Person" => "John Doe")); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); // Disable Expect: header (lighttpd does not support it :) curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use - + $copy = curl_copy_handle($ch); curl_close($ch); - + $curl_content = curl_exec($copy); curl_close($copy); diff --git a/hphp/test/zend/bad/ext/curl/tests/curl_copy_handle_basic_007.php.expectf b/hphp/test/zend/good/ext/curl/tests/curl_copy_handle_basic_007.php.expectf similarity index 100% rename from hphp/test/zend/bad/ext/curl/tests/curl_copy_handle_basic_007.php.expectf rename to hphp/test/zend/good/ext/curl/tests/curl_copy_handle_basic_007.php.expectf diff --git a/hphp/test/zend/good/ext/curl/tests/curl_copy_handle_basic_007.php.skipif b/hphp/test/zend/good/ext/curl/tests/curl_copy_handle_basic_007.php.skipif new file mode 100644 index 000000000..4af715e6b --- /dev/null +++ b/hphp/test/zend/good/ext/curl/tests/curl_copy_handle_basic_007.php.skipif @@ -0,0 +1,3 @@ + ===DONE=== diff --git a/hphp/test/zend/bad/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.expectf b/hphp/test/zend/good/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.expectf similarity index 100% rename from hphp/test/zend/bad/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.expectf rename to hphp/test/zend/good/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.expectf diff --git a/hphp/test/zend/bad/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.skipif b/hphp/test/zend/good/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.skipif similarity index 81% rename from hphp/test/zend/bad/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.skipif rename to hphp/test/zend/good/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.skipif index 2802ce0c5..10d1f9634 100644 --- a/hphp/test/zend/bad/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.skipif +++ b/hphp/test/zend/good/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.php.skipif @@ -1,3 +1,3 @@ - \ No newline at end of file diff --git a/hphp/test/zend/bad/ext/curl/tests/curl_setopt_basic003.php b/hphp/test/zend/good/ext/curl/tests/curl_setopt_basic003.php similarity index 100% rename from hphp/test/zend/bad/ext/curl/tests/curl_setopt_basic003.php rename to hphp/test/zend/good/ext/curl/tests/curl_setopt_basic003.php diff --git a/hphp/test/zend/bad/ext/curl/tests/curl_setopt_basic003.php.expectf b/hphp/test/zend/good/ext/curl/tests/curl_setopt_basic003.php.expectf similarity index 100% rename from hphp/test/zend/bad/ext/curl/tests/curl_setopt_basic003.php.expectf rename to hphp/test/zend/good/ext/curl/tests/curl_setopt_basic003.php.expectf diff --git a/hphp/test/zend/good/ext/curl/tests/curl_setopt_basic003.php.skipif b/hphp/test/zend/good/ext/curl/tests/curl_setopt_basic003.php.skipif new file mode 100644 index 000000000..4af715e6b --- /dev/null +++ b/hphp/test/zend/good/ext/curl/tests/curl_setopt_basic003.php.skipif @@ -0,0 +1,3 @@ + diff --git a/hphp/test/zend/good/ext/curl/tests/responder/get.php.skipif b/hphp/test/zend/good/ext/curl/tests/responder/get.php.skipif new file mode 100644 index 000000000..5c559ecb3 --- /dev/null +++ b/hphp/test/zend/good/ext/curl/tests/responder/get.php.skipif @@ -0,0 +1 @@ +always skip - not a test diff --git a/hphp/tools/import_zend_test.py b/hphp/tools/import_zend_test.py index 1f81e9a17..76800c860 100755 --- a/hphp/tools/import_zend_test.py +++ b/hphp/tools/import_zend_test.py @@ -423,6 +423,7 @@ other_files = ( '/ext/bz2/tests/004_1.txt.bz2', '/ext/bz2/tests/004_2.txt.bz2', '/ext/calendar/tests/skipif.inc', + '/ext/curl/tests/responder/get.php', '/ext/curl/tests/curl_testdata1.txt', '/ext/curl/tests/curl_testdata2.txt', '/ext/date/tests/DateTime_data-absolute.inc',