mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-11 21:10:20 +00:00
test: update example and unit tests with new import roles:
tiny_test_fw is a python package now. import it using normal way.
This commit is contained in:

committed by
Angus Gratton

parent
978bf09f83
commit
6e05a79536
@@ -1,18 +1,9 @@
|
||||
# Need Python 3 string formatting functions
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
from threading import Thread
|
||||
try:
|
||||
import IDF
|
||||
except ImportError:
|
||||
# The test cause is dependent on the Tiny Test Framework. Ensure the
|
||||
# `TEST_FW_PATH` environment variable is set to `$IDF_PATH/tools/tiny-test-fw`
|
||||
test_fw_path = os.getenv("TEST_FW_PATH")
|
||||
if test_fw_path and test_fw_path not in sys.path:
|
||||
sys.path.insert(0, test_fw_path)
|
||||
import IDF
|
||||
|
||||
import ttfw_idf
|
||||
|
||||
# Define tuple of strings to expect for each DUT.
|
||||
master_expect = ("CAN Master: Driver installed", "CAN Master: Driver uninstalled")
|
||||
@@ -36,7 +27,7 @@ def dut_thread_callback(**kwargs):
|
||||
result[0] = True
|
||||
|
||||
|
||||
@IDF.idf_example_test(env_tag='Example_CAN2', ignore=True)
|
||||
@ttfw_idf.idf_example_test(env_tag='Example_CAN2')
|
||||
def test_can_network_example(env, extra_data):
|
||||
|
||||
# Get device under test. "dut1", "dut2", and "dut3" must be properly defined in EnvConfig
|
||||
|
Reference in New Issue
Block a user