Skip to content

Fix spurious build failures in std.file by using more unique test directories#6347

Merged
dlang-bot merged 1 commit intodlang:masterfrom
wilzbach:std-file-spurious
Mar 26, 2018
Merged

Fix spurious build failures in std.file by using more unique test directories#6347
dlang-bot merged 1 commit intodlang:masterfrom
wilzbach:std-file-spurious

Conversation

@wilzbach
Copy link
Contributor

Since we added a whole bunch of new test to std.file, auto-tester sometimes fails:

https://auto-tester.puremagic.com/show-run.ghtml?projectid=1&runid=3092231&isPull=true

So it's probably a good idea to use unique directories like deleteme or
in the case of the tempDir examples, generating a unique file.

import std.ascii : letters;
import std.conv : to;
import std.path : buildPath;
auto myFile = tempDir.buildPath("my_tmp_file");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not auto myFile = deleteme ~ "my_tmp_file";?

Seems like this is more complicated than it needs to be.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this is the public example for tempDir - wouldn't make sense to not use it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto myFile = tempDir.buildPath(deleteme);?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleteme = "/tmp/<randomid>.<pid>

@dlang-bot dlang-bot merged commit 5d8dc0c into dlang:master Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments