[swift-build-dev] Release build performance tests in SwiftPM

Ankit Agarwal ankit at ankit.im
Mon Aug 1 13:33:18 CDT 2016


Hi,

Currently SwiftPM builds tests in debug configuration with testability
enabled i.e. @testable import Module which gives tests internal level
access to that module. This works ok for normal unit tests but there is no
way to run performance tests in release mode right now.

SwiftPM can enable a release config with testability for building and
running tests but enabling testability will remove some
compiler optimisations and will not be the final release code which will be
shipping and users would almost always want to run perf tests on the final
release code. Not enabling testability in release mode tests will make the
code that uses @testable import fail to compile.

There are two potential solutions which I can think of:
1. let testability be enabled in release mode tests and not care about the
difference.

2. Have another convention especially for performance tests. A PerfTests
directory besides Tests directory which will always test in release mode
with testability off and user is expected not to use the @testable imports
there.

Thoughts?

-- 
Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20160802/c96130bc/attachment.html>


More information about the swift-build-dev mailing list