[yocto-autobuilder-helper][dunfell 03/23] scripts/generate-testresult-index: Ensure backwards compatibility with older layout


Steve Sakoman
 

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 83c2052781a9fd587fbab06702eae31951d08dec)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
scripts/generate-testresult-index.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/generate-testresult-index.py b/scripts/generate-testresult-index.py
index d372f30..7839cc0 100755
--- a/scripts/generate-testresult-index.py
+++ b/scripts/generate-testresult-index.py
@@ -83,9 +83,11 @@ for build in sorted(os.listdir(path), key=keygen, reverse=True):
reldir = "./" + build + "/testresults/"
btype = "other"
files = os.listdir(buildpath)
- if os.path.exists(buildpath + "/a-full-posttrigger"):
+ if os.path.exists(buildpath + "/a-full-posttrigger") or \
+ os.path.exists(buildpath + "/a-full"):
btype = "full"
- elif os.path.exists(buildpath + "/a-quick-posttrigger"):
+ elif os.path.exists(buildpath + "/a-quick-posttrigger") or \
+ os.path.exists(buildpath + "/a-quick"):
btype = "quick"
elif len(files) == 1:
btype = files[0]
--
2.25.1