driver: Rename "local" tests to "single board" tests, add some description to the names
This commit is contained in:
parent
3b52eddf6b
commit
50aad77f3a
|
@ -752,7 +752,7 @@ ptest_func_t frhost_slave = {
|
||||||
|
|
||||||
PARAM_GROUP_DECLARE_TYPE(IO_MODE, sdio_test_config_t, test_cfg_array);
|
PARAM_GROUP_DECLARE_TYPE(IO_MODE, sdio_test_config_t, test_cfg_array);
|
||||||
|
|
||||||
TEST_MASTER_SLAVE(FRHOST, test_cfg_array, "[sdio][timeout=180][test_env=UT_SDIO]", &frhost_master, &frhost_slave);
|
TEST_MASTER_SLAVE(SDIO_FRHOST, test_cfg_array, "[sdio][timeout=180][test_env=UT_SDIO]", &frhost_master, &frhost_slave);
|
||||||
|
|
||||||
ptest_func_t tohost_master = {
|
ptest_func_t tohost_master = {
|
||||||
.pre_test = null_pre,
|
.pre_test = null_pre,
|
||||||
|
@ -766,4 +766,4 @@ ptest_func_t tohost_slave = {
|
||||||
.post_test = null_post,
|
.post_test = null_post,
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_MASTER_SLAVE(TOHOST, test_cfg_array, "[sdio][timeout=180][test_env=UT_SDIO]", &tohost_master, &tohost_slave);
|
TEST_MASTER_SLAVE(SDIO_TOHOST, test_cfg_array, "[sdio][timeout=180][test_env=UT_SDIO]", &tohost_master, &tohost_slave);
|
||||||
|
|
|
@ -21,7 +21,7 @@ static const ptest_func_t local_test_func = {
|
||||||
|
|
||||||
#define TEST_SPI_LOCAL(name, param_set) \
|
#define TEST_SPI_LOCAL(name, param_set) \
|
||||||
PARAM_GROUP_DECLARE(name, param_set) \
|
PARAM_GROUP_DECLARE(name, param_set) \
|
||||||
TEST_LOCAL(name, param_set, "[spi][timeout=120]", &local_test_func)
|
TEST_SINGLE_BOARD(SPI_##name, param_set, "[spi][timeout=120]", &local_test_func)
|
||||||
|
|
||||||
static void local_test_init(void** arg)
|
static void local_test_init(void** arg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,11 +75,11 @@
|
||||||
* 4. Declare the group by PARAM_GROUP_DECLARE right after the param group:
|
* 4. Declare the group by PARAM_GROUP_DECLARE right after the param group:
|
||||||
* PARAM_GROUP_DECLARE(MODE, mode_pgroup)
|
* PARAM_GROUP_DECLARE(MODE, mode_pgroup)
|
||||||
*
|
*
|
||||||
* 5. Declare the test function by TEST_LOCAL (for single board test), or TEST_MASTER_SLAVE(for multiboard test)
|
* 5. Declare the test function by TEST_SINGLE_BOARD (for single board test), or TEST_MASTER_SLAVE(for multiboard test)
|
||||||
* TEST_MASTER_SLAVE(MODE, mode_pgroup, "[spi][timeout=120]", &master_test_func, &slave_test_func)
|
* TEST_MASTER_SLAVE(MODE, mode_pgroup, "[spi][timeout=120]", &master_test_func, &slave_test_func)
|
||||||
*
|
*
|
||||||
* or
|
* or
|
||||||
* TEST_LOCAL(TIMING, timing_pgroup, "[spi][timeout=120]", &local_test_func)
|
* TEST_SINGLE_BOARD(TIMING, timing_pgroup, "[spi][timeout=120]", &local_test_func)
|
||||||
*
|
*
|
||||||
* NOTE: suggest to define your own macro to wrap 4 and 5 if your tag and test functions are the same. E.g.:
|
* NOTE: suggest to define your own macro to wrap 4 and 5 if your tag and test functions are the same. E.g.:
|
||||||
* #define TEST_SPI_MASTER_SLAVE(name, pgroup) (backslash)
|
* #define TEST_SPI_MASTER_SLAVE(name, pgroup) (backslash)
|
||||||
|
@ -146,8 +146,8 @@ void test_serializer(const param_group_t *param_group, const ptest_func_t* test_
|
||||||
* @param tag Tag for environment, etc. e.g. [spi][timeout=120]
|
* @param tag Tag for environment, etc. e.g. [spi][timeout=120]
|
||||||
* @param test_func ``ptest_func_t`` to be executed.
|
* @param test_func ``ptest_func_t`` to be executed.
|
||||||
*/
|
*/
|
||||||
#define TEST_LOCAL(name, param_group, tag, test_func) \
|
#define TEST_SINGLE_BOARD(name, param_group, tag, test_func) \
|
||||||
TEST_CASE("local test: "#name, tag) { test_serializer(&PGROUP_NAME(param_group), test_func); }
|
TEST_CASE("single board test: "#name, tag) { test_serializer(&PGROUP_NAME(param_group), test_func); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test parameter group for master-slave framework
|
* Test parameter group for master-slave framework
|
||||||
|
|
Loading…
Reference in a new issue