-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test via iojs throws but python/make do not report error #1876
Comments
|
I've come across this before. I think that the python test suite creates the temporary directory (found in |
Yes, that's exactly right. The python test harness (or whatever the right word is) is creating the tmp dir and the command line is failing if I don't create the tmp dir it expects. Should a "create tmp dir if it doesn't exist" bit be added to the test file? Or is this just sort of a known gotcha and it should be left as is? |
Not seeing any code anywhere in any of the other tests to create the temp dir if it doesn't exist, so I'm guess this is just something you just sort of have to know. |
Oh, wait, that code could be stuck inside of |
Well, putting it in |
Even easier might be to check in I wouldn't want |
Perhaps use a |
At the moment we kind of expect tests to be run through |
Adding this to
Can someone do more rigorous benchmarks (or point me to docs or something on how to do it)? I'll stick it in a PR for now. |
Alternatively, we could have the python test runner set an environment variable that |
@Trott I don't think that's enough, though. Tests don't just expect that the temp directory is there but that it's empty as well. In other words, if the directory exists, it needs to be cleaned out. And because it can contain subdirectories, you're going to have to do a recursive walk of the directory tree. The test runner already handles all of that so it's basically duplicating existing functionality. |
I'm -1 on changing tests specifically to run standalone. It is documented that single tests should run through test.py. As @jbergstroem outlined, I think these kind of changes are best done in batch if we are to switch to a new test runner. |
@silverwind Below the instructions for running tests through
That will fail in many cases if the user does not manually create |
Hmm, not sure. Could update the doc to indicate that most tests can be run directly, but it'd be somewhat nice if we find a solution to fix this. I haven't looked at it yet, but recently encountered this:
Not sure what's going on there exactly. |
So, just to make sure I'm not making naïve assumptions:
|
While I agree that the goal should be to have each test run as standalone, I don't think it's beneficial to have the same duplicate code in Having |
So, this is kind of interesting, I think... While putting together a proof-of-concept (or, as it may turn out to be, a disproof-of-concept, but either way...), I was wondering why the Python code deleted and re-created the temp directory right before and right after each test. That seemed unnecessary. So I wrote my code to only deal with the temp directories before each test. Weirdly, this causes It turns out that stale watch events from the previous test ( This is weird to me, and I'm inclined to rewrite one or both tests so that they don't both use a directory named |
Pushed a new commit to #1877. See notes at #1877 (comment). |
#1877 has landed, closing this. |
out/Release/iojs test/parallel/test-http-get-pipeline-problem.js
throws:But
python tools/test.py -v --mode=release parallel/test-http-get-pipeline-problem
completes successfully.Is this a bug or do I misunderstand how the tests are supposed to work?
The text was updated successfully, but these errors were encountered: