summaryrefslogtreecommitdiffstats
path: root/recipes-core/numactl
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/numactl')
-rw-r--r--recipes-core/numactl/numactl-2.0.9/Makefile.patch63
-rwxr-xr-xrecipes-core/numactl/numactl-2.0.9/regress1-parser63
-rwxr-xr-xrecipes-core/numactl/numactl-2.0.9/run-ptest5
-rw-r--r--recipes-core/numactl/numactl_2.0.9.bb52
4 files changed, 183 insertions, 0 deletions
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 @@
1Add 'test-install' rule.
2Do not use getlibdir for 'prefix' variable.
3Echo 'SKIP' result for ptest when run on sigle node machine.
4
5Signed-off-by: Radu Patriu <radu.patriu@enea.com>
6Upstream-Status: Pending
7
8Index: numactl-2.0.9-orig/Makefile
9===================================================================
10--- numactl-2.0.9-orig.orig/Makefile 2013-10-09 00:34:57.000000000 +0300
11+++ numactl-2.0.9-orig/Makefile 2014-02-07 20:27:21.951902184 +0200
12@@ -42,7 +42,7 @@
13 else
14 prefix := $(PREFIX)
15 endif
16-libdir := ${prefix}/$(shell ./getlibdir)
17+libdir := ${prefix}/lib
18 docdir := ${prefix}/share/doc
19
20 all: numactl migratepages migspeed libnuma.so numademo numamon memhog \
21@@ -197,9 +197,9 @@
22 .depend:
23 ${CC} -MM -DDEPS_RUN -I. ${SOURCES} > .depend.X && mv .depend.X .depend
24
25-include .depend
26+# include .depend
27
28-Makefile: .depend
29+# Makefile: .depend
30
31 .PHONY: test regress1 regress2
32
33@@ -215,3 +215,18 @@
34
35 # test: all regress1 regress2 test_numademo regress3
36 test: all regress1 regress2 test_numademo
37+
38+TEST_DESTDIR ?= ${prefix}/lib/numactl/ptest
39+TEST_FILES = bind_range distance migrate_pages nodemap prefered README regress2 shmtest \
40+ checkaffinity ftok move_pages node-parse printcpu realloc_test regress-io tbitmap \
41+ checktopology mbind_mig_pages mynode pagesize randmap regress runltp tshared
42+TEST_FRAME = Makefile getlibdir numactl numademo
43+
44+test-install:
45+ install -d ${TEST_DESTDIR}/test
46+ for file in ${TEST_FILES}; do \
47+ install test/$${file} ${TEST_DESTDIR}/test; \
48+ done
49+ for file in ${TEST_FRAME}; do \
50+ install $${file} ${TEST_DESTDIR}; \
51+ done
52Index: numactl-2.0.9-orig/test/regress
53===================================================================
54--- numactl-2.0.9-orig.orig/test/regress 2013-10-09 00:34:58.000000000 +0300
55+++ numactl-2.0.9-orig/test/regress 2014-02-07 20:27:01.151901373 +0200
56@@ -73,6 +73,7 @@
57 if [ $numnodes -lt 2 ] ; then
58 echo "need at least two nodes with at least $NEEDPAGES each of"
59 echo "free memory for mempolicy regression tests"
60+ echo '========SKIP'
61 exit 1
62 fi
63 }
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 @@
1#!/bin/sh
2
3test_pattern="=>testing "
4test_fail="==FAILED"
5test_skip="==SKIP"
6test_log="regress1.log"
7test_suite="regress1"
8
9test_name=""
10failed="0"
11skiped="0"
12
13while read line
14do
15 substring=${line#$test_pattern*}
16# echo "sub>"$substring"<"
17 if [ "$substring" != "$line" ];
18 then
19 if [ "$test_name" != "" ];
20 then
21 if [ "$failed" = "1" ];
22 then
23 echo "FAIL: $test_name"
24 else
25 echo "PASS: $test_name"
26 fi
27 fi
28 test_name=$substring
29# echo "name>"$test_name"<"
30 failed="0"
31 fi
32
33 if [ "${line#*$test_fail}" != "$line" ];
34 then
35 failed="1"
36 fi
37
38 if [ "${line#*$test_skip}" != "$line" ];
39 then
40 skiped="1"
41 fi
42
43done < $test_log
44
45if [ "$skiped" = "1" ];
46then
47 echo "SKIP: $test_suite"
48 exit 1
49fi
50
51
52if [ "$test_name" = "" ];
53then
54 echo "FAIL: $test_suite"
55 exit 1
56fi
57
58if [ "$failed" = "1" ];
59then
60 echo "FAIL: $test_name"
61else
62 echo "PASS: $test_name"
63fi
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 @@
1#!/bin/sh
2
3make regress1 >regress1.log 2>&1
4./regress1-parser
5make -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 @@
1SUMMARY = "Simple NUMA policy support"
2DESCRIPTION = 'It consists of a numactl program to run \
3other programs with a specific NUMA policy and a libnuma shared library \
4("NUMA API") to set NUMA policy in applications.'
5HOMEPAGE = "http://oss.sgi.com/projects/libnuma/"
6SECTION = "console/utils"
7
8RDEPENDS_numactl = "libnuma"
9
10LICENSE = "GPLv2 & LGPLv2.1"
11LICENSE_libnuma = "GPLv2"
12LICENSE_numactl = "LGPLv2.1"
13
14LIC_FILES_CHKSUM = "file://libnuma.c;beginline=1;endline=17;md5=17362df5a5de121a289afcac0d30a9c6 \
15 file://numactl.c;beginline=1;endline=16;md5=0c0a67367b1246f7643d6bc2bfe469de"
16
17SRC_URI = "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-2.0.9.tar.gz \
18 file://Makefile.patch \
19 file://regress1-parser \
20 file://run-ptest"
21
22SRC_URI[md5sum] = "136685c8eaf9d6569c351fe1d453b30c"
23SRC_URI[sha256sum] = "9ca033e6c14c0f26c20379b0cf9299429fd5a354a79c3c7880fd41ef69f7751c"
24
25S = "${WORKDIR}/numactl-${PV}"
26
27EXTRA_OEMAKE = "PREFIX=${D}/usr TEST_DESTDIR=${D}${PTEST_PATH}"
28
29do_install () {
30 oe_runmake install
31 rmdir ${D}/usr/share/man/man2
32}
33
34PACKAGES = "libnuma-dbg ${PN}-dbg ${PN} ${PN}-doc libnuma-staticdev libnuma libnuma-dev libnuma-doc"
35
36FILES_libnuma-dbg = "${libdir}/.debug"
37FILES_libnuma-staticdev = "${libdir}/*.a"
38FILES_libnuma = "${libdir}/libnuma.so.*"
39FILES_libnuma-dev = "${libdir} ${includedir}"
40FILES_libnuma-doc = "${mandir}/man3"
41
42FILES_${PN}-dbg = "${bindir}/.debug /usr/src/debug"
43FILES_${PN} = "${bindir}"
44FILES_${PN}-doc = "${mandir}/man8"
45
46inherit ptest
47RDEPENDS_${PN}-ptest += "make"
48
49do_install_ptest () {
50 oe_runmake test-install
51 install ${WORKDIR}/regress1-parser ${D}${PTEST_PATH}
52}