74 lines
2.1 KiB
C
74 lines
2.1 KiB
C
/*
|
||
* 模块名称:统一测试套件选择
|
||
* 模块功能:集中选择当前构建要运行的测试套件。所有测试统一由
|
||
* ch395fTestTask(StartCh395fTestTask)调度,defaultTask 在测试
|
||
* 构建下空闲,正常产品构建下仅运行存储挂载/测试。
|
||
* 适用平台:STM32F4 系列
|
||
* 作者:王建锋
|
||
* 创建日期:2026-08-26
|
||
*
|
||
* 一次构建仅启用一个 TEST_SUITE_*(或都不启用 = 正常产品构建):
|
||
* TEST_SUITE_CH395F : CH395F 测试(沿用 ch395f_test.h 阶段宏,HW 1~5 / NET 6~11)
|
||
* TEST_SUITE_STORAGE : FTL + FatFS 存储测试(从 defaultTask 迁入)
|
||
* TEST_SUITE_GD5F : GD5F2GQ5UE NAND 驱动测试
|
||
*/
|
||
|
||
#ifndef __TEST_CONFIG_H
|
||
#define __TEST_CONFIG_H
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
#include <stdint.h>
|
||
|
||
/* === 选择当前构建的测试套件(三选一,或都注释 = 正常产品构建)=== */
|
||
//#define TEST_SUITE_CH395F
|
||
//#define TEST_SUITE_STORAGE
|
||
//#define TEST_SUITE_GD5F
|
||
|
||
#if defined(TEST_SUITE_CH395F) + defined(TEST_SUITE_STORAGE) + defined(TEST_SUITE_GD5F) > 1
|
||
#error "测试套件互斥:一次构建只能启用一个 TEST_SUITE_*"
|
||
#endif
|
||
|
||
#if defined(TEST_SUITE_CH395F) || defined(TEST_SUITE_STORAGE) || defined(TEST_SUITE_GD5F)
|
||
#define TEST_SUITE_SELECTED
|
||
#endif
|
||
|
||
#ifdef TEST_SUITE_CH395F
|
||
#include "ch395f_test.h"
|
||
#define TEST_SUITE_NAME "CH395F"
|
||
#endif
|
||
|
||
#ifdef TEST_SUITE_STORAGE
|
||
#include "storage_test.h"
|
||
#define TEST_SUITE_NAME "STORAGE"
|
||
#endif
|
||
|
||
#ifdef TEST_SUITE_GD5F
|
||
/* 选中 GD5F 套件时,自动开启 gd5f 测试总开关与全部阶段 */
|
||
#define ENABLE_GD5F_TESTS
|
||
#define ENABLE_GD5F_PHASE1_TESTS
|
||
#define ENABLE_GD5F_PHASE2_TESTS
|
||
#define ENABLE_GD5F_PHASE3_TESTS
|
||
#define ENABLE_GD5F_PHASE4_TESTS
|
||
#define ENABLE_GD5F_PHASE5_TESTS
|
||
#define ENABLE_GD5F_PHASE6_TESTS
|
||
#define ENABLE_GD5F_PHASE7_TESTS
|
||
#define ENABLE_GD5F_PHASE8_TESTS
|
||
#define ENABLE_GD5F_PHASE9_TESTS
|
||
#define ENABLE_GD5F_PHASE10_TESTS
|
||
#include "gd5f_test.h"
|
||
#define TEST_SUITE_NAME "GD5F"
|
||
#endif
|
||
|
||
#ifndef TEST_SUITE_NAME
|
||
#define TEST_SUITE_NAME "NONE"
|
||
#endif
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
|
||
#endif /* __TEST_CONFIG_H */
|