-
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: TEMP_DIR creation is based on PID (reverts ed9da2)
- Loading branch information
Showing
2 changed files
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was wrong with the old behaviour? Maybe I don't understand because I was thinking
$_SERVER['argv']
is set anytime.0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes (when accessing script via CLI or GET), but
getmypid()
is simpler and IMHO better :)0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In coding, yes. But result is infinite set of directories (well, thousand of them) and
$_SERVER['argv']
set is count of run tests. In first case you must care about deleting them, int the second case you don't.0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw. I agree with commit, it is simpler to understand it. I was just interested why.
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my machine (win, php 5.3) is count same for both (max 500). Only names are different (hashes vs. numbers).
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run it multiple times without RunTests.bat.
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... we can discuss on forum if you want.
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis runs tests for each PHP version simultaneously, using the same temp dir.
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dg: Was that the reason why RecursiveDirectoryIterator often failed in travis tests?
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so.
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. :-) We shall see.
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. The first line of log is a worker name. Different for every PHP version tests. And clonning of repo is done twice. But documentation is silent to this topic. Moreover
RecursiveDirectoryIterator
screams about TEMP_DIR directly and it is not deleted anytime.0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your commit in Tester will explain it.
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WTF, „Error: mkdir(): File exists“ https://travis-ci.org/nette/nette/jobs/5038274
0e23c0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really WTF. I have done more... With this code (milo/tester@634475b) this message (https://travis-ci.org/milo/nette/jobs/5099125).
It corresponds with PHP BUG #35326 (https://bugs.php.net/bug.php?id=35326) maybe. If yes,
@mkdir('tmp')
(the base temp dir) in bootstrap helps.