Merge ~kevinbecker/+git/autotest-client-tests:kevinbecker/rtevalfix into ~canonical-kernel-team/+git/autotest-client-tests:master

Proposed by Kevin Becker
Status: Merged
Merged at revision: fd8c3c1f417399a221d17d7ef8688445cf66fd3e
Proposed branch: ~kevinbecker/+git/autotest-client-tests:kevinbecker/rtevalfix
Merge into: ~canonical-kernel-team/+git/autotest-client-tests:master
Diff against target: 22 lines (+2/-2)
1 file modified
rteval/rteval.py (+2/-2)
Reviewer Review Type Date Requested Status
Sean Feole Approve
Po-Hsu Lin Pending
Joseph Salisbury Pending
Francis Ginther Pending
Canonical Kernel Team Pending
Review via email: mp+461393@code.launchpad.net

Commit message

UBUNTU: SAUCE: Fix rteval test to support both Python 2 and 3

Signed-off-by: Kevin Becker <email address hidden>

To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote :

+1

Revision history for this message
Sean Feole (sfeole) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/rteval/rteval.py b/rteval/rteval.py
2index 0508567..de0b277 100644
3--- a/rteval/rteval.py
4+++ b/rteval/rteval.py
5@@ -75,7 +75,7 @@ class rteval(test.test):
6 os.mkdir("install")
7
8 # Download Linux tarball referenced in the Makefile
9- with open("Makefile", mode="rt", encoding="utf-8") as makefile:
10+ with open("Makefile", mode="rt") as makefile:
11 makefile_content = makefile.read()
12 linux_version_match = re.search(r'KLOAD\s*:=\s*\$\(LOADDIR\)\/linux-(\d+\.\d+(\.\d+)?)\.tar\.xz', makefile_content)
13 if linux_version_match:
14@@ -113,7 +113,7 @@ class rteval(test.test):
15
16 # Find the summary XML results
17 results_count = 0
18- subfolders = [ f.name for f in os.scandir(self.srcdir+"/rteval/run/") if f.is_dir() ]
19+ subfolders = [f for f in os.listdir(self.srcdir+"/rteval/run/") if os.path.isdir(os.path.join(self.srcdir+"/rteval/run/", f))]
20 for folder in subfolders:
21 folder_match = re.search(r"rteval-"+datetime.now().strftime('%Y%m%d')+"-(\d)+[^(.tar.bz2)]?", folder)
22 if folder_match:

Subscribers

People subscribed via source and target branches