tracing icon indicating copy to clipboard operation
tracing copied to clipboard

futures: fix tests not compiling on some feature combinations

Open hawkw opened this issue 4 years ago • 2 comments

Motivation

Previously, the tests for std::future support were always compiled, regardless of whether or not the std::future feature was enabled. This is because the tests were in the integration tests dir, and were not feature flagged.

Additionally, when disabling the std feature, tracing-futures tests will fail to compile, as the test support library depends on std.

Solution

I've moved these tests into modules in the lib tests, so that they can only be compiled when the appropriate feature flags are enabled. I've also made some tweaks to the test support code to accommodate this.

I've also made the tests module be conditional on the presence of the std feature. Ideally, we would be able to run tests for the subset of functionality available on no-std when the feature is disabled, but there are some obstacles to doing this easily.

This fixes some of the issues described in #632.

Signed-off-by: Eliza Weisman [email protected]

hawkw avatar Mar 12 '20 17:03 hawkw

Bump. Just ran into tracing-futures not compiling with --no-default-features (when trying to verify I didn't break things with #1185).

jplatte avatar Jan 12 '21 00:01 jplatte

Let's rebase and merge this one?

bryangarza avatar May 06 '22 00:05 bryangarza

Closing this as I believe it's obsolete and the issue may have already been fixed separately.

hawkw avatar Aug 16 '22 19:08 hawkw