summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Michalec <tm@semihalf.com>2022-08-02 09:56:35 +0200
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-03 09:09:08 +0000
commit362843923e3f244d6397a4c7f2134bbad3b725a6 (patch)
treeb16c7a54e765256d4c704204dca9f45806c353c9
parent740c71abbdfb89b23ba04bb8561102b07ebb35a6 (diff)
downloadchrome-ec-362843923e3f244d6397a4c7f2134bbad3b725a6.tar.gz
zephyr: test: ps8xxx: tcpci: Run TCPC test before tasks
Move whole tcpci and ps8xxx testsuites to run before tasks. These testsuites are using drivers directly and can mess up USBC PD SM state. BUG=None TEST=zmake -D test test-drivers BRANCH=None Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I25de8d58576d766e3287286f9e154afe19af3758 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3805200 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
-rw-r--r--zephyr/test/drivers/default/src/ps8xxx.c9
-rw-r--r--zephyr/test/drivers/default/src/tcpci.c2
2 files changed, 4 insertions, 7 deletions
diff --git a/zephyr/test/drivers/default/src/ps8xxx.c b/zephyr/test/drivers/default/src/ps8xxx.c
index 5e15ed728d..273d81727d 100644
--- a/zephyr/test/drivers/default/src/ps8xxx.c
+++ b/zephyr/test/drivers/default/src/ps8xxx.c
@@ -196,7 +196,7 @@ static void check_ps8815_set_cc(enum tcpc_rp_value rp, enum tcpc_cc_pull cc,
}
/** Test PS8815 set cc and device specific workarounds */
-ZTEST(ps8815_no_tasks, test_ps8815_set_cc)
+ZTEST(ps8815, test_ps8815_set_cc)
{
const struct emul *ps8xxx_emul = emul_get_binding(PS8XXX_EMUL_LABEL);
int64_t start_time;
@@ -1304,11 +1304,8 @@ static void ps8815_after(void *state)
tcpci_emul_set_reg(ps8xxx_emul, PS8XXX_REG_FW_REV, 0x31);
}
-ZTEST_SUITE(ps8805, drivers_predicate_post_main, NULL, ps8805_before,
+ZTEST_SUITE(ps8805, drivers_predicate_pre_main, NULL, ps8805_before,
ps8805_after, NULL);
-ZTEST_SUITE(ps8815, drivers_predicate_post_main, NULL, ps8815_before,
- ps8815_after, NULL);
-
-ZTEST_SUITE(ps8815_no_tasks, drivers_predicate_pre_main, NULL, ps8815_before,
+ZTEST_SUITE(ps8815, drivers_predicate_pre_main, NULL, ps8815_before,
ps8815_after, NULL);
diff --git a/zephyr/test/drivers/default/src/tcpci.c b/zephyr/test/drivers/default/src/tcpci.c
index cdaac61039..010ad44e76 100644
--- a/zephyr/test/drivers/default/src/tcpci.c
+++ b/zephyr/test/drivers/default/src/tcpci.c
@@ -505,4 +505,4 @@ static void *tcpci_setup(void)
return NULL;
}
-ZTEST_SUITE(tcpci, drivers_predicate_post_main, tcpci_setup, NULL, NULL, NULL);
+ZTEST_SUITE(tcpci, drivers_predicate_pre_main, tcpci_setup, NULL, NULL, NULL);