diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-11-10 10:54:05 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2015-11-10 13:47:30 +0100 |
commit | 2e4c80b695efdf3b9d48758f0ee0a05c95cb371e (patch) | |
tree | f30b8ca8e0c7676a84fbf59f11632b79aaacae62 /recipes-devtools | |
parent | fec5cd3b7ca6e593d7bf8a28711fd4d876354f05 (diff) | |
download | meta-nfv-access-common-2e4c80b695efdf3b9d48758f0ee0a05c95cb371e.tar.gz |
elfutils: add ptest
Add Enea Specific ptest
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'recipes-devtools')
4 files changed, 65 insertions, 0 deletions
diff --git a/recipes-devtools/elfutils/elfutils/add-ptest.patch b/recipes-devtools/elfutils/elfutils/add-ptest.patch new file mode 100644 index 0000000..88f808d --- /dev/null +++ b/recipes-devtools/elfutils/elfutils/add-ptest.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Add 'install-ptest' rule. | ||
2 | |||
3 | Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com> | ||
4 | Upstream-status: Pending | ||
5 | --- | ||
6 | diff -uNr a/tests/Makefile.am b/tests/Makefile.am | ||
7 | --- a/tests/Makefile.am 2013-08-19 14:05:23.256292155 +0200 | ||
8 | +++ b/tests/Makefile.am 2013-08-19 15:49:16.084543591 +0200 | ||
9 | @@ -240,3 +240,14 @@ | ||
10 | coverage: | ||
11 | -$(srcdir)/coverage.sh | ||
12 | endif | ||
13 | + | ||
14 | +install-ptest: | ||
15 | + @$(MKDIR_P) $(DESTDIR)/tests | ||
16 | + @$(MKDIR_P) $(DESTDIR)/src | ||
17 | + @install $(builddir)/*$(EXEEXT) $(DESTDIR)/tests | ||
18 | + @install $(srcdir)/*.sh $(DESTDIR)/tests | ||
19 | + @install $(builddir)/../src/*$(EXEEXT) $(DESTDIR)/src | ||
20 | + @cp $(builddir)/../Makefile $(DESTDIR) | ||
21 | + @sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/tests/Makefile | ||
22 | + @sed -i -e 's|$(srcdir)|.|' $(DESTDIR)/tests/Makefile | ||
23 | + | ||
diff --git a/recipes-devtools/elfutils/elfutils/avoid_parallel_tests.patch b/recipes-devtools/elfutils/elfutils/avoid_parallel_tests.patch new file mode 100644 index 0000000..ed6b6ef --- /dev/null +++ b/recipes-devtools/elfutils/elfutils/avoid_parallel_tests.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | ptest needs buildtest-TESTS and runtest-TESTS targets. | ||
2 | serial-tests is required to generate those targets. | ||
3 | |||
4 | Signed-off-by: Alexandra Safta <alexandra.safta@enea.com> | ||
5 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
6 | Upstream-Status: Inappropriate | ||
7 | |||
8 | diff -ruN a/configure.ac b/configure.ac | ||
9 | |||
10 | --- a/configure.ac 2014-05-26 18:55:11.843190780 +0200 | ||
11 | +++ b/configure.ac 2014-05-26 18:56:01.725097919 +0200 | ||
12 | @@ -25,7 +25,7 @@ | ||
13 | AC_PREREQ(2.63) dnl Minimum Autoconf version required. | ||
14 | |||
15 | dnl We use GNU make extensions; automake 1.10 defaults to -Wportability. | ||
16 | -AM_INIT_AUTOMAKE([gnits 1.8 -Wno-portability dist-bzip2 no-dist-gzip]) | ||
17 | +AM_INIT_AUTOMAKE([gnits 1.8 -Wno-portability dist-bzip2 no-dist-gzip serial-tests]) | ||
18 | AM_MAINTAINER_MODE | ||
19 | |||
20 | dnl Unique ID for this build. | ||
diff --git a/recipes-devtools/elfutils/elfutils/run-ptest b/recipes-devtools/elfutils/elfutils/run-ptest new file mode 100644 index 0000000..51ea6df --- /dev/null +++ b/recipes-devtools/elfutils/elfutils/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | make -C tests -k runtest-TESTS | ||
diff --git a/recipes-devtools/elfutils/elfutils_0.148.bbappend b/recipes-devtools/elfutils/elfutils_0.148.bbappend new file mode 100644 index 0000000..704829a --- /dev/null +++ b/recipes-devtools/elfutils/elfutils_0.148.bbappend | |||
@@ -0,0 +1,19 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI += "\ | ||
4 | file://add-ptest.patch \ | ||
5 | file://run-ptest \ | ||
6 | file://avoid_parallel_tests.patch \ | ||
7 | " | ||
8 | |||
9 | inherit ptest | ||
10 | |||
11 | do_compile_ptest() { | ||
12 | oe_runmake -C tests buildtest-TESTS | ||
13 | } | ||
14 | |||
15 | do_install_ptest() { | ||
16 | oe_runmake -C tests install-ptest DESTDIR=${D}${PTEST_PATH} | ||
17 | } | ||
18 | |||
19 | RDEPENDS_${PN}-ptest += " bash" | ||