Skip to content

Conversation

@azarovalex
Copy link

@azarovalex azarovalex commented Sep 10, 2022

Fixes #5474.
Run build tests on all platforms regardless of the host platform.

Motivation:

As @compnerd pointed out in the initial ticket, many of the tests in are currently statically generating the flags for expectations in BuildPlanTests.swift based upon #if os which changes behavior based on the OS rather than the target. This can cause subtle bugs to arise. We should dynamically compute the arguments.

Modifications:

Removed compile time constants from BuildPlanTests.swift and added tests for all supported destinations.

Result:

Most tests in BuildPlanTests.swift will test Windows, Linux, and Android compiler flags even when tests are running on macOS, and vice-versa.

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

This seems to be going in the right direction. I wonder if we can now share some of the platform agnostic flags, extending that set for the comparison as necessary, assuming that the differences are all suffixed rather than infixed. If not, that is okay, but the more that can be shared, the better we are.

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

Labels

None yet

2 participants