Skip to content

tests: port dispatch_io and dispatch_io_pipe_close to Windows #495

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

Merged
merged 1 commit into from
Jun 27, 2019
Merged

tests: port dispatch_io and dispatch_io_pipe_close to Windows #495

merged 1 commit into from
Jun 27, 2019

Conversation

adierking
Copy link
Contributor

This lets us build and run the full extended test suite for Windows! I
caught several bugs in Dispatch's Windows port while I was working on
this and I submitted pull requests to fix them (#493, #494). The only
dispatch_io test case which fails right now is test_io_stop, and that's
because we don't have pipe support on Windows yet.

@adierking
Copy link
Contributor Author

cc @compnerd @ktopley-apple

@@ -241,23 +245,30 @@ static void
test_io_read_write(void)
{
char *path_in = dispatch_test_get_large_file();
#if defined(_WIN32)
char *temp_dir = getenv("TMP") ?: getenv("TEMP");
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be nicer to avoid the GNU extension here:

char *temp_dir = getenv("TMP");
if (temp_dir == NULL)
  temp_dir = getenv("TEMP");

This lets us build and run the full extended test suite for Windows! I
caught several bugs in Dispatch's Windows port while I was working on
this and I submitted pull requests to fix them (#493, #494). The only
dispatch_io test case which fails right now is test_io_stop, and that's
because we don't have pipe support on Windows yet.
@compnerd
Copy link
Member

@swift-ci please test

@ktopley-apple ktopley-apple merged commit 6a36af8 into swiftlang:master Jun 27, 2019
rokhinip pushed a commit that referenced this pull request Nov 5, 2021
tests: port dispatch_io and dispatch_io_pipe_close to Windows
Signed-off-by: Kim Topley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants