Skip to content

Fix the MinGW tests - #119

Closed
afbjorklund wants to merge 8 commits into
ccache:masterfrom
afbjorklund:mingw
Closed

afbjorklund wants to merge 8 commits into
ccache:masterfrom
afbjorklund:mingw

Conversation

@afbjorklund

Copy link
Copy Markdown
Contributor

The MinGW target had some test failures, mostly due to Travis only compiling but not running them...

Was tested with MinGW and Wine: ./configure --host=i686-w64-mingw32 && make quicktest

Comment thread conf.c
return false;
}

#if defined (__MINGW32__) && (__MINGW32_MAJOR_VERSION < 5)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps fix (i.e., move #if ... to) create_tmp_file instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Possibly. The whole thing is rather sad, really. Not as sad as printf, but sad.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't want to merge it as is; we should try to keep #ifdefs in utility functions only.

@afbjorklund

Copy link
Copy Markdown
Contributor Author

It seems like usleep doesn't work on newer MinGW, it now requires fancy nanosleep instead.

@afbjorklund

Copy link
Copy Markdown
Contributor Author

Also printfon MinGW (as in: not -w64) is seriously broken, and there are failures from hash command.

@afbjorklund

afbjorklund commented Mar 30, 2017 •

Copy link
Copy Markdown
Contributor Author

@jrosdahl : With the renewed interest in Windows, I updated to 64-bit MinGW and Wine.
That fixed some of the concerns regarding C99 or printf, also addressed your earlier review.

The cross-compilation and the quicktest runs now:
PASSED: 480 assertions, 95 tests, 10 suites

Closes #122 .

Comment thread util.c
size_hint = (size_hint < 1024) ? 1024 : size_hint;

int fd = open(path, O_RDONLY | O_BINARY);
int fd = open(path, O_RDONLY | (binary ? O_BINARY : O_TEXT));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like binary is always passed as false, so perhaps just hardcode O_TEXT instead?

Also, why do the mingw tests need O_TEXT instead of O_BINARY?

@afbjorklund afbjorklund mentioned this pull request Oct 15, 2017
@jrosdahl jrosdahl added issue: feature New feature os: windows Related to building or running on Windows labels Jan 31, 2018
afbjorklund and others added 7 commits March 4, 2018 12:56
Before it was always reading in binary mode,
which broke some test cases on Windows/MinGW.
The test framework needs to unset the GCC_COLORS environment variable,
to avoid confusing argument processing tests with "-fdiagnostics-color".
The old 32-bit environment has bugs and doesn't support C99 well.
Use new 64-bit environment (and "wine1.6-amd64" for running .exe)
@afbjorklund

Copy link
Copy Markdown
Contributor Author

Rebased, but didn't change anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

issue: feature New feature os: windows Related to building or running on Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants