From 3f880f93e2d7a9d08f504bf2e4d2aae1b7ce9419 Mon Sep 17 00:00:00 2001 From: Paul Tarjan Date: Tue, 23 Apr 2013 16:59:57 -0700 Subject: [PATCH] fix bz2 race Since we run these in parallel then there is a bad ordering of these where they eat eachother's files. --- hphp/test/zend/good/ext-bz2/bug51997.php | 2 +- hphp/test/zend/good/ext-bz2/with_files.php | 2 +- hphp/tools/import_zend_test.py | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hphp/test/zend/good/ext-bz2/bug51997.php b/hphp/test/zend/good/ext-bz2/bug51997.php index 6e5f85170..cf0cf5e72 100644 --- a/hphp/test/zend/good/ext-bz2/bug51997.php +++ b/hphp/test/zend/good/ext-bz2/bug51997.php @@ -2,7 +2,7 @@ error_reporting(E_ALL); -$filename = "testfile.bz2"; +$filename = "bug51997.bz2"; $str = "This is a test string.\n"; $bz = bzopen($filename, "w"); bzwrite($bz, $str); diff --git a/hphp/test/zend/good/ext-bz2/with_files.php b/hphp/test/zend/good/ext-bz2/with_files.php index 24583ad01..85970bef4 100644 --- a/hphp/test/zend/good/ext-bz2/with_files.php +++ b/hphp/test/zend/good/ext-bz2/with_files.php @@ -2,7 +2,7 @@ error_reporting(E_ALL); -$filename = "testfile.bz2"; +$filename = "with_files.bz2"; $str = "This is a test string.\n"; $bz = bzopen($filename, "w"); bzwrite($bz, $str); diff --git a/hphp/tools/import_zend_test.py b/hphp/tools/import_zend_test.py index 8fe576472..617dbcfcd 100755 --- a/hphp/tools/import_zend_test.py +++ b/hphp/tools/import_zend_test.py @@ -196,7 +196,7 @@ other_files = ( 'ns_066.inc', 'ns_067.inc', 'unset.inc', - 'quicktester.inc', + 'tests/quicktester.inc', ) errors = ( @@ -360,8 +360,12 @@ def walk(filename, source): test = test.replace("1)) {\n\tunlink($file2", "2)) {\n\tunlink($file2") if 'bug24054.php' in full_dest_filename: test = test.replace("quicktester.inc", "tests/quicktester.inc") - if 'with_strings.php' in full_dest_filename: + if 'ext-bz2/with_strings.php' in full_dest_filename: test = test.replace("../..", "") + if 'ext-bz2/bug51997.php' in full_dest_filename: + test = test.replace("testfile.bz2", "bug51997.bz2") + if 'ext-bz2/with_files.php' in full_dest_filename: + test = test.replace("testfile.bz2", "with_files.bz2") file(full_dest_filename, 'w').write(test)