mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-03 16:41:44 +01:00
test: Refactor TFW load_source() method to only take the file path
Fixes issues where example tests for persistent_sockets and advanced_tests both loaded a module named "client", causing a race condition.
This commit is contained in:
committed by
He Yin Ling
parent
c8f483034d
commit
da4cb76f5a
@@ -40,8 +40,9 @@ import Utility
|
||||
# > export TEST_FW_PATH=~/esp/esp-idf/tools/tiny-test-fw
|
||||
|
||||
# Import client module
|
||||
# TODO: replace with import
|
||||
expath = os.path.dirname(os.path.realpath(__file__))
|
||||
client = Utility.load_source("client", expath + "/scripts/test.py")
|
||||
client = Utility.load_source(expath + "/scripts/test.py")
|
||||
|
||||
|
||||
# Due to connectivity issues (between runner host and DUT) in the runner environment,
|
||||
|
||||
@@ -42,8 +42,9 @@ import Utility
|
||||
# > export TEST_FW_PATH=~/esp/esp-idf/tools/tiny-test-fw
|
||||
|
||||
# Import client module
|
||||
# TODO: replace with import
|
||||
expath = os.path.dirname(os.path.realpath(__file__))
|
||||
client = Utility.load_source("client", expath + "/scripts/adder.py")
|
||||
client = Utility.load_source(expath + "/scripts/adder.py")
|
||||
|
||||
|
||||
@IDF.idf_example_test(env_tag="Example_WIFI")
|
||||
|
||||
@@ -44,7 +44,7 @@ import Utility
|
||||
|
||||
# Import client module
|
||||
expath = os.path.dirname(os.path.realpath(__file__))
|
||||
client = Utility.load_source("client", expath + "/scripts/client.py")
|
||||
client = Utility.load_source(expath + "/scripts/client.py")
|
||||
|
||||
|
||||
@IDF.idf_example_test(env_tag="Example_WIFI")
|
||||
|
||||
Reference in New Issue
Block a user