Skip to content

Commit df80e5f

Browse files
committed
Don't set the #[cfg(not(test))] macro in entry_point macro
1 parent 7339ff0 commit df80e5f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## Breaking
2+
3+
- Don't set the `#[cfg(not(test))]` attribute for the entry point function in the `entry_point` macro
4+
- With custom test frameworks, it's possible to use the normal entry point also in test environments
5+
- To get the old behavior, you can add the `#[cfg(not(test))]` attribute to the `entry_point` invocation
6+
7+
## Other
8+
19
- Additional assertions for the passed `KERNEL` executable
210
- check that the executable exists (for better error messages)
311
- check that the executable has a non-empty text section (an empty text section occurs when no entry point is set)

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ pub mod bootinfo;
2222
#[macro_export]
2323
macro_rules! entry_point {
2424
($path:path) => {
25-
#[cfg(not(test))]
2625
#[export_name = "_start"]
2726
pub extern "C" fn __impl_start(boot_info: &'static $crate::bootinfo::BootInfo) -> ! {
2827
// validate the signature of the program entry point

0 commit comments

Comments
 (0)