Skip to contentSkip to conversation

21/28: rt-tests: move ptest to python3

oe-commits Martin Jansa 3 participants 6 messages Jul 24, 2016 – Jul 29, 2016 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Any idea why it fails now like this:

http://errors.yoctoproject.org/Errors/Details/73086/

?

Quoted 118 lines · On Fri, Jul 08, 2016 at 08:59:33AM +0000, [email protected] wrote:

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 2767cbe014f84c9ad42ed8ef1eca7caa862e5196
Author: Maxin B. John <[email protected]>
AuthorDate: Fri Jul 1 11:39:02 2016 +0300

rt-tests: move ptest to python3

convert python2 based ptest of rt-tests package to python3

---
 meta/recipes-rt/rt-tests/files/rt_bmark.py | 26 +++++++++++++-------------
 meta/recipes-rt/rt-tests/files/run-ptest   |  2 +-
 meta/recipes-rt/rt-tests/rt-tests_2.0.bb   |  2 +-
 3 files changed, 15 insertions(+), 15 deletions(-)
meta/recipes-rt/rt-tests/files/rt_bmark.py +13 -13
index 0e2b105..080a655 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 # SPDX-License-Identifier:     BSD-3-Clause
@@ -106,8 +106,8 @@ def tc_name(sub_name):
 
 def log(*msg):
         tmp = "".join(map(str, msg)) # 'map(str, ...' allows numbers
-        for line in tmp.split("\n"):
-                print "#", line
+        for line in tmp.splitlines():
+                print("#", line)
 
 #-------------------------------------------------------------------------------
 # Like log(), but with a timestamp added
@@ -265,7 +265,7 @@ cmd = ("cyclictest",
        "-d", str(interval_delta),
        "-l", str(loop_count)
        )
-rex = re.compile("C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")
+rex = re.compile(b"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")
 
 def run_cyclictest_once():
         res = subprocess.check_output(cmd)
@@ -283,7 +283,7 @@ def run_cyclictest_once():
         avg_sum = 0
         avg_cnt = 0
 
-        for line in res.split("\n"):
+        for line in res.splitlines():
                 m = rex.search(line)
                 if m is not None:
                         minlist.append(int(m.group(2)))
@@ -376,11 +376,11 @@ class cyclictest_runner:
                         log()
                         log("PASS")
 
-                        print
-                        print tc_name(name), "[Min/us,Avg/us,Max/us]:",
-                        print "%d,%.1f,%d" % (bm_min,bm_avg, bm_max)
-                        print "PASS:", tc_name(name)
-                        print
+                        print()
+                        print(tc_name(name), "[Min/us,Avg/us,Max/us]:",)
+                        print("%d,%.1f,%d" % (bm_min,bm_avg, bm_max))
+                        print("PASS:", tc_name(name))
+                        print()
 
                 except Exception:
                         log()
@@ -391,9 +391,9 @@ class cyclictest_runner:
                         log("WD: ", os.getcwd())
                         log()
                         log("FAIL")
-                        print
-                        print "FAIL:", tc_name(name)
-                        print
+                        print()
+                        print("FAIL:", tc_name(name))
+                        print()
 
 #-------------------------------------------------------------------------------
 
meta/recipes-rt/rt-tests/files/run-ptest +1 -1
index 8e6d3e3..b7c5e29 100644
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python ./rt_bmark.py
+python3 ./rt_bmark.py
meta/recipes-rt/rt-tests/rt-tests_2.0.bb +1 -1
index 21780d1..83869b8 100644
@@ -28,6 +28,6 @@ do_install_ptest() {
         cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
 }
 
-RDEPENDS_${PN}-ptest += " stress python python-subprocess python-multiprocessing python-datetime python-re python-lang"
+RDEPENDS_${PN}-ptest += " stress python3 python3-subprocess python3-multiprocessing python3-datetime python3-re python3-lang python3-misc"
 
 FILES_${PN} += "${prefix}/src/backfire"
Signature · 8 lines
-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
-- 
_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw
Quoted 4 lines · Martin Jansa

Any idea why it fails now like this:

http://errors.yoctoproject.org/Errors/Details/73086/

it shows --sysroot=TOPDIR/tmp-glibc/sysroots/qemuarm-O2

is that what you see in your logs too. I know they get edited before uploading so may be its just the log munging issue.
but this could be problem.

Quoted 131 lines

?

Quoted 111 lines · On Fri, Jul 08, 2016 at 08:59:33AM +0000, [email protected] wrote:

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 2767cbe014f84c9ad42ed8ef1eca7caa862e5196
Author: Maxin B. John <[email protected]>
AuthorDate: Fri Jul 1 11:39:02 2016 +0300

rt-tests: move ptest to python3

convert python2 based ptest of rt-tests package to python3

---
 meta/recipes-rt/rt-tests/files/rt_bmark.py | 26 +++++++++++++-------------
 meta/recipes-rt/rt-tests/files/run-ptest   |  2 +-
 meta/recipes-rt/rt-tests/rt-tests_2.0.bb   |  2 +-
 3 files changed, 15 insertions(+), 15 deletions(-)
meta/recipes-rt/rt-tests/files/rt_bmark.py +13 -13
index 0e2b105..080a655 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 # SPDX-License-Identifier:     BSD-3-Clause
@@ -106,8 +106,8 @@ def tc_name(sub_name):
 
 def log(*msg):
         tmp = "".join(map(str, msg)) # 'map(str, ...' allows numbers
-        for line in tmp.split("\n"):
-                print "#", line
+        for line in tmp.splitlines():
+                print("#", line)
 
 #-------------------------------------------------------------------------------
 # Like log(), but with a timestamp added
@@ -265,7 +265,7 @@ cmd = ("cyclictest",
        "-d", str(interval_delta),
        "-l", str(loop_count)
        )
-rex = re.compile("C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")
+rex = re.compile(b"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")
 
 def run_cyclictest_once():
         res = subprocess.check_output(cmd)
@@ -283,7 +283,7 @@ def run_cyclictest_once():
         avg_sum = 0
         avg_cnt = 0
 
-        for line in res.split("\n"):
+        for line in res.splitlines():
                 m = rex.search(line)
                 if m is not None:
                         minlist.append(int(m.group(2)))
@@ -376,11 +376,11 @@ class cyclictest_runner:
                         log()
                         log("PASS")
 
-                        print
-                        print tc_name(name), "[Min/us,Avg/us,Max/us]:",
-                        print "%d,%.1f,%d" % (bm_min,bm_avg, bm_max)
-                        print "PASS:", tc_name(name)
-                        print
+                        print()
+                        print(tc_name(name), "[Min/us,Avg/us,Max/us]:",)
+                        print("%d,%.1f,%d" % (bm_min,bm_avg, bm_max))
+                        print("PASS:", tc_name(name))
+                        print()
 
                 except Exception:
                         log()
@@ -391,9 +391,9 @@ class cyclictest_runner:
                         log("WD: ", os.getcwd())
                         log()
                         log("FAIL")
-                        print
-                        print "FAIL:", tc_name(name)
-                        print
+                        print()
+                        print("FAIL:", tc_name(name))
+                        print()
 
 #-------------------------------------------------------------------------------
 
meta/recipes-rt/rt-tests/files/run-ptest +1 -1
index 8e6d3e3..b7c5e29 100644
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python ./rt_bmark.py
+python3 ./rt_bmark.py
meta/recipes-rt/rt-tests/rt-tests_2.0.bb +1 -2
index 21780d1..83869b8 100644
@@ -28,6 +28,6 @@ do_install_ptest() {
         cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
 }
 
-RDEPENDS_${PN}-ptest += " stress python python-subprocess python-multiprocessing python-datetime python-re python-lang"
+RDEPENDS_${PN}-ptest += " stress python3 python3-subprocess python3-multiprocessing python3-datetime python3-re python3-lang python3-misc"
 
 FILES_${PN} += "${prefix}/src/backfire"
 
--
Quoted 7 lines

To stop receiving notification emails like this one, please contact the administrator of this repository.
--
_______________________________________________
Openembedded-commits mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits

--
Martin 'JaMa' Jansa jabber: [email protected]

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw

Good catch,

it's also in not mangled logs:
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160724_010417.log/2_max/failed/rt-tests.log

so it' probably some missing space in append or some wrong sed call in some Makefile or something like that.

Quoted 158 lines · Khem Raj
Quoted 4 lines · Martin Jansa

Any idea why it fails now like this:

http://errors.yoctoproject.org/Errors/Details/73086/

it shows --sysroot=TOPDIR/tmp-glibc/sysroots/qemuarm-O2

is that what you see in your logs too. I know they get edited before uploading so may be its just the log munging issue.
but this could be problem.

Quoted 3 lines

?

On Fri, Jul 08, 2016 at 08:59:33AM +0000, [email protected]

Quoted 7 lines · wrote:
Quoted 7 lines

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 2767cbe014f84c9ad42ed8ef1eca7caa862e5196
Author: Maxin B. John <[email protected]>
AuthorDate: Fri Jul 1 11:39:02 2016 +0300

Quoted 8 lines
Quoted 8 lines

rt-tests: move ptest to python3

convert python2 based ptest of rt-tests package to python3

---
 meta/recipes-rt/rt-tests/files/rt_bmark.py | 26

+++++++++++++-------------

Quoted 5 lines

Review

Quoted 5 lines
 meta/recipes-rt/rt-tests/files/run-ptest   |  2 +-
 meta/recipes-rt/rt-tests/rt-tests_2.0.bb   |  2 +-
 3 files changed, 15 insertions(+), 15 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-rt/rt-tests/files/rt_bmark.py

Quoted 11 lines
Quoted 11 lines

index 0e2b105..080a655 100755

meta/recipes-rt/rt-tests/files/rt_bmark.py +1 -1
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 # SPDX-License-Identifier:     BSD-3-Clause
@@ -106,8 +106,8 @@ def tc_name(sub_name):
 
Quoted 8 lines

meta/recipes-rt/rt-tests/files/rt_bmark.py def tc_name(sub_name): · line 112

Quoted 8 lines
meta/recipes-rt/rt-tests/files/rt_bmark.py +2 -2
 def log(*msg):
         tmp = "".join(map(str, msg)) # 'map(str, ...' allows numbers
-        for line in tmp.split("\n"):
-                print "#", line
+        for line in tmp.splitlines():
+                print("#", line)
 
 

#-------------------------------------------------------------------------------

Quoted 6 lines

meta/recipes-rt/rt-tests/files/rt_bmark.py cmd = ("cyclictest", · line 268

Quoted 6 lines
meta/recipes-rt/rt-tests/files/rt_bmark.py +0 -1
 # Like log(), but with a timestamp added
@@ -265,7 +265,7 @@ cmd = ("cyclictest",
        "-d", str(interval_delta),
        "-l", str(loop_count)
        )
-rex =

re.compile("C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")

Quoted 1 line

meta/recipes-rt/rt-tests/files/rt_bmark.py cmd = ("cyclictest", · line 268

Quoted 1 line
meta/recipes-rt/rt-tests/files/rt_bmark.py +1 -0
+rex =

re.compile(b"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")

Quoted 16 lines
Quoted 16 lines
meta/recipes-rt/rt-tests/files/rt_bmark.py +1 -1
 def run_cyclictest_once():
         res = subprocess.check_output(cmd)
@@ -283,7 +283,7 @@ def run_cyclictest_once():
         avg_sum = 0
         avg_cnt = 0
 
-        for line in res.split("\n"):
+        for line in res.splitlines():
                 m = rex.search(line)
                 if m is not None:
                         minlist.append(int(m.group(2)))
@@ -376,11 +376,11 @@ class cyclictest_runner:
                         log()
                         log("PASS")
 
Quoted 7 lines

meta/recipes-rt/rt-tests/files/rt_bmark.py class cyclictest_runner: · line 380

Quoted 7 lines
meta/recipes-rt/rt-tests/files/rt_bmark.py +2 -5
-                        print
-                        print tc_name(name), "[Min/us,Avg/us,Max/us]:",
-                        print "%d,%.1f,%d" % (bm_min,bm_avg, bm_max)
-                        print "PASS:", tc_name(name)
-                        print
+                        print()
+                        print(tc_name(name),

"[Min/us,Avg/us,Max/us]:",)

Quoted 4 lines
Quoted 4 lines
meta/recipes-rt/rt-tests/files/rt_bmark.py +3 -0
+                        print("%d,%.1f,%d" % (bm_min,bm_avg, bm_max))
+                        print("PASS:", tc_name(name))
+                        print()
 
Quoted 14 lines
Quoted 4 lines
meta/recipes-rt/rt-tests/files/rt_bmark.py +0 -0
                 except Exception:
                         log()
@@ -391,9 +391,9 @@ class cyclictest_runner:
                         log("WD: ", os.getcwd())

meta/recipes-rt/rt-tests/files/rt_bmark.py class cyclictest_runner: · line 398

Quoted 10 lines
meta/recipes-rt/rt-tests/files/rt_bmark.py +3 -3
                         log()
                         log("FAIL")
-                        print
-                        print "FAIL:", tc_name(name)
-                        print
+                        print()
+                        print("FAIL:", tc_name(name))
+                        print()
 
 

#-------------------------------------------------------------------------------

Quoted 2 lines

Review

Quoted 2 lines
(quoted diff) +0 -0

b/meta/recipes-rt/rt-tests/files/run-ptest

Quoted 9 lines

Review

Quoted 9 lines

index 8e6d3e3..b7c5e29 100644

meta/recipes-rt/rt-tests/files/run-ptest +1 -1
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python ./rt_bmark.py
+python3 ./rt_bmark.py
(quoted diff) +0 -0

b/meta/recipes-rt/rt-tests/rt-tests_2.0.bb

Quoted 8 lines

meta/recipes-rt/rt-tests/rt-tests_2.0.bb do_install_ptest() { · line 31

Quoted 8 lines

index 21780d1..83869b8 100644

meta/recipes-rt/rt-tests/rt-tests_2.0.bb +0 -1
@@ -28,6 +28,6 @@ do_install_ptest() {
         cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
 }
 
-RDEPENDS_${PN}-ptest += " stress python python-subprocess

python-multiprocessing python-datetime python-re python-lang"

Quoted 1 line

meta/recipes-rt/rt-tests/rt-tests_2.0.bb do_install_ptest() { · line 31

Quoted 1 line
meta/recipes-rt/rt-tests/rt-tests_2.0.bb +1 -0
+RDEPENDS_${PN}-ptest += " stress python3 python3-subprocess

python3-multiprocessing python3-datetime python3-re python3-lang python3-misc"

Quoted 21 lines
Quoted 11 lines
meta/recipes-rt/rt-tests/rt-tests_2.0.bb +0 -1
 FILES_${PN} += "${prefix}/src/backfire"
 
--

To stop receiving notification emails like this one, please contact the administrator of this repository.
--
_______________________________________________
Openembedded-commits mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits

--
Martin 'JaMa' Jansa jabber: [email protected]

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw
Quoted 3 lines · Martin Jansa

so it' probably some missing space in append or some wrong sed call in some Makefile or something like that.

CFLAGS_prepend is missing a trailing space, sounds like it. Patch incoming.

Ross