Преглед изворни кода

driver: Rename "local" tests to "single board" tests, add some description to the names

Angus Gratton пре 6 година
родитељ
комит
50aad77f3a

+ 2 - 2
components/driver/test/esp32/test_sdio.c

@@ -752,7 +752,7 @@ ptest_func_t frhost_slave = {
 
 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 = {
     .pre_test = null_pre,
@@ -766,4 +766,4 @@ ptest_func_t tohost_slave = {
     .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);

+ 1 - 1
components/driver/test/esp32/test_spi_param.c

@@ -21,7 +21,7 @@ static const ptest_func_t local_test_func = {
 
 #define TEST_SPI_LOCAL(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)
 {

+ 4 - 4
components/driver/test/param_test/include/param_test.h

@@ -75,11 +75,11 @@
  * 4. Declare the group by PARAM_GROUP_DECLARE right after the param group:
  *      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)
  *
  *      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.:
  *      #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 test_func ``ptest_func_t`` to be executed.
  */
-#define TEST_LOCAL(name, param_group, tag, test_func) \
-    TEST_CASE("local test: "#name, tag) { test_serializer(&PGROUP_NAME(param_group), test_func); }
+#define TEST_SINGLE_BOARD(name, param_group, tag, test_func) \
+    TEST_CASE("single board test: "#name, tag) { test_serializer(&PGROUP_NAME(param_group), test_func); }
 
 /**
  * Test parameter group for master-slave framework