-
Notifications
You must be signed in to change notification settings - Fork 206
[Tests] - FIX - several tests to run on linux target. #41
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
Conversation
@swift-ci please test |
I'd like a way to replace the
You can remove the specific target. Those tests don't need to be target-specific.
Hmm. It's interesting, because we benefit both from the tests checking the driver on the host platform and for checking the cross-compile case. Maybe there's some future factoring where we can run the target-independent tests with a couple of different target triples that are independent from the host's triple, to make sure the driver behaves the same way when cross-compiling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking very good! Just the one dSYM bit I'd like to get cleaned up before we merge, thank you!
let cmd = generateDSYMJob.commandLine | ||
|
||
if generateDSYMJob.kind == .generateDSYM { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I'd rather either keep the test target-specific (since we're testing a Darwin target feature) or use an isDarwin
check on the selected toolchain to determine whether we should expect a .generateDSYM
option. As this test is written, it will pass even if we made a mistake and stopped generating dSYMs on Darin
ADD - environment variable to enable cross compiling in tests that depends on macOS specific tooling such as libtool. ADD - testExecutableFallbackPath to validate we respect the new environment variable when searching for tools. REMOVE - several target specific arguments and platform conditional checks in some SwiftDriverTests.
94e3638
to
2ba62cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
@swift-ci please test |
private var fallbackToExecutableDefaultPath: Bool { | ||
env["SWIFT_DRIVER_TESTS_ENABLE_EXEC_PATH_FALLBACK"] == "1" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
I would like to know your opinion about the naming here.
-
Should we have all the environment variables listed in one place?
I tried to look how other swift projects handles this but found nothing in particular. I think it would be nice to have a place where we define our environment variables, the naming convention and their purpose 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the name as is; it clearly indicates that it's for testing purposes. It would certainly be good for us to document the environment variables we respond to... we don't really have user-level documentation yet, but we could create a docs/EnvironmentVariables.md
for now and figure out how we want to evolve the docs over time.
@swift-ci please test |
This PR removes several target specific arguments and/or platform conditional checks in some SwiftDriverTests. We still need to determine what to do with tests that use specific macOS tooling such as
dsymutil
orlibtool.
Questions:
Do we want to get completely rid of the
/usr/bin/
hack or should we keep it to have some cleaner tests? ¹We can remove the specific platform target in
testMultiThreadedWholeModuleOptimizationCompiles
and intestWholeModuleOptimizationOutputFileMap
and they are going to work on both platforms. Can I remove the specific target or is it there for any other reason to have it there?¹ Right now if we completely remove the hack,
testLinking
andtestSanitizerArgs
will fail because they require macOS specific tools such asdsymutil
andlibtool
, we could probably update those tests similar to what we did intestDSYMGeneration
, or just do a platform conditional check (but I understand that we are also trying to get rid of those platforms checks). So what I would like to know is the way we would like to proceed on those situations.