You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our custom bare-metal allocator (`SvsmAllocator`) does not work during
tests, as they run as regular userspace binaries. Thus, we must not
set it as the global Rust allocator. To do this, we need a
compile-time directive that lets us know we are building doctests and
not the regular binary (`cfg(doctests)`), but sadly it is not
properly set during test compilation (see rust-lang/rust#45599,
rust-lang/rust#67295 and coconut-svsm#93).
In order to bypass this, set the compile time flag ourselves via the
RUSTFLAGS environment variable so that tests work. Also add the new
invocation to the `test` target in the Makefile.
Fixes: coconut-svsm#93
Fixes: 8cdea8e ("Cargo manifest: disable doctests")
Signed-off-by: Carlos López <[email protected]>
0 commit comments