diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-rt/rt-tests')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch | 30 | ||||
-rwxr-xr-x | import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py | 28 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest | 2 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb (renamed from import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb) | 5 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc | 6 | ||||
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_2.0.bb (renamed from import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb) | 8 |
6 files changed, 23 insertions, 56 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch deleted file mode 100644 index 00fcc7d72..000000000 --- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 9640dde4241e1314b8e8ea35b0c8dab0b30ae51f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 3 Jan 2016 10:50:56 -0800 -Subject: [PATCH] Makefile: Set CC/AR variable only if it doesn't have a value - -This helps it compile with clang or any other compilers besides gcc - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index 1e4b7d1..2c2d396 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,6 +1,6 @@ - VERSION = 0.96 --CC=$(CROSS_COMPILE)gcc --AR=$(CROSS_COMPILE)ar -+CC?=$(CROSS_COMPILE)gcc -+AR?=$(CROSS_COMPILE)ar - - OBJDIR = bld - --- -2.6.4 - diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py index e2280e43e..080a65589 100755 --- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py +++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py @@ -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))) @@ -324,7 +324,7 @@ def run_cyclictest_suite(): t = time.time() max_list = [] - for i in xrange(0, suite_size): + for i in range(0, suite_size): tmp_min, tmp_avg, tmp_max = run_cyclictest_once() msg = "%2d/%2d:" % (i+1, suite_size) @@ -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() #------------------------------------------------------------------------------- diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest index 8e6d3e358..b7c5e29f2 100644 --- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest +++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -python ./rt_bmark.py +python3 ./rt_bmark.py diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb index 962069e3d..012b2dd0a 100644 --- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb +++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb @@ -6,6 +6,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" require rt-tests.inc +inherit python3-dir EXTRA_OEMAKE += "PYLIB=${libdir}/python${PYTHON_BASEVERSION}/dist-packages" @@ -16,8 +17,10 @@ do_compile() { do_install() { oe_runmake install_hwlatdetect DESTDIR=${D} SBINDIR=${sbindir} \ MANDIR=${mandir} INCLUDEDIR=${includedir} + + sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py } FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py" -RDEPENDS_${PN} = "python python-subprocess python-textutils" +RDEPENDS_${PN} = "python3 python3-subprocess python3-textutils" RRECOMMENDS_${PN} = "kernel-module-hwlat-detector" diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc index 76f9b3a34..d832828e9 100644 --- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc +++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc @@ -1,13 +1,9 @@ # Version v0.96 -PV = "0.96" -SRCREV = "24f8c0175e04bab78e7555698e34d7002b01c87f" +SRCREV = "e1b1537a20b35af75a49bf55dcf70296f8a62467" SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git" S = "${WORKDIR}/git" -# need to append rt-tests' default CFLAGS to ours -CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnull" - # calling 'uname -m' is broken on crossbuilds EXTRA_OEMAKE = "NUMA=0" diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_2.0.bb index 2f96fea9b..4336c50d6 100644 --- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb +++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_2.0.bb @@ -10,14 +10,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ require rt-tests.inc inherit ptest -SRC_URI += "file://0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch \ +SRC_URI += " \ file://run-ptest \ file://rt_bmark.py \ " # Do not install hwlatdetect -EXTRA_OEMAKE += "PYLIB='' CROSS_COMPILE=${TARGET_PREFIX}" - -CFLAGS_prepend = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +EXTRA_OEMAKE += "PYLIB=''" do_install() { oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \ @@ -28,6 +26,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" |