fix SlowRepo tests

Yay, back to the glory days of having repo tests.

The problem was that we weren't being smart about ##__DIR__.'/some/string'## during the compile step. Now we are.
Esse commit está contido em:
ptarjan
2013-04-17 15:04:28 -07:00
commit de Sara Golemon
commit 2e5d5fbb15
14 arquivos alterados com 22 adições e 23 exclusões
@@ -163,6 +163,11 @@ string IncludeExpression::CheckInclude(ConstructPtr includeExp,
parse_string_arg(fileExp, var, lit);
if (lit.empty()) return lit;
if (var == "__DIR__") {
var = "";
lit = Util::safe_dirname(container) + lit;
}
string included = get_include_file_path(container, var, lit,
documentRoot, relative);
if (!included.empty()) {
+3
Ver Arquivo
@@ -12,3 +12,6 @@ touch($dir.'empty', $base++);
touch($dir.'file', $base++);
touch($dir.'symlink', $base++);
touch($dir.'fix_mtimes.inc', $base++);
// Tests that include this like to work out of the 'hphp' dir
chdir($dir.'../..');
+1 -2
Ver Arquivo
@@ -1,7 +1,6 @@
<?php
chdir(__DIR__.'/../../..');
require 'test/sample_dir/fix_mtimes.inc';
include __DIR__.'/../../../test/sample_dir/fix_mtimes.inc';
$d = dir("test/sample_dir/");
echo "Path: " . $d->path . "\n";
+1 -2
Ver Arquivo
@@ -1,7 +1,6 @@
<?php
chdir(__DIR__.'/../../..');
require 'test/sample_dir/fix_mtimes.inc';
include __DIR__.'/../../../test/sample_dir/fix_mtimes.inc';
$files = array();
foreach (new DirectoryIterator('test/sample_dir/') as $file) {
+1 -1
Ver Arquivo
@@ -131,7 +131,7 @@ fix_mtimes.inc
1234567895
%d
33188
375
459
file
+1 -2
Ver Arquivo
@@ -1,7 +1,6 @@
<?php
chdir(__DIR__.'/../../..');
require 'test/sample_dir/fix_mtimes.inc';
include __DIR__.'/../../../test/sample_dir/fix_mtimes.inc';
$dir = new DirectoryIterator('test/sample_dir');
$files = array(); // order changes per machine
+1 -2
Ver Arquivo
@@ -1,7 +1,6 @@
<?php
chdir(__DIR__.'/../../..');
require 'test/sample_dir/fix_mtimes.inc';
include __DIR__.'/../../../test/sample_dir/fix_mtimes.inc';
$ite=new RecursiveDirectoryIterator('test/sample_dir/');
$bytestotal=0;
+2 -2
Ver Arquivo
@@ -9,10 +9,10 @@ array(5) {
string(26) "test/sample_dir/file => 3
"
[3]=>
string(38) "test/sample_dir/fix_mtimes.inc => 375
string(38) "test/sample_dir/fix_mtimes.inc => 459
"
[4]=>
string(29) "test/sample_dir/symlink => 3
"
}
Total: 5 files, 4,477 bytes
Total: 5 files, 4,561 bytes
+1 -2
Ver Arquivo
@@ -1,7 +1,6 @@
<?php
chdir(__DIR__.'/../../..');
require 'test/sample_dir/fix_mtimes.inc';
include __DIR__.'/../../../test/sample_dir/fix_mtimes.inc';
$ite=new RecursiveDirectoryIterator('test/sample_dir/');
$bytestotal=0;
+2 -2
Ver Arquivo
@@ -9,10 +9,10 @@ array(5) {
string(26) "test/sample_dir/file => 3
"
[3]=>
string(38) "test/sample_dir/fix_mtimes.inc => 375
string(38) "test/sample_dir/fix_mtimes.inc => 459
"
[4]=>
string(29) "test/sample_dir/symlink => 3
"
}
Total: 5 files, 381 bytes
Total: 5 files, 465 bytes
+1 -2
Ver Arquivo
@@ -1,7 +1,6 @@
<?php
chdir(__DIR__.'/../../..');
require 'test/sample_dir/fix_mtimes.inc';
include __DIR__.'/../../../test/sample_dir/fix_mtimes.inc';
$path = "test/sample_dir/";
$files = array(); // order changes per machine
+1 -2
Ver Arquivo
@@ -1,7 +1,6 @@
<?php
chdir(__DIR__.'/../../..');
require 'test/sample_dir/fix_mtimes.inc';
include __DIR__.'/../../../test/sample_dir/fix_mtimes.inc';
$directory = "test/sample_dir";
$fileSPLObjects = new RecursiveIteratorIterator(
+1 -2
Ver Arquivo
@@ -1,7 +1,6 @@
<?php
chdir(__DIR__.'/../../..');
require 'test/sample_dir/fix_mtimes.inc';
include __DIR__.'/../../../test/sample_dir/fix_mtimes.inc';
function getFiles(&$rdi,$depth=0) {
if (!is_object($rdi)) return;
+1 -2
Ver Arquivo
@@ -1,7 +1,6 @@
<?php
chdir(__DIR__.'/../../..');
require 'test/sample_dir/fix_mtimes.inc';
include __DIR__.'/../../../test/sample_dir/fix_mtimes.inc';
$info = new SplFileInfo('test/sample_dir');
if (!$info->isFile()) {