Uncommenting buggy redirect tests.
Adding xcconfig to put project settings into.
Adding preprocessor macros to let unit test arguments through.
Adding default value of preprocessor macros to default them to run conditional tests when using Xcode.
Adding comments for xcconfig.
Updating Rake arguments.
Checklist
[x] I've checked that all new and existing tests pass
[x] I've updated the documentation if necessary
[x] I've added an entry in the CHANGELOG to credit myself
Description
My original goal was to add a previously commented unit test back to the test suite, and to enable it when testing in Xcode but disable it when testing in CI. During this investigation, I also noticed that the Timing Tests were not working in this way like they were originally intended to. I ended up fixing those tests in this PR too.
Motivation and Context
Timing Tests -
If you look at previous test runs, you see that timing tests were being run in Travis:
Even though the right Xcode argument was being passed:
This seems like a bug with the project setup.
I found that we needed to add a preprocessor macro to the project's build settings to let the xcodebuild argument through.
I always like using xcconfig files to manage build settings, so I created a project level xcconfig with the build settings and commented the config. Build settings that are defined in xcconfig files can always be overridden by passing in xcodebuild arguments.
Redirect Tests -
I followed the same pattern with the uncommented redirect tests.
End Result -
You can see here that both sets of tests are run when using Xcode:
Uncommenting buggy redirect tests. Adding xcconfig to put project settings into. Adding preprocessor macros to let unit test arguments through. Adding default value of preprocessor macros to default them to run conditional tests when using Xcode. Adding comments for xcconfig. Updating Rake arguments.
Checklist
Description
My original goal was to add a previously commented unit test back to the test suite, and to enable it when testing in Xcode but disable it when testing in CI. During this investigation, I also noticed that the Timing Tests were not working in this way like they were originally intended to. I ended up fixing those tests in this PR too.
Motivation and Context
Timing Tests -
If you look at previous test runs, you see that timing tests were being run in Travis:
Even though the right Xcode argument was being passed:
This seems like a bug with the project setup.
I found that we needed to add a preprocessor macro to the project's build settings to let the
xcodebuild
argument through.I always like using
xcconfig
files to manage build settings, so I created a project levelxcconfig
with the build settings and commented the config. Build settings that are defined inxcconfig
files can always be overridden by passing inxcodebuild
arguments.Redirect Tests -
I followed the same pattern with the uncommented redirect tests.
End Result -
You can see here that both sets of tests are run when using Xcode:
And that neither are ran during CI: