From 1b6242fc583a6b871304fb995af6dc211b58f69b Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 13:48:23 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- recipes-core/numactl/numactl-2.0.9/Makefile.patch | 63 ++++++++++++++++++++++ recipes-core/numactl/numactl-2.0.9/regress1-parser | 63 ++++++++++++++++++++++ recipes-core/numactl/numactl-2.0.9/run-ptest | 5 ++ recipes-core/numactl/numactl_2.0.9.bb | 52 ++++++++++++++++++ 4 files changed, 183 insertions(+) create mode 100644 recipes-core/numactl/numactl-2.0.9/Makefile.patch create mode 100755 recipes-core/numactl/numactl-2.0.9/regress1-parser create mode 100755 recipes-core/numactl/numactl-2.0.9/run-ptest create mode 100644 recipes-core/numactl/numactl_2.0.9.bb (limited to 'recipes-core/numactl') diff --git a/recipes-core/numactl/numactl-2.0.9/Makefile.patch b/recipes-core/numactl/numactl-2.0.9/Makefile.patch new file mode 100644 index 0000000..3c6d3e2 --- /dev/null +++ b/recipes-core/numactl/numactl-2.0.9/Makefile.patch @@ -0,0 +1,63 @@ +Add 'test-install' rule. +Do not use getlibdir for 'prefix' variable. +Echo 'SKIP' result for ptest when run on sigle node machine. + +Signed-off-by: Radu Patriu +Upstream-Status: Pending + +Index: numactl-2.0.9-orig/Makefile +=================================================================== +--- numactl-2.0.9-orig.orig/Makefile 2013-10-09 00:34:57.000000000 +0300 ++++ numactl-2.0.9-orig/Makefile 2014-02-07 20:27:21.951902184 +0200 +@@ -42,7 +42,7 @@ + else + prefix := $(PREFIX) + endif +-libdir := ${prefix}/$(shell ./getlibdir) ++libdir := ${prefix}/lib + docdir := ${prefix}/share/doc + + all: numactl migratepages migspeed libnuma.so numademo numamon memhog \ +@@ -197,9 +197,9 @@ + .depend: + ${CC} -MM -DDEPS_RUN -I. ${SOURCES} > .depend.X && mv .depend.X .depend + +-include .depend ++# include .depend + +-Makefile: .depend ++# Makefile: .depend + + .PHONY: test regress1 regress2 + +@@ -215,3 +215,18 @@ + + # test: all regress1 regress2 test_numademo regress3 + test: all regress1 regress2 test_numademo ++ ++TEST_DESTDIR ?= ${prefix}/lib/numactl/ptest ++TEST_FILES = bind_range distance migrate_pages nodemap prefered README regress2 shmtest \ ++ checkaffinity ftok move_pages node-parse printcpu realloc_test regress-io tbitmap \ ++ checktopology mbind_mig_pages mynode pagesize randmap regress runltp tshared ++TEST_FRAME = Makefile getlibdir numactl numademo ++ ++test-install: ++ install -d ${TEST_DESTDIR}/test ++ for file in ${TEST_FILES}; do \ ++ install test/$${file} ${TEST_DESTDIR}/test; \ ++ done ++ for file in ${TEST_FRAME}; do \ ++ install $${file} ${TEST_DESTDIR}; \ ++ done +Index: numactl-2.0.9-orig/test/regress +=================================================================== +--- numactl-2.0.9-orig.orig/test/regress 2013-10-09 00:34:58.000000000 +0300 ++++ numactl-2.0.9-orig/test/regress 2014-02-07 20:27:01.151901373 +0200 +@@ -73,6 +73,7 @@ + if [ $numnodes -lt 2 ] ; then + echo "need at least two nodes with at least $NEEDPAGES each of" + echo "free memory for mempolicy regression tests" ++ echo '========SKIP' + exit 1 + fi + } diff --git a/recipes-core/numactl/numactl-2.0.9/regress1-parser b/recipes-core/numactl/numactl-2.0.9/regress1-parser new file mode 100755 index 0000000..d8e9dea --- /dev/null +++ b/recipes-core/numactl/numactl-2.0.9/regress1-parser @@ -0,0 +1,63 @@ +#!/bin/sh + +test_pattern="=>testing " +test_fail="==FAILED" +test_skip="==SKIP" +test_log="regress1.log" +test_suite="regress1" + +test_name="" +failed="0" +skiped="0" + +while read line +do + substring=${line#$test_pattern*} +# echo "sub>"$substring"<" + if [ "$substring" != "$line" ]; + then + if [ "$test_name" != "" ]; + then + if [ "$failed" = "1" ]; + then + echo "FAIL: $test_name" + else + echo "PASS: $test_name" + fi + fi + test_name=$substring +# echo "name>"$test_name"<" + failed="0" + fi + + if [ "${line#*$test_fail}" != "$line" ]; + then + failed="1" + fi + + if [ "${line#*$test_skip}" != "$line" ]; + then + skiped="1" + fi + +done < $test_log + +if [ "$skiped" = "1" ]; +then + echo "SKIP: $test_suite" + exit 1 +fi + + +if [ "$test_name" = "" ]; +then + echo "FAIL: $test_suite" + exit 1 +fi + +if [ "$failed" = "1" ]; +then + echo "FAIL: $test_name" +else + echo "PASS: $test_name" +fi diff --git a/recipes-core/numactl/numactl-2.0.9/run-ptest b/recipes-core/numactl/numactl-2.0.9/run-ptest new file mode 100755 index 0000000..1d5292e --- /dev/null +++ b/recipes-core/numactl/numactl-2.0.9/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh + +make regress1 >regress1.log 2>&1 +./regress1-parser +make -k regress2 >regress2.log 2>&1 && echo "PASS: regress2" || echo "FAIL: regress2" diff --git a/recipes-core/numactl/numactl_2.0.9.bb b/recipes-core/numactl/numactl_2.0.9.bb new file mode 100644 index 0000000..a7fee35 --- /dev/null +++ b/recipes-core/numactl/numactl_2.0.9.bb @@ -0,0 +1,52 @@ +SUMMARY = "Simple NUMA policy support" +DESCRIPTION = 'It consists of a numactl program to run \ +other programs with a specific NUMA policy and a libnuma shared library \ +("NUMA API") to set NUMA policy in applications.' +HOMEPAGE = "http://oss.sgi.com/projects/libnuma/" +SECTION = "console/utils" + +RDEPENDS_numactl = "libnuma" + +LICENSE = "GPLv2 & LGPLv2.1" +LICENSE_libnuma = "GPLv2" +LICENSE_numactl = "LGPLv2.1" + +LIC_FILES_CHKSUM = "file://libnuma.c;beginline=1;endline=17;md5=17362df5a5de121a289afcac0d30a9c6 \ + file://numactl.c;beginline=1;endline=16;md5=0c0a67367b1246f7643d6bc2bfe469de" + +SRC_URI = "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-2.0.9.tar.gz \ + file://Makefile.patch \ + file://regress1-parser \ + file://run-ptest" + +SRC_URI[md5sum] = "136685c8eaf9d6569c351fe1d453b30c" +SRC_URI[sha256sum] = "9ca033e6c14c0f26c20379b0cf9299429fd5a354a79c3c7880fd41ef69f7751c" + +S = "${WORKDIR}/numactl-${PV}" + +EXTRA_OEMAKE = "PREFIX=${D}/usr TEST_DESTDIR=${D}${PTEST_PATH}" + +do_install () { + oe_runmake install + rmdir ${D}/usr/share/man/man2 +} + +PACKAGES = "libnuma-dbg ${PN}-dbg ${PN} ${PN}-doc libnuma-staticdev libnuma libnuma-dev libnuma-doc" + +FILES_libnuma-dbg = "${libdir}/.debug" +FILES_libnuma-staticdev = "${libdir}/*.a" +FILES_libnuma = "${libdir}/libnuma.so.*" +FILES_libnuma-dev = "${libdir} ${includedir}" +FILES_libnuma-doc = "${mandir}/man3" + +FILES_${PN}-dbg = "${bindir}/.debug /usr/src/debug" +FILES_${PN} = "${bindir}" +FILES_${PN}-doc = "${mandir}/man8" + +inherit ptest +RDEPENDS_${PN}-ptest += "make" + +do_install_ptest () { + oe_runmake test-install + install ${WORKDIR}/regress1-parser ${D}${PTEST_PATH} +} -- cgit v1.2.3-54-g00ecf