-
Notifications
You must be signed in to change notification settings - Fork 228
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 execution on Linux (*nix) #91
Conversation
Hi! I know this is a minor change, but could you add a signature to the contributors file and include it on this pull? |
The inclusion of |
Will include the signature tomorrow. What do you think is problematic about changing the numbering?
|
I like the idea of creating a new directory for each test, without worrying about the possibility of a previous test affecting the current test. I also like the ability to open the temporary directory and review outputs from tests that failed previous runs. The change to the numbering would defeat both of these and you have not described any benefits to the change. |
b60c5a0
to
6718b66
Compare
Signed-off-by: Martin Pöhlmann <mpdeimos@users.noreply.github.com>
Signed-off-by: Martin Pöhlmann <mpdeimos@users.noreply.github.com>
6718b66
to
86a9ab8
Compare
Signed-off-by: Martin Pöhlmann <mpdeimos@users.noreply.github.com>
@parrt Signed off the commit and added the signature (PR updated) @sharwell I think I got your point now, lemme try to explain. In general, I just stumbled across the random directory generation, while I tried to get the tests working on my linux machine. Using something unpredictable bears the risk that tests are flickering, e.g. in one testrun the same numbers are created twice. The odds are not high for this, but still.
"Previous test" is a ambiguous, I guess you mean "The last time this test method was executed (by the previous test run"? True, therefore I would even prefer to empty the directory, as this keeps the test predictable and prevents side effects. The odds that a randomly generated temp dir will already be present from any previous run and thus get a clash will increase by every time you execute tests.
That is true, with the current approach this is not possible for the tests using the random directory, but was tedious before as well, because you would have to keep the console output of ST from the previous run, grasp the random ID and then navigate to the dir. But don't get me wrong, I have no pain changing this back to the random file generation. |
How about using
|
Would also be fine. Only problem is that test dirs keep accumulating. |
That's fine (same as what it does now). You could either create a new issue to address it, or implement cleanup for passing tests like is implemented for ANTLR 4: |
Changed the behavior to use Actually the |
Hi, this works now on my machine with Linux. Thanks. |
Currently test files are created using
tmpdir + "dir" + randomValue
.On Linux (and most other *nix systems like Mac OS)
tmpdir
mostly yields/tmp
(note no trailing slash) and above concatenation results in e.g./tmpdir0123456
. However, regularly you do not have access rights to write directly in the filesystem root and thus several of the tests fail. Writing in/tmp/dir0123456
would work, tho.The following pull request contains this fix with two additions:
This results in e.g.
/tmp/st-tmp-dir/56
on my machine.Something else:
In my test environments I usually clear such temp directories in a create method, so I am sure no files from previous test runs are present. Should we add this here as well?