Trying to fix some build errors with regression tests, but this is failing
This commit is contained in:
@@ -914,4 +914,31 @@ fn test_monitor_sh_timestamps_work_in_watch_mode() {
|
||||
"monitor_filter should be defined and used in both watch and normal mode (found {} refs)",
|
||||
filter_count
|
||||
);
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Driver auto-discovery in build/upload scripts
|
||||
// ============================================================================
|
||||
|
||||
#[test]
|
||||
fn test_build_scripts_autodiscover_driver_includes() {
|
||||
let tmp = TempDir::new().unwrap();
|
||||
let ctx = TemplateContext {
|
||||
project_name: "drv_test".to_string(),
|
||||
anvil_version: "1.0.0".to_string(),
|
||||
board_name: "uno".to_string(),
|
||||
fqbn: "arduino:avr:uno".to_string(),
|
||||
baud: 115200,
|
||||
};
|
||||
TemplateManager::extract("basic", tmp.path(), &ctx).unwrap();
|
||||
|
||||
// All four compile scripts must auto-discover lib/drivers/*
|
||||
for script in &["build.sh", "upload.sh", "build.bat", "upload.bat"] {
|
||||
let content = fs::read_to_string(tmp.path().join(script)).unwrap();
|
||||
assert!(
|
||||
content.contains("lib/drivers") || content.contains("lib\\drivers"),
|
||||
"{} must auto-discover lib/drivers/* for library include paths",
|
||||
script
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user