diff options
| author | Heinrich Schuchardt <[email protected]> | 2017-10-13 22:28:31 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2017-10-16 13:45:37 -0400 |
| commit | 6c7c3dcc59d4ad49e4b1e773b98f9c110a13f306 (patch) | |
| tree | 41dd5a322c09f90869af84ec17743f15d47854f9 | |
| parent | 59ab72d7bc5672eaf74820cde156be313217c087 (diff) | |
test/py/tests/test_sleep.py: test time approximately
On qemu errors like
assert 2.999650001525879 >= 3
occur.
According to the comment in the code the test is meant to be
approximate. So we should accept some milliseconds less.
Cc: Stephen Warren <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Stephen Warren <[email protected]>
| -rw-r--r-- | test/py/tests/test_sleep.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/tests/test_sleep.py b/test/py/tests/test_sleep.py index b59a4cfc0fc..64e05713262 100644 --- a/test/py/tests/test_sleep.py +++ b/test/py/tests/test_sleep.py @@ -17,7 +17,7 @@ def test_sleep(u_boot_console): u_boot_console.run_command('sleep %d' % sleep_time) tend = time.time() elapsed = tend - tstart - assert elapsed >= sleep_time + assert elapsed >= (sleep_time - 0.01) if not u_boot_console.config.gdbserver: # 0.25s margin is hopefully enough to account for any system overhead. assert elapsed < (sleep_time + 0.25) |
