ci/lava: Distinguish test suites in DUT vs Docker
Test suite in the dut is just running SSH server and waiting for the docker container to start the SSH session. So it can take all the test cases accumulated duration, not just the init-stage1.sh part anymore. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22870>
This commit is contained in:
committed by
Marge Bot
parent
8626a52637
commit
2cee21ffa5
@@ -62,6 +62,11 @@ def test_gitlab_section(method, collapsed, expectation):
|
||||
|
||||
def test_gl_sections():
|
||||
lines = [
|
||||
{
|
||||
"dt": datetime.now(),
|
||||
"lvl": "debug",
|
||||
"msg": "Received signal: <STARTRUN> 0_setup-ssh-server 10145749_1.3.2.3.1",
|
||||
},
|
||||
{
|
||||
"dt": datetime.now(),
|
||||
"lvl": "debug",
|
||||
@@ -92,10 +97,13 @@ def test_gl_sections():
|
||||
},
|
||||
]
|
||||
lf = LogFollower()
|
||||
for line in lines:
|
||||
lf.manage_gl_sections(line)
|
||||
with lf:
|
||||
for line in lines:
|
||||
lf.manage_gl_sections(line)
|
||||
parsed_lines = lf.flush()
|
||||
|
||||
section_types = [s.type for s in lf.section_history]
|
||||
|
||||
parsed_lines = lf.flush()
|
||||
assert "section_start" in parsed_lines[0]
|
||||
assert "collapsed=true" not in parsed_lines[0]
|
||||
assert "section_end" in parsed_lines[1]
|
||||
@@ -103,7 +111,17 @@ def test_gl_sections():
|
||||
assert "collapsed=true" not in parsed_lines[2]
|
||||
assert "section_end" in parsed_lines[3]
|
||||
assert "section_start" in parsed_lines[4]
|
||||
assert "collapsed=true" in parsed_lines[4]
|
||||
assert "collapsed=true" not in parsed_lines[4]
|
||||
assert "section_end" in parsed_lines[5]
|
||||
assert "section_start" in parsed_lines[6]
|
||||
assert "collapsed=true" in parsed_lines[6]
|
||||
assert section_types == [
|
||||
# LogSectionType.LAVA_BOOT, True, if LogFollower started with Boot section
|
||||
LogSectionType.TEST_DUT_SUITE,
|
||||
LogSectionType.TEST_SUITE,
|
||||
LogSectionType.TEST_CASE,
|
||||
LogSectionType.LAVA_POST_PROCESSING,
|
||||
]
|
||||
|
||||
|
||||
def test_log_follower_flush():
|
||||
|
||||
Reference in New Issue
Block a user