test: py: Add an option to skip sleep test
PATCH 1/1 test: py: Add an option to skip sleep test
Some QEMUs have a problem with time setup that's why sleep test is failing. Introduce env__sleep_accurate boardenv variable to have an option to skip sleep test.
---
Changes in v1:
- Change subject line and patch description
- Move from RFC to regular patch
- Remove boardidentity marker and use variable instead
configs/zynq_zc706_defconfig | 1 + test/py/tests/test_sleep.py | 13 +++++++++++++ 2 files changed, 14 insertions(+)
configs/zynq_zc706_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_OF_EMBED=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM_SEQ_ALIAS=y
test/py/tests/test_sleep.py +13 -0
@@ -5,10 +5,23 @@ import pytest import time +""" +Note: This test doesn't rely on boardenv_* configuration values but they can +change test behavior. + +# Setup env__sleep_accurate to False if time is not accurate on your platform +env__sleep_accurate = False + +""" + def test_sleep(u_boot_console): """Test the sleep command, and validate that it sleeps for approximately the correct amount of time.""" + sleep_skip = u_boot_console.config.env.get('env__sleep_accurate', True) + if not sleep_skip: + pytest.skip('sleep is not accurate') + if u_boot_console.config.buildconfig.get('config_cmd_misc', 'n') != 'y': pytest.skip('sleep command not supported') # 3s isn't too long, but is enough to cross a few second boundaries.
Signature · 1 line
1.9.1
PATCH 1/1 test: py: Add an option to skip sleep test
Quoted 5 lines · Michal Simek
Some QEMUs have a problem with time setup that's why sleep test is failing. Introduce
env__sleep_accurateboardenv variable to have an option to skip sleep test.Signed-off-by Michal Simek <[email protected]>
Quoted 8 lines
---
Changes in v1:
- Change subject line and patch description
- Move from RFC to regular patch
- Remove boardidentity marker and use variable insteadconfigs/zynq_zc706_defconfig | 1 +
This looks unrelated.
Quoted 20 lines
test/py/tests/test_sleep.py | 13 +++++++++++++ 2 files changed, 14 insertions(+)configs/zynq_zc706_defconfig +1
-0@@ -37,6 +37,7 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_OF_EMBED=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM_SEQ_ALIAS=ytest/py/tests/test_sleep.py +0
-0
test/py/tests/test_sleep.py line 13
Quoted 9 lines
test/py/tests/test_sleep.py +6
-0@@ -5,10 +5,23 @@ import pytest import time +""" +Note: This test doesn't rely on boardenv_* configuration values but they can +change test behavior. + +# Setup env__sleep_accurate to False if time is not accurate on your platform +env__sleep_accurate = False
This should default to true. Then a PR to uboot-test-hooks where you say the file for zynq_zc702 has this false, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171208/46663813/attachment.sig>
PATCH 1/1 test: py: Add an option to skip sleep test
Quoted 8 lines · Tom Rini
Quoted 7 lines · Michal Simek
Some QEMUs have a problem with time setup that's why sleep test is failing. Introduce
env__sleep_accurateboardenv variable to have an option to skip sleep test.Signed-off-by Michal Simek <[email protected]>---
Quoted 8 lines
Quoted 6 lines
Changes in v1:
- Change subject line and patch description
- Move from RFC to regular patch
- Remove boardidentity marker and use variable insteadconfigs/zynq_zc706_defconfig | 1 +This looks unrelated.
yes it is sorry - I have tested it on local zc706
Will fix in v2.
Quoted 24 lines
Quoted 24 lines
test/py/tests/test_sleep.py | 13 +++++++++++++ 2 files changed, 14 insertions(+)configs/zynq_zc706_defconfig +1
-0@@ -37,6 +37,7 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_OF_EMBED=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM_SEQ_ALIAS=ytest/py/tests/test_sleep.py +0
-0@@ -5,10 +5,23 @@ import pytest import time
Quoted 9 lines
test/py/tests/test_sleep.py line 13
Quoted 6 lines
test/py/tests/test_sleep.py +6
-0+""" +Note: This test doesn't rely on boardenv_* configuration values but they can +change test behavior. + +# Setup env__sleep_accurate to False if time is not accurate on your platform +env__sleep_accurate = FalseThis should default to true. Then a PR to uboot-test-hooks where you say the file for
zynq_zc702has this false, thanks!
This is just comment in that file. By default you can set it up to True or just not setup at all.
Thanks,
Michal
PATCH 1/1 test: py: Add an option to skip sleep test
Quoted 55 lines · Michal Simek
Quoted 8 lines · Tom Rini
Quoted 7 lines · Michal Simek
Some QEMUs have a problem with time setup that's why sleep test is failing. Introduce
env__sleep_accurateboardenv variable to have an option to skip sleep test.Signed-off-by Michal Simek <[email protected]>---
Quoted 8 lines
Quoted 6 lines
Changes in v1:
- Change subject line and patch description
- Move from RFC to regular patch
- Remove boardidentity marker and use variable insteadconfigs/zynq_zc706_defconfig | 1 +This looks unrelated.
yes it is sorry - I have tested it on local zc706
Will fix in v2.Quoted 24 lines
Quoted 24 lines
test/py/tests/test_sleep.py | 13 +++++++++++++ 2 files changed, 14 insertions(+)configs/zynq_zc706_defconfig +1
-0@@ -37,6 +37,7 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_OF_EMBED=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM_SEQ_ALIAS=ytest/py/tests/test_sleep.py +0
-0@@ -5,10 +5,23 @@ import pytest import timeQuoted 9 lines
test/py/tests/test_sleep.py line 13
Quoted 6 lines
test/py/tests/test_sleep.py +6
-0+""" +Note: This test doesn't rely on boardenv_* configuration values but they can +change test behavior. + +# Setup env__sleep_accurate to False if time is not accurate on your platform +env__sleep_accurate = FalseThis should default to true. Then a PR to uboot-test-hooks where you say the file for
zynq_zc702has this false, thanks!
Quoted 2 lines
This is just comment in that file. By default you can set it up to True or just not setup at all.
Ah, OK, I was reading too quickly. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171208/0277dbe9/attachment.sig>
PATCH 1/1 test: py: Add an option to skip sleep test
Quoted 56 lines · Tom Rini
Quoted 55 lines · Michal Simek
Quoted 8 lines · Tom Rini
Quoted 7 lines · Michal Simek
Some QEMUs have a problem with time setup that's why sleep test is failing. Introduce
env__sleep_accurateboardenv variable to have an option to skip sleep test.Signed-off-by Michal Simek <[email protected]>---
Quoted 8 lines
Quoted 6 lines
Changes in v1:
- Change subject line and patch description
- Move from RFC to regular patch
- Remove boardidentity marker and use variable insteadconfigs/zynq_zc706_defconfig | 1 +This looks unrelated.
yes it is sorry - I have tested it on local zc706
Will fix in v2.Quoted 33 lines
Quoted 21 lines
test/py/tests/test_sleep.py | 13 +++++++++++++ 2 files changed, 14 insertions(+)configs/zynq_zc706_defconfig +1
-0@@ -37,6 +37,7 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_OF_EMBED=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM_SEQ_ALIAS=ytest/py/tests/test_sleep.py +0
-0test/py/tests/test_sleep.py line 13
Quoted 9 lines
test/py/tests/test_sleep.py +6
-0@@ -5,10 +5,23 @@ import pytest import time +""" +Note: This test doesn't rely on boardenv_* configuration values but they can +change test behavior. + +# Setup env__sleep_accurate to False if time is not accurate on your platform +env__sleep_accurate = FalseThis should default to true. Then a PR to uboot-test-hooks where you say the file for
zynq_zc702has this false, thanks!
Quoted 4 lines
Quoted 2 lines
This is just comment in that file. By default you can set it up to True or just not setup at all.
Ah, OK, I was reading too quickly. Thanks!
No worries. Will wait for Stephen and then will send PR to uboot-test-hooks and also I can remove sleep from .travis.yml.
Thanks,
Michal