diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-test')
24 files changed, 1722 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-test/cppunit/cppunit_1.13.2.bb b/meta-openembedded/meta-oe/recipes-test/cppunit/cppunit_1.13.2.bb new file mode 100644 index 000000000..65b08b068 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cppunit/cppunit_1.13.2.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests. " +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/cppunit" +LICENSE = "LGPL-2.1" +SECTION = "libs" + +LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" +SRC_URI = " \ + http://dev-www.libreoffice.org/src/cppunit-${PV}.tar.gz \ + file://0001-doc-Makefile.am-do-not-preserve-file-flags-when-copy.patch \ +" +SRC_URI[md5sum] = "d1c6bdd5a76c66d2c38331e2d287bc01" +SRC_URI[sha256sum] = "3f47d246e3346f2ba4d7c9e882db3ad9ebd3fcbd2e8b732f946e0e3eeb9f429f" + +inherit autotools diff --git a/meta-openembedded/meta-oe/recipes-test/cppunit/files/0001-doc-Makefile.am-do-not-preserve-file-flags-when-copy.patch b/meta-openembedded/meta-oe/recipes-test/cppunit/files/0001-doc-Makefile.am-do-not-preserve-file-flags-when-copy.patch new file mode 100644 index 000000000..6a20c1283 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cppunit/files/0001-doc-Makefile.am-do-not-preserve-file-flags-when-copy.patch @@ -0,0 +1,31 @@ +From 9d7ce869607d123cd9837890d71f940c5ced3393 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> +Date: Mon, 29 Feb 2016 07:58:20 +0100 +Subject: [PATCH] doc/Makefile.am: do not preserve file flags when copying +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [cross specific] + +Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> +--- + doc/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/Makefile.am b/doc/Makefile.am +index 8815476..3237499 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -22,7 +22,7 @@ htmldir += $(pkgdatadir)/html + html_DATA += $(static_pages) html/index.html + + install-data-hook: +- cp -pR html/* $(DESTDIR)$(htmldir) ++ cp -R html/* $(DESTDIR)$(htmldir) + + # Automake's "distcheck" is sensitive to having files left over + # after "make uninstall", so we have to clean up the install hook. +-- +2.5.0 + diff --git a/meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb b/meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb new file mode 100644 index 000000000..c9d87e36d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cunit/cunit_2.1-3.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "CUnit is a C framework for unit testing. Test output supports comandline and GUI results reporting" +HOMEPAGE = "http://cunit.sourceforge.net" +LICENSE = "LGPL-2.0" +SECTION = "libs" +LIC_FILES_CHKSUM = "file://COPYING;md5=7734aa853b85d6f935466f081490ddbb" + +S = "${WORKDIR}/CUnit-${PV}" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/cunit/CUnit/${PV}/CUnit-${PV}.tar.bz2 \ + file://fixup-install-docdir.patch" +SRC_URI[md5sum] = "b5f1a9f6093869c070c6e4a9450cc10c" +SRC_URI[sha256sum] = "f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214" + +inherit autotools-brokensep remove-libtool + +EXTRA_OECONF = "--enable-memtrace --enable-automated --enable-basic --enable-console" + +FILES_${PN}-dev += "${datadir}/CUnit" +FILES_${PN}-doc += "${docdir}" diff --git a/meta-openembedded/meta-oe/recipes-test/cunit/files/fixup-install-docdir.patch b/meta-openembedded/meta-oe/recipes-test/cunit/files/fixup-install-docdir.patch new file mode 100644 index 000000000..c32822731 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cunit/files/fixup-install-docdir.patch @@ -0,0 +1,36 @@ +From: "Mike Holmes" <mike.holmes@linaro.org> +Date: Thu, 30 October 2014 16:21:03 -0500 +Subject: [PATCH] fixup-install-docdir + +The default configuration macros for CUnit install the documentation and +header files in locations not consistent with the OE filesystem layout. +So here we specify new locations which are consistent with OE filesystems. + +Upstream-Status: Inappropriate - configuration for OE build environment + +Signed-off-by: Mike Holmes <mike.holmes@linaro.org> +Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> +--- + +diff -uNr a/doc/headers/Makefile.am b/doc/headers/Makefile.am +--- a/doc/headers/Makefile.am 2014-10-30 22:06:29.704574162 +0100 ++++ b/doc/headers/Makefile.am 2014-10-30 22:07:43.578524791 +0100 +@@ -1,6 +1,6 @@ + ## Process this file with automake to produce Makefile.in + +-dochdrdir = $(prefix)/doc/@PACKAGE@/headers ++dochdrdir = $(docdir)/headers + + INCLUDE_FILES = \ + Automated.h \ +diff -uNr a/doc/Makefile.am b/doc/Makefile.am +--- a/doc/Makefile.am 2014-10-30 22:06:29.704574162 +0100 ++++ b/doc/Makefile.am 2014-10-30 22:07:01.461412166 +0100 +@@ -1,7 +1,5 @@ + ## Process this file with automake to produce Makefile.in + +-docdir = $(prefix)/doc/@PACKAGE@ +- + doc_DATA = \ + CUnit_doc.css \ + error_handling.html \ diff --git a/meta-openembedded/meta-oe/recipes-test/cxxtest/cxxtest_4.3.bb b/meta-openembedded/meta-oe/recipes-test/cxxtest/cxxtest_4.3.bb new file mode 100644 index 000000000..291501173 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/cxxtest/cxxtest_4.3.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "CxxTest is a unit testing framework for C++ that is similar in spirit to JUnit, CppUnit, and xUnit." +HOMEPAGE = "http://cxxtest.com/" +LICENSE = "LGPL-2.0" +SECTION = "devel" + +SRC_URI = "http://downloads.sourceforge.net/project/cxxtest/cxxtest/${PV}/cxxtest-${PV}.tar.gz" +SRC_URI[md5sum] = "b3a24b3e1aad9acf6adac37f4c3f83ec" +SRC_URI[sha256sum] = "356d0f4810e8eb5c344147a0cca50fc0d84122c286e7644b61cb365c2ee22083" +LIC_FILES_CHKSUM = "file://${WORKDIR}/cxxtest-${PV}/COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02" +S = "${WORKDIR}/cxxtest-${PV}/python" + +inherit distutils + +do_install_append() { + install -d ${D}${includedir} + cp -a ../cxxtest ${D}${includedir} + sed '1c\ +#!/usr/bin/env python' -i ${D}${bindir}/cxxtestgen +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-test/evtest/evtest_git.bb b/meta-openembedded/meta-oe/recipes-test/evtest/evtest_git.bb new file mode 100644 index 000000000..fa0d6e2fe --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/evtest/evtest_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "Simple tool for input event debugging" +HOMEPAGE = "http://people.freedesktop.org/~whot/evtest/" +AUTHOR = "Vojtech Pavlik <vojtech@suse.cz>" +SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "libxml2" + +SRCREV = "ab140a2dab1547f7deb5233be6d94a388cf08b26" +SRC_URI = "git://anongit.freedesktop.org/evtest;protocol=git" + +PV = "1.33+${SRCPV}" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig diff --git a/meta-openembedded/meta-oe/recipes-test/fbtest/fb-test_git.bb b/meta-openembedded/meta-oe/recipes-test/fbtest/fb-test_git.bb new file mode 100644 index 000000000..6a9d4b278 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/fbtest/fb-test_git.bb @@ -0,0 +1,20 @@ +SUMMARY = "Test suite for Linux framebuffer" + +PV = "1.1.0" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" + +SRCREV = "063ec650960c2d79ac51f5c5f026cb05343a33e2" +SRC_URI = "git://github.com/prpplague/fb-test-app.git" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${bindir} + install -m 0755 fb-test ${D}${bindir} + # avoid collisions with perf (perf) and mesa-demos (offset) + for prog in perf rect offset ; do + install -m 0755 $prog ${D}${bindir}/fb-$prog + done +} diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Add-correct-printf-qualifier-for-off_t.patch b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Add-correct-printf-qualifier-for-off_t.patch new file mode 100644 index 000000000..192e05f1c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Add-correct-printf-qualifier-for-off_t.patch @@ -0,0 +1,37 @@ +From 232daf5fca6fb52cced5e810f2601fe1a71b96d8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 8 Jun 2017 16:49:50 -0700 +Subject: [PATCH 1/3] Add correct printf qualifier for off_t + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/bios/ebda_region/ebda_region.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: git/src/bios/ebda_region/ebda_region.c +=================================================================== +--- git.orig/src/bios/ebda_region/ebda_region.c ++++ git/src/bios/ebda_region/ebda_region.c +@@ -83,9 +83,9 @@ static int ebda_test1(fwts_framework *fw + if ((entry != NULL) && + (entry->type == FWTS_MEMORY_MAP_RESERVED || + entry->type == FWTS_MEMORY_MAP_ACPI)) { +- fwts_passed(fw, "EBDA region mapped at 0x%lx and reserved as a %" PRId64 ++ fwts_passed(fw, "EBDA region mapped at 0x%jdx and reserved as a %" PRId64 + "K region in the %s table at 0x%" PRIx64 "..0x%" PRIx64 ".", +- ebda_addr, ++ (intmax_t)ebda_addr, + (entry->end_address - entry->start_address) / 1024, + memory_map_name, + entry->start_address, +@@ -93,8 +93,8 @@ static int ebda_test1(fwts_framework *fw + } else + fwts_failed(fw, LOG_LEVEL_MEDIUM, + "EBDAMappedNotReserved", +- "EBDA region mapped at 0x%lx but not reserved in the %s table.", +- ebda_addr, memory_map_name); ++ "EBDA region mapped at 0x%jdx but not reserved in the %s table.", ++ (intmax_t)ebda_addr, memory_map_name); + + return FWTS_OK; + } diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch new file mode 100644 index 000000000..8ad078936 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch @@ -0,0 +1,48 @@ +From 100a107a53d5dc9b0554252ac5dbf2c9330615e9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 6 Jun 2017 07:25:09 -0700 +Subject: [PATCH 1/3] Include poll.h instead of deprecated sys/poll.h + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/lib/src/fwts_ipmi.c | 3 ++- + src/lib/src/fwts_pipeio.c | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/lib/src/fwts_ipmi.c b/src/lib/src/fwts_ipmi.c +index cbb27611..70d11cfa 100644 +--- a/src/lib/src/fwts_ipmi.c ++++ b/src/lib/src/fwts_ipmi.c +@@ -18,10 +18,11 @@ + * + */ + ++#include <poll.h> ++ + #include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> +-#include <sys/poll.h> + #include <sys/ioctl.h> + #include <linux/ipmi.h> + +diff --git a/src/lib/src/fwts_pipeio.c b/src/lib/src/fwts_pipeio.c +index fd719640..bdc5b2ea 100644 +--- a/src/lib/src/fwts_pipeio.c ++++ b/src/lib/src/fwts_pipeio.c +@@ -30,9 +30,9 @@ + #include <stdlib.h> + #include <string.h> + #include <paths.h> ++#include <poll.h> + + #include <sys/param.h> +-#include <sys/poll.h> + #include <sys/types.h> + #include <sys/wait.h> + #include <errno.h> +-- +2.13.0 + diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-ignore-constant-logical-operand-warning-with-clang.patch b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-ignore-constant-logical-operand-warning-with-clang.patch new file mode 100644 index 000000000..a3cc1ff8e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0001-ignore-constant-logical-operand-warning-with-clang.patch @@ -0,0 +1,83 @@ +From 953cff93c85d3cfd5cbcac56e14443dc5f6e5fbd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 19 Oct 2016 01:57:16 +0000 +Subject: [PATCH] ignore constant-logical-operand warning with clang + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/dmi/dmicheck/dmicheck.c | 3 +++ + src/lib/src/fwts_acpi_tables.c | 5 +++++ + src/uefi/uefirtauthvar/uefirtauthvar.c | 5 +++++ + 3 files changed, 13 insertions(+) + +diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c +index ecd98223..7fca4a64 100644 +--- a/src/dmi/dmicheck/dmicheck.c ++++ b/src/dmi/dmicheck/dmicheck.c +@@ -209,6 +209,8 @@ static const char *uuid_patterns[] = { + "0A0A0A0A-0A0A-0A0A-0A0A-0A0A0A0A0A0A", + NULL, + }; ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Wunneeded-internal-declaration" + + static const fwts_chassis_type_map fwts_dmi_chassis_type[] = { + { "Invalid", FWTS_SMBIOS_CHASSIS_INVALID }, +@@ -245,6 +247,7 @@ static const fwts_chassis_type_map fwts_dmi_chassis_type[] = { + { "Convertible", FWTS_SMBIOS_CHASSIS_CONVERTIBLE }, + { "Detachable", FWTS_SMBIOS_CHASSIS_DETACHABLE }, + }; ++#pragma clang diagnostic pop + + /* Remapping table from buggy version numbers to correct values */ + static const fwts_dmi_version dmi_versions[] = { +diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c +index 30b4060e..d5339bf7 100644 +--- a/src/lib/src/fwts_acpi_tables.c ++++ b/src/lib/src/fwts_acpi_tables.c +@@ -394,10 +394,14 @@ static int fwts_acpi_handle_fadt( + /* Determine FACS addr and load it. + * Will ignore the missing FACS in the hardware-reduced mode. + */ ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Waddress-of-packed-member" ++ + result = fwts_acpi_handle_fadt_tables(fw, fadt, + "FACS", "FIRMWARE_CTRL", "X_FIRMWARE_CTRL", + &fadt->firmware_control, &fadt->x_firmware_ctrl, + provenance); ++ + if (result != FWTS_OK) { + if ((result == FWTS_NULL_POINTER) && + fwts_acpi_is_reduced_hardware(fadt)) { +@@ -416,6 +420,7 @@ static int fwts_acpi_handle_fadt( + return FWTS_ERROR; + } + return FWTS_OK; ++#pragma clang diagnostic pop + } + + /* +diff --git a/src/uefi/uefirtauthvar/uefirtauthvar.c b/src/uefi/uefirtauthvar/uefirtauthvar.c +index cdfd7aa3..001e8cc8 100644 +--- a/src/uefi/uefirtauthvar/uefirtauthvar.c ++++ b/src/uefi/uefirtauthvar/uefirtauthvar.c +@@ -142,6 +142,9 @@ static int uefirtauthvar_deinit(fwts_framework *fw) + return FWTS_OK; + } + ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Wconstant-logical-operand" ++ + static int check_fw_support(fwts_framework *fw, uint64_t status) + { + if ((status == EFI_INVALID_PARAMETER) && +@@ -172,6 +175,8 @@ static int check_fw_support(fwts_framework *fw, uint64_t status) + return FWTS_OK; + } + ++#pragma clang diagnostic pop ++ + /* + * Set the created authenticated variable, AuthVarCreate, + * and checking the data size and data. diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0002-Add-C99-defined-format-for-printing-uint64_t.patch b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0002-Add-C99-defined-format-for-printing-uint64_t.patch new file mode 100644 index 000000000..35ce883a2 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0002-Add-C99-defined-format-for-printing-uint64_t.patch @@ -0,0 +1,53 @@ +From 25f18b9ac37960dc12a3b648a5c866bd56ef2cbe Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 8 Jun 2017 16:50:23 -0700 +Subject: [PATCH 2/3] Add C99 defined format for printing uint64_t + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/opal/reserv_mem.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/opal/reserv_mem.c b/src/opal/reserv_mem.c +index eeec2947..f0672e05 100644 +--- a/src/opal/reserv_mem.c ++++ b/src/opal/reserv_mem.c +@@ -185,7 +185,7 @@ static int reserv_mem_limits_test(fwts_framework *fw) + regions[j].start = (uint64_t)be64toh(ranges[2 * j]); + regions[j].len = (uint64_t)be64toh(ranges[2 * j + 1]); + fwts_log_info(fw, "Region name %80s" +- " start: 0x%08lx, len: 0x%08lx\n", ++ " start: 0x%08" PRIx64 ", len: 0x%08" PRIx64 "\n", + regions[j].name, regions[j].start, regions[j].len); + } + +@@ -248,7 +248,7 @@ static int reserv_mem_limits_test(fwts_framework *fw) + fwts_failed(fw, LOG_LEVEL_MEDIUM, + "ImageSizeMismatch", + "Mismatch in homer-image size, " +- "expected: 0x%lx, actual: 0x%lx", ++ "expected: 0x%" PRIx64 ", actual: 0x%" PRIx64 "", + configstruct.homer, regions[j].len); + ok = false; + } else +@@ -261,7 +261,7 @@ static int reserv_mem_limits_test(fwts_framework *fw) + fwts_failed(fw, LOG_LEVEL_MEDIUM, + "ImageSizeMismatch", + "Mismatch in slw-image size, " +- "expected: 0x%lx, actual: 0x%lx", ++ "expected: 0x%" PRIx64 ", actual: 0x%" PRIx64 "", + configstruct.slw, regions[j].len); + ok = false; + } else +@@ -274,7 +274,7 @@ static int reserv_mem_limits_test(fwts_framework *fw) + fwts_failed(fw, LOG_LEVEL_MEDIUM, + "ImageSizeMismatch", + "Mismatch in occ-common-area size, " +- "expected: 0x%lx, actual: 0x%lx", ++ "expected: 0x%" PRIx64", actual: 0x%" PRIx64"", + configstruct.occ_common, + regions[j].len); + ok = false; +-- +2.13.1 + diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch new file mode 100644 index 000000000..3b83ca57c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch @@ -0,0 +1,33 @@ +From 0e89127cd02ecd5ea4506b935cb2b59eb94107d2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 6 Jun 2017 07:37:20 -0700 +Subject: [PATCH 2/3] Define __SWORD_TYPE if not defined by libc + +__SWORD_TYPE is internal to glibc, therefore +check and define it if needed e.g. on musl + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/lib/src/fwts_uefi.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c +index 1f9d31fa..2d925f8d 100644 +--- a/src/lib/src/fwts_uefi.c ++++ b/src/lib/src/fwts_uefi.c +@@ -59,6 +59,10 @@ typedef struct { + #define UEFI_IFACE_SYSFS (2) /* sysfs */ + #define UEFI_IFACE_EFIVARS (3) /* efivar fs */ + ++#ifndef __SWORD_TYPE ++typedef __typeof__( ((struct statfs *)0)->f_type ) __SWORD_TYPE; ++#endif ++ + /* File system magic numbers */ + #define PSTOREFS_MAGIC ((__SWORD_TYPE)0x6165676C) + #define EFIVARFS_MAGIC ((__SWORD_TYPE)0xde5e81e4) +-- +2.13.0 + diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0003-Undefine-PAGE_SIZE.patch b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0003-Undefine-PAGE_SIZE.patch new file mode 100644 index 000000000..f84fbffd8 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0003-Undefine-PAGE_SIZE.patch @@ -0,0 +1,30 @@ +From 0857269d5a053b5b4c31cfa01b6501526b24035f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 6 Jun 2017 07:39:28 -0700 +Subject: [PATCH 3/3] Undefine PAGE_SIZE + +musl defines PAGE_SIZE and build complains +of multiple definitions + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/lib/src/fwts_acpi_tables.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c +index 1d4fc705..71023ad2 100644 +--- a/src/lib/src/fwts_acpi_tables.c ++++ b/src/lib/src/fwts_acpi_tables.c +@@ -42,6 +42,7 @@ + #define BIOS_START (0x000e0000) /* Start of BIOS memory */ + #define BIOS_END (0x000fffff) /* End of BIOS memory */ + #define BIOS_LENGTH (BIOS_END - BIOS_START) /* Length of BIOS memory */ ++#undef PAGE_SIZE + #define PAGE_SIZE (4096) + + static fwts_acpi_table_info tables[ACPI_MAX_TABLES]; +-- +2.13.0 + diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch new file mode 100644 index 000000000..3cd3fbbc1 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts/0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch @@ -0,0 +1,76 @@ +From d0d76820efe51dd404d381fc4c46544008e757dd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 8 Jun 2017 16:50:59 -0700 +Subject: [PATCH 3/3] use intptr_t to fix pointer-to-int-cast issues + +uintptr_t is guaranteed to be wide enough that +converting a void* to uintptr_t and back again +will yield the original pointer value + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/lib/src/fwts_acpi_tables.c | 4 ++-- + src/lib/src/fwts_mmap.c | 2 +- + src/lib/src/fwts_smbios.c | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c +index 832f8d66..d0006529 100644 +--- a/src/lib/src/fwts_acpi_tables.c ++++ b/src/lib/src/fwts_acpi_tables.c +@@ -150,7 +150,7 @@ static fwts_acpi_table_rsdp *fwts_acpi_get_rsdp(fwts_framework *fw, void *addr, + fwts_acpi_table_rsdp *rsdp = NULL; + *rsdp_len = 0; + +- if ((mem = fwts_mmap((off_t)addr, sizeof(fwts_acpi_table_rsdp))) == FWTS_MAP_FAILED) ++ if ((mem = fwts_mmap((uintptr_t)addr, sizeof(fwts_acpi_table_rsdp))) == FWTS_MAP_FAILED) + return NULL; + + if (fwts_safe_memread(mem, sizeof(fwts_acpi_table_rsdp)) != FWTS_OK) { +@@ -456,7 +456,7 @@ static int fwts_acpi_load_tables_from_firmware(fwts_framework *fw) + if ((rsdp = fwts_acpi_get_rsdp(fw, rsdp_addr, &rsdp_len)) == NULL) + return FWTS_ERROR; + +- fwts_acpi_add_table("RSDP", rsdp, (uint64_t)(off_t)rsdp_addr, rsdp_len, FWTS_ACPI_TABLE_FROM_FIRMWARE); ++ fwts_acpi_add_table("RSDP", rsdp, (uint64_t)(uintptr_t)rsdp_addr, rsdp_len, FWTS_ACPI_TABLE_FROM_FIRMWARE); + + /* Load any tables from XSDT if it's valid */ + if (rsdp->xsdt_address) { +diff --git a/src/lib/src/fwts_mmap.c b/src/lib/src/fwts_mmap.c +index a09f688e..9fe6329a 100644 +--- a/src/lib/src/fwts_mmap.c ++++ b/src/lib/src/fwts_mmap.c +@@ -81,7 +81,7 @@ int fwts_munmap(void *mem, const size_t size) + off_t offset; + + page_size = fwts_page_size(); +- offset = ((off_t)(mem)) & (page_size - 1); ++ offset = ((uintptr_t)(mem)) & (page_size - 1); + + if (munmap((void *)((uint8_t *)mem - offset), size + offset) < 0) + return FWTS_ERROR; +diff --git a/src/lib/src/fwts_smbios.c b/src/lib/src/fwts_smbios.c +index 8d0ea39b..63b4bf25 100644 +--- a/src/lib/src/fwts_smbios.c ++++ b/src/lib/src/fwts_smbios.c +@@ -54,7 +54,7 @@ static void *fwts_smbios_find_entry_uefi(fwts_framework *fw, fwts_smbios_entry * + if ((addr = fwts_scan_efi_systab("SMBIOS")) != NULL) { + fwts_smbios_entry *mapped_entry; + +- if ((mapped_entry = fwts_mmap((off_t)addr, sizeof(fwts_smbios_entry))) != FWTS_MAP_FAILED) { ++ if ((mapped_entry = fwts_mmap((uintptr_t)addr, sizeof(fwts_smbios_entry))) != FWTS_MAP_FAILED) { + *entry = *mapped_entry; + (void)fwts_munmap(mapped_entry, sizeof(fwts_smbios_entry)); + *type = FWTS_SMBIOS; +@@ -84,7 +84,7 @@ static void *fwts_smbios30_find_entry_uefi(fwts_framework *fw, fwts_smbios30_ent + if ((addr = fwts_scan_efi_systab("SMBIOS3")) != NULL) { + fwts_smbios30_entry *mapped_entry; + +- if ((mapped_entry = fwts_mmap((off_t)addr, sizeof(fwts_smbios30_entry))) != FWTS_MAP_FAILED) { ++ if ((mapped_entry = fwts_mmap((uintptr_t)addr, sizeof(fwts_smbios30_entry))) != FWTS_MAP_FAILED) { + *entry = *mapped_entry; + (void)fwts_munmap(mapped_entry, sizeof(fwts_smbios30_entry)); + return addr; +-- +2.13.1 + diff --git a/meta-openembedded/meta-oe/recipes-test/fwts/fwts_git.bb b/meta-openembedded/meta-oe/recipes-test/fwts/fwts_git.bb new file mode 100644 index 000000000..87a23af19 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/fwts/fwts_git.bb @@ -0,0 +1,39 @@ +SUMMARY = "Firmware testsuite" +DESCRIPTION = "The tool fwts comprises of over fifty tests that are designed to exercise and test different aspects of a machine's firmware. Many of these tests need super user access to read BIOS data and ACPI tables, so the tool requires running with super user privileges (e.g. with sudo)." +HOMEPAGE = "https://wiki.ubuntu.com/Kernel/Reference/fwts" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=16;md5=31da590f3e9f3bd34dcdb9e4db568519" + +PV = "17.03.00+git${SRCPV}" + +SRCREV = "0153ea51cb648b3067a1b327eee6a075b6cfa330" +SRC_URI = "git://kernel.ubuntu.com/hwe/fwts.git \ + file://0001-ignore-constant-logical-operand-warning-with-clang.patch \ + file://0001-Include-poll.h-instead-of-deprecated-sys-poll.h.patch \ + file://0002-Define-__SWORD_TYPE-if-not-defined-by-libc.patch \ + file://0003-Undefine-PAGE_SIZE.patch \ + file://0001-Add-correct-printf-qualifier-for-off_t.patch \ + file://0002-Add-C99-defined-format-for-printing-uint64_t.patch \ + file://0003-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch \ + " + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = "(i.86|x86_64|aarch64|powerpc64).*-linux" + +DEPENDS = "libpcre json-c glib-2.0 dtc" +DEPENDS_append_libc-musl = " libexecinfo" + +inherit autotools pkgconfig + +CFLAGS += "-I${STAGING_INCDIR}/json-c -Wno-error=unknown-pragmas" +LDFLAGS_append_libc-musl = " -lexecinfo" + +FILES_${PN} += "${libdir}/fwts/lib*${SOLIBS}" +FILES_${PN}-dev += "${libdir}/fwts/lib*${SOLIBSDEV} ${libdir}/fwts/lib*.la" +FILES_${PN}-staticdev += "${libdir}/fwts/lib*a" +FILES_${PN}-dbg += "${libdir}/fwts/.debug" + +TOOLCHAIN = "gcc" + diff --git a/meta-openembedded/meta-oe/recipes-test/gtest/gtest/Add-pkg-config-support.patch b/meta-openembedded/meta-oe/recipes-test/gtest/gtest/Add-pkg-config-support.patch new file mode 100644 index 000000000..4c8977b49 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/gtest/gtest/Add-pkg-config-support.patch @@ -0,0 +1,106 @@ +From ec9256bb704e94f41407fc8ace6a580491430196 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Thu, 15 Dec 2016 04:35:41 -0800 +Subject: [PATCH] Add pkg-config support + +Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br> +Signed-off-by: Rodrigo Caimi <caimi@datacom.ind.br> +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + googlemock/CMakeLists.txt | 9 +++++++-- + googlemock/gmock.pc.in | 9 +++++++++ + googletest/CMakeLists.txt | 9 +++++++-- + googletest/gtest.pc.in | 9 +++++++++ + 4 files changed, 32 insertions(+), 4 deletions(-) + create mode 100644 googlemock/gmock.pc.in + create mode 100644 googletest/gtest.pc.in + +diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt +index beb259a..f17e2d7 100644 +--- a/googlemock/CMakeLists.txt ++++ b/googlemock/CMakeLists.txt +@@ -27,6 +27,9 @@ if (COMMAND pre_project_set_up_hermetic_build) + pre_project_set_up_hermetic_build() + endif() + ++# pkg-config support ++configure_file("gmock.pc.in" "gmock.pc" @ONLY) ++ + ######################################################################## + # + # Project-wide settings +@@ -104,9 +107,11 @@ endif() + # + # Install rules + install(TARGETS gmock gmock_main +- DESTINATION lib) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(DIRECTORY ${gmock_SOURCE_DIR}/include/gmock +- DESTINATION include) ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gmock.pc" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/") + + ######################################################################## + # +diff --git a/googlemock/gmock.pc.in b/googlemock/gmock.pc.in +new file mode 100644 +index 0000000..04bc0b4 +--- /dev/null ++++ b/googlemock/gmock.pc.in +@@ -0,0 +1,9 @@ ++Name: libgmock ++Version: 1.8.0 ++Description: Google's framework for writing C++ tests on a variety of platforms ++ ++prefix=@CMAKE_INSTALL_PREFIX@ ++includedir=@CMAKE_INSTALL_INCLUDEDIR@ ++libdir=@CMAKE_INSTALL_LIBDIR@ ++Cflags:-I${includedir}/gmock ++Libs: -L${libdir} -lgmock -lgmock_main +diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt +index 621d0f0..58aaf54 100644 +--- a/googletest/CMakeLists.txt ++++ b/googletest/CMakeLists.txt +@@ -34,6 +34,9 @@ if (COMMAND pre_project_set_up_hermetic_build) + pre_project_set_up_hermetic_build() + endif() + ++# pkg-config support ++configure_file("gtest.pc.in" "gtest.pc" @ONLY) ++ + ######################################################################## + # + # Project-wide settings +@@ -103,9 +106,11 @@ endif() + # + # Install rules + install(TARGETS gtest gtest_main +- DESTINATION lib) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(DIRECTORY ${gtest_SOURCE_DIR}/include/gtest +- DESTINATION include) ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gtest.pc" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/") + + ######################################################################## + # +diff --git a/googletest/gtest.pc.in b/googletest/gtest.pc.in +new file mode 100644 +index 0000000..fb95152 +--- /dev/null ++++ b/googletest/gtest.pc.in +@@ -0,0 +1,9 @@ ++Name: libgtest ++Version: 1.8.0 ++Description: Google's framework for writing C++ tests on a variety of platforms ++ ++prefix=@CMAKE_INSTALL_PREFIX@ ++includedir=@CMAKE_INSTALL_INCLUDEDIR@ ++libdir=@CMAKE_INSTALL_LIBDIR@ ++Cflags:-I${includedir}/gtest ++Libs: -L${libdir} -lgtest -lgtest_main +-- +1.9.1 + diff --git a/meta-openembedded/meta-oe/recipes-test/gtest/gtest_1.8.0.bb b/meta-openembedded/meta-oe/recipes-test/gtest/gtest_1.8.0.bb new file mode 100644 index 000000000..48cf4e04b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/gtest/gtest_1.8.0.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Google's framework for writing C++ tests" +HOMEPAGE = "https://github.com/google/googletest" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://googlemock/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ + file://googletest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" + +PROVIDES += "gmock" + +S = "${WORKDIR}/git" +SRCREV = "ec44c6c1675c25b9827aacd08c02433cccde7780" +SRC_URI = "\ + git://github.com/google/googletest.git;protocol=https; \ + file://Add-pkg-config-support.patch \ +" + +inherit cmake + +ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY_${PN}-dbg = "1" + +RDEPENDS_${PN}-dev += "${PN}-staticdev" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-test/pm-qa/pm-qa_git.bb b/meta-openembedded/meta-oe/recipes-test/pm-qa/pm-qa_git.bb new file mode 100644 index 000000000..1ee6573bd --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/pm-qa/pm-qa_git.bb @@ -0,0 +1,65 @@ +DESCRIPTION = "Utilities for testing Power Management" +HOMEPAGE = "https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQa" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +PV = "0.5.2" + +BRANCH ?= "master" + +SRCREV = "05710ec5032be4c8edafb4109d4d908d31243906" + +SRC_URI = "git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +CFLAGS += "-pthread" + +do_compile () { + # Find all the .c files in this project and build them. + for x in `find . -name "*.c"` + do + util=`echo ${x} | sed s/.c$//` + oe_runmake ${util} + done +} + +do_install () { + install -d ${D}${bindir} + install -d ${D}${libdir}/${BPN} + + # Install the compiled binaries that were built in the previous step + for x in `find . -name "*.c"` + do + util=`echo ${x} | sed s/.c$//` + util_basename=`basename ${util}` + install -m 0755 ${util} ${D}${bindir}/${util_basename} + done + + # Install the helper scripts in a subdirectory of $libdir + for script in `find . -name "*.sh" | grep include` + do + # Remove hardcoded relative paths + sed -i -e 's#..\/utils\/##' ${script} + + script_basename=`basename ${script}` + install -m 0755 $script ${D}${libdir}/${BPN}/${script_basename} + done + + # Install the shell scripts NOT in the $libdir directory since those + # will be installed elsewhere + for script in `find . -name "*.sh" | grep -v include` + do + # if the script includes any helper scripts from the $libdir + # directory then change the source path to the absolute path + # to reflect the install location of the helper scripts. + sed -i -e "s#source ../include#source ${libdir}/${BPN}#g" ${script} + # Remove hardcoded relative paths + sed -i -e 's#..\/utils\/##' ${script} + + script_basename=`basename ${script}` + install -m 0755 $script ${D}${bindir}/${script_basename} + done +} +RDEPENDS_${PN} +="bash" diff --git a/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch b/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch new file mode 100644 index 000000000..d604f860a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch @@ -0,0 +1,141 @@ +From 784dcd09d3f266e271d007f4fd257e85036872ca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linaro.org> +Date: Tue, 17 Oct 2017 10:13:20 -0500 +Subject: [PATCH] Several changes to fix musl build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +stress-{context, stackmmap}.c: Set tests to non-implemented because uses +swapcontext, musl provide the definition but not the implementation due + to that functions are pre-POSIX and set to be deprecated. + stress-{resources, pty}.c: Doesn't include termio.h and remove stress + operations that uses struct termio, musl doesn't provide that struct. +stress-malloc.c: Check for definition of M_MMAP_THRESHOLD musl doesn't + ptovide that constant. +stress-madvise.c: Add static poision_count integer, definition of + MADV_SOFT_OFFLINE doesn't grauntee MADV_HWPOISON to be defined. +cache.c: Define GLOB_ONLYDIR not available on MUSL. + +Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> +Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> + +Upstream-status: Pending + +--- + cache.c | 4 ++++ + stress-madvise.c | 1 + + stress-malloc.c | 2 +- + stress-pty.c | 18 ------------------ + stress-resources.c | 1 - + stress-stackmmap.c | 2 +- + 6 files changed, 7 insertions(+), 21 deletions(-) + +diff --git a/cache.c b/cache.c +index fbf7674..936c1ff 100644 +--- a/cache.c ++++ b/cache.c +@@ -28,6 +28,10 @@ typedef struct { + + #include <glob.h> + ++#ifndef GLOB_ONLYDIR ++#define GLOB_ONLYDIR 0x100 ++#endif ++ + #if defined(__linux__) + #define SYS_CPU_PREFIX "/sys/devices/system/cpu" + #define GLOB_PATTERN SYS_CPU_PREFIX "/cpu[0-9]*" +diff --git a/stress-madvise.c b/stress-madvise.c +index 9e71e11..ddf8d2d 100644 +--- a/stress-madvise.c ++++ b/stress-madvise.c +@@ -147,6 +147,7 @@ static int stress_random_advise(const args_t *args) + #if defined(MADV_SOFT_OFFLINE) + if (advise == MADV_SOFT_OFFLINE) { + static int soft_offline_count; ++ static int poison_count; + + /* ..and minimize number of soft offline pages */ + if ((soft_offline_count >= NUM_SOFT_OFFLINE_MAX) || +diff --git a/stress-malloc.c b/stress-malloc.c +index a46b8c6..427827a 100644 +--- a/stress-malloc.c ++++ b/stress-malloc.c +@@ -99,7 +99,7 @@ int stress_malloc(const args_t *args) + malloc_max = MIN_MALLOC_MAX; + } + +-#if defined(__GNUC__) && defined(__linux__) ++#if defined(__GNUC__) && defined(__linux__) && defined(M_MMAP_THRESHOLD) + if (get_setting("malloc-threshold", &malloc_threshold)) + (void)mallopt(M_MMAP_THRESHOLD, (int)malloc_threshold); + #endif +diff --git a/stress-pty.c b/stress-pty.c +index 1bd1fbd..b1fe573 100644 +--- a/stress-pty.c ++++ b/stress-pty.c +@@ -26,7 +26,6 @@ + + #if defined(__linux__) + +-#include <termio.h> + #include <termios.h> + + typedef struct { +@@ -108,7 +107,6 @@ int stress_pty(const args_t *args) + */ + for (i = 0; i < n; i++) { + struct termios ios; +- struct termio io; + struct winsize ws; + int arg; + +@@ -130,22 +128,6 @@ int stress_pty(const args_t *args) + if (ioctl(ptys[i].slave, TCSETSF, &ios) < 0) + pr_fail_err("ioctl TCSETSF on slave pty"); + #endif +-#if defined(TCGETA) +- if (ioctl(ptys[i].slave, TCGETA, &io) < 0) +- pr_fail_err("ioctl TCGETA on slave pty"); +-#endif +-#if defined(TCSETA) +- if (ioctl(ptys[i].slave, TCSETA, &io) < 0) +- pr_fail_err("ioctl TCSETA on slave pty"); +-#endif +-#if defined(TCSETAW) +- if (ioctl(ptys[i].slave, TCSETAW, &io) < 0) +- pr_fail_err("ioctl TCSETAW on slave pty"); +-#endif +-#if defined(TCSETAF) +- if (ioctl(ptys[i].slave, TCSETAF, &io) < 0) +- pr_fail_err("ioctl TCSETAF on slave pty"); +-#endif + #if defined(TIOCGLCKTRMIOS) + if (ioctl(ptys[i].slave, TIOCGLCKTRMIOS, &ios) < 0) + pr_fail_err("ioctl TIOCGLCKTRMIOS on slave pty"); +diff --git a/stress-resources.c b/stress-resources.c +index 958c99a..af79abd 100644 +--- a/stress-resources.c ++++ b/stress-resources.c +@@ -31,7 +31,6 @@ + #include <sys/inotify.h> + #endif + #if defined(__linux__) +-#include <termio.h> + #include <termios.h> + #endif + #if defined(HAVE_LIB_PTHREAD) && defined(__linux__) +diff --git a/stress-stackmmap.c b/stress-stackmmap.c +index 9c83a69..2984f09 100644 +--- a/stress-stackmmap.c ++++ b/stress-stackmmap.c +@@ -24,7 +24,7 @@ + */ + #include "stress-ng.h" + +-#if defined(__linux__) ++#if defined(__linux__) && False + + #include <ucontext.h> + diff --git a/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0002-stress-fcntl-fix-build-for-musl.patch b/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0002-stress-fcntl-fix-build-for-musl.patch new file mode 100644 index 000000000..ed3287e32 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0002-stress-fcntl-fix-build-for-musl.patch @@ -0,0 +1,25 @@ +From faadbc147394cea9278bc2494f33e3521d88e742 Mon Sep 17 00:00:00 2001 +From: Tim Orling <timothy.t.orling@linux.intel.com> +Date: Tue, 9 Jan 2018 18:38:45 -0800 +Subject: [PATCH] stress-fcntl: fix build for musl + +Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> + +Upstream-status: Pending + +--- + stress-fcntl.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/stress-fcntl.c b/stress-fcntl.c +index 2ea867b..e91b345 100644 +--- a/stress-fcntl.c ++++ b/stress-fcntl.c +@@ -415,6 +415,7 @@ ofd_lock_abort: { /* Nowt */ } + #if (defined(F_GET_FILE_RW_HINT) && defined(F_SET_FILE_RW_HINT)) | \ + (defined(F_GET_RW_HINT) && defined(F_SET_RW_HINT)) + { ++ int ret; + size_t i; + unsigned long hint; + static const unsigned long hints[] = { diff --git a/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng_0.09.14.bb b/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng_0.09.14.bb new file mode 100644 index 000000000..7fab43025 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng_0.09.14.bb @@ -0,0 +1,25 @@ +SUMMARY = "A tool to load and stress a computer system" +HOMEPAGE = "http://kernel.ubuntu.com/~cking/stress-ng/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "zlib libaio" + +SRC_URI = "http://kernel.ubuntu.com/~cking/tarballs/${BPN}/${BP}.tar.xz \ + file://0002-stress-fcntl-fix-build-for-musl.patch \ + " +SRC_URI_append_libc-musl = " \ + file://0001-Several-changes-to-fix-musl-build.patch \ + " +SRC_URI[md5sum] = "1f8b6c2c2830704d2a2814c16082d48e" +SRC_URI[sha256sum] = "02cac34a5cb041197af60c1867844c6cbb089a6d10a38cdcf7b8f27bfaa6ef8f" + +UPSTREAM_CHECK_URI ?= "http://kernel.ubuntu.com/~cking/tarballs/${BPN}/" +UPSTREAM_CHECK_REGEX ?= "(?P<pver>\d+(\.\d+)+)\.tar" + +CFLAGS += "-Wall -Wextra -DVERSION='"$(VERSION)"'" + +do_install_append() { + install -d ${D}${bindir} + install -m 755 ${S}/stress-ng ${D}${bindir}/stress-ng +} diff --git a/meta-openembedded/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch b/meta-openembedded/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch new file mode 100644 index 000000000..71782c5b9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch @@ -0,0 +1,348 @@ +Upstream-Status: Inappropriate [configuration] + +From 07f2528d93f44fe1d8080a4225f29f4ada9f4663 Mon Sep 17 00:00:00 2001 +From: Fabio Berton <fabio.berton@ossystems.com.br> +Date: Thu, 4 Feb 2016 09:15:37 -0200 +Subject: [PATCH 1/2] Makefile for cross compile SoftFloat + +Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> +--- + SoftFloat-3a/build/Linux-Cross-Compile/Makefile | 274 ++++++++++++++++++++++ + SoftFloat-3a/build/Linux-Cross-Compile/platform.h | 44 ++++ + 2 files changed, 318 insertions(+) + create mode 100644 SoftFloat-3a/build/Linux-Cross-Compile/Makefile + create mode 100644 SoftFloat-3a/build/Linux-Cross-Compile/platform.h + +diff --git a/SoftFloat-3a/build/Linux-Cross-Compile/Makefile b/SoftFloat-3a/build/Linux-Cross-Compile/Makefile +new file mode 100644 +index 0000000..c4d0a60 +--- /dev/null ++++ b/SoftFloat-3a/build/Linux-Cross-Compile/Makefile +@@ -0,0 +1,274 @@ ++ ++#============================================================================= ++# ++# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic ++# Package, Release 3a, by John R. Hauser. ++# ++# Copyright 2011, 2012, 2013, 2014 The Regents of the University of ++# California. All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are met: ++# ++# 1. Redistributions of source code must retain the above copyright notice, ++# this list of conditions, and the following disclaimer. ++# ++# 2. Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions, and the following disclaimer in the ++# documentation and/or other materials provided with the distribution. ++# ++# 3. Neither the name of the University nor the names of its contributors ++# may be used to endorse or promote products derived from this software ++# without specific prior written permission. ++# ++# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY ++# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE ++# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY ++# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++# ++#============================================================================= ++ ++SOURCE_DIR = ../../source ++SPECIALIZE_TYPE = 8086 ++ ++SOFTFLOAT_OPTS = -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV64TO32 -fgnu89-inline ++ ++DELETE = rm -f ++C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include ++COMPILE_C = \ ++ ${CC} -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \ ++ $(C_INCLUDES) -O2 -o $@ ++MAKELIB = ${AR} crs $@ ++ ++OBJ = .o ++LIB = .a ++ ++.PHONY: all ++all: softfloat$(LIB) ++ ++OBJS_PRIMITIVES = \ ++ s_compare96M$(OBJ) \ ++ s_compare128M$(OBJ) \ ++ s_shortShiftLeft64To96M$(OBJ) \ ++ s_shortShiftLeftM$(OBJ) \ ++ s_shiftLeftM$(OBJ) \ ++ s_shortShiftRightM$(OBJ) \ ++ s_shortShiftRightJam64$(OBJ) \ ++ s_shortShiftRightJamM$(OBJ) \ ++ s_shiftRightJam32$(OBJ) \ ++ s_shiftRightJam64$(OBJ) \ ++ s_shiftRightJamM$(OBJ) \ ++ s_shiftRightM$(OBJ) \ ++ s_countLeadingZeros8$(OBJ) \ ++ s_countLeadingZeros32$(OBJ) \ ++ s_countLeadingZeros64$(OBJ) \ ++ s_addM$(OBJ) \ ++ s_addCarryM$(OBJ) \ ++ s_addComplCarryM$(OBJ) \ ++ s_negXM$(OBJ) \ ++ s_sub1XM$(OBJ) \ ++ s_subM$(OBJ) \ ++ s_mul64To128M$(OBJ) \ ++ s_mul128MTo256M$(OBJ) \ ++ s_approxRecip32_1$(OBJ) \ ++ s_approxRecipSqrt32_1$(OBJ) \ ++ s_remStepMBy32$(OBJ) \ ++ ++OBJS_SPECIALIZE = \ ++ softfloat_raiseFlags$(OBJ) \ ++ s_f32UIToCommonNaN$(OBJ) \ ++ s_commonNaNToF32UI$(OBJ) \ ++ s_propagateNaNF32UI$(OBJ) \ ++ s_f64UIToCommonNaN$(OBJ) \ ++ s_commonNaNToF64UI$(OBJ) \ ++ s_propagateNaNF64UI$(OBJ) \ ++ extF80M_isSignalingNaN$(OBJ) \ ++ s_extF80MToCommonNaN$(OBJ) \ ++ s_commonNaNToExtF80M$(OBJ) \ ++ s_propagateNaNExtF80M$(OBJ) \ ++ f128M_isSignalingNaN$(OBJ) \ ++ s_f128MToCommonNaN$(OBJ) \ ++ s_commonNaNToF128M$(OBJ) \ ++ s_propagateNaNF128M$(OBJ) \ ++ ++OBJS_OTHERS = \ ++ s_roundPackToUI32$(OBJ) \ ++ s_roundPackMToUI64$(OBJ) \ ++ s_roundPackToI32$(OBJ) \ ++ s_roundPackMToI64$(OBJ) \ ++ s_normSubnormalF32Sig$(OBJ) \ ++ s_roundPackToF32$(OBJ) \ ++ s_normRoundPackToF32$(OBJ) \ ++ s_addMagsF32$(OBJ) \ ++ s_subMagsF32$(OBJ) \ ++ s_mulAddF32$(OBJ) \ ++ s_normSubnormalF64Sig$(OBJ) \ ++ s_roundPackToF64$(OBJ) \ ++ s_normRoundPackToF64$(OBJ) \ ++ s_addMagsF64$(OBJ) \ ++ s_subMagsF64$(OBJ) \ ++ s_mulAddF64$(OBJ) \ ++ s_tryPropagateNaNExtF80M$(OBJ) \ ++ s_invalidExtF80M$(OBJ) \ ++ s_normExtF80SigM$(OBJ) \ ++ s_roundPackMToExtF80M$(OBJ) \ ++ s_normRoundPackMToExtF80M$(OBJ) \ ++ s_addExtF80M$(OBJ) \ ++ s_compareNonnormExtF80M$(OBJ) \ ++ s_isNaNF128M$(OBJ) \ ++ s_tryPropagateNaNF128M$(OBJ) \ ++ s_invalidF128M$(OBJ) \ ++ s_shiftNormSigF128M$(OBJ) \ ++ s_roundPackMToF128M$(OBJ) \ ++ s_normRoundPackMToF128M$(OBJ) \ ++ s_addF128M$(OBJ) \ ++ s_mulAddF128M$(OBJ) \ ++ softfloat_state$(OBJ) \ ++ ui32_to_f32$(OBJ) \ ++ ui32_to_f64$(OBJ) \ ++ ui32_to_extF80M$(OBJ) \ ++ ui32_to_f128M$(OBJ) \ ++ ui64_to_f32$(OBJ) \ ++ ui64_to_f64$(OBJ) \ ++ ui64_to_extF80M$(OBJ) \ ++ ui64_to_f128M$(OBJ) \ ++ i32_to_f32$(OBJ) \ ++ i32_to_f64$(OBJ) \ ++ i32_to_extF80M$(OBJ) \ ++ i32_to_f128M$(OBJ) \ ++ i64_to_f32$(OBJ) \ ++ i64_to_f64$(OBJ) \ ++ i64_to_extF80M$(OBJ) \ ++ i64_to_f128M$(OBJ) \ ++ f32_to_ui32$(OBJ) \ ++ f32_to_ui64$(OBJ) \ ++ f32_to_i32$(OBJ) \ ++ f32_to_i64$(OBJ) \ ++ f32_to_ui32_r_minMag$(OBJ) \ ++ f32_to_ui64_r_minMag$(OBJ) \ ++ f32_to_i32_r_minMag$(OBJ) \ ++ f32_to_i64_r_minMag$(OBJ) \ ++ f32_to_f64$(OBJ) \ ++ f32_to_extF80M$(OBJ) \ ++ f32_to_f128M$(OBJ) \ ++ f32_roundToInt$(OBJ) \ ++ f32_add$(OBJ) \ ++ f32_sub$(OBJ) \ ++ f32_mul$(OBJ) \ ++ f32_mulAdd$(OBJ) \ ++ f32_div$(OBJ) \ ++ f32_rem$(OBJ) \ ++ f32_sqrt$(OBJ) \ ++ f32_eq$(OBJ) \ ++ f32_le$(OBJ) \ ++ f32_lt$(OBJ) \ ++ f32_eq_signaling$(OBJ) \ ++ f32_le_quiet$(OBJ) \ ++ f32_lt_quiet$(OBJ) \ ++ f32_isSignalingNaN$(OBJ) \ ++ f64_to_ui32$(OBJ) \ ++ f64_to_ui64$(OBJ) \ ++ f64_to_i32$(OBJ) \ ++ f64_to_i64$(OBJ) \ ++ f64_to_ui32_r_minMag$(OBJ) \ ++ f64_to_ui64_r_minMag$(OBJ) \ ++ f64_to_i32_r_minMag$(OBJ) \ ++ f64_to_i64_r_minMag$(OBJ) \ ++ f64_to_f32$(OBJ) \ ++ f64_to_extF80M$(OBJ) \ ++ f64_to_f128M$(OBJ) \ ++ f64_roundToInt$(OBJ) \ ++ f64_add$(OBJ) \ ++ f64_sub$(OBJ) \ ++ f64_mul$(OBJ) \ ++ f64_mulAdd$(OBJ) \ ++ f64_div$(OBJ) \ ++ f64_rem$(OBJ) \ ++ f64_sqrt$(OBJ) \ ++ f64_eq$(OBJ) \ ++ f64_le$(OBJ) \ ++ f64_lt$(OBJ) \ ++ f64_eq_signaling$(OBJ) \ ++ f64_le_quiet$(OBJ) \ ++ f64_lt_quiet$(OBJ) \ ++ f64_isSignalingNaN$(OBJ) \ ++ extF80M_to_ui32$(OBJ) \ ++ extF80M_to_ui64$(OBJ) \ ++ extF80M_to_i32$(OBJ) \ ++ extF80M_to_i64$(OBJ) \ ++ extF80M_to_ui32_r_minMag$(OBJ) \ ++ extF80M_to_ui64_r_minMag$(OBJ) \ ++ extF80M_to_i32_r_minMag$(OBJ) \ ++ extF80M_to_i64_r_minMag$(OBJ) \ ++ extF80M_to_f32$(OBJ) \ ++ extF80M_to_f64$(OBJ) \ ++ extF80M_to_f128M$(OBJ) \ ++ extF80M_roundToInt$(OBJ) \ ++ extF80M_add$(OBJ) \ ++ extF80M_sub$(OBJ) \ ++ extF80M_mul$(OBJ) \ ++ extF80M_div$(OBJ) \ ++ extF80M_rem$(OBJ) \ ++ extF80M_sqrt$(OBJ) \ ++ extF80M_eq$(OBJ) \ ++ extF80M_le$(OBJ) \ ++ extF80M_lt$(OBJ) \ ++ extF80M_eq_signaling$(OBJ) \ ++ extF80M_le_quiet$(OBJ) \ ++ extF80M_lt_quiet$(OBJ) \ ++ f128M_to_ui32$(OBJ) \ ++ f128M_to_ui64$(OBJ) \ ++ f128M_to_i32$(OBJ) \ ++ f128M_to_i64$(OBJ) \ ++ f128M_to_ui32_r_minMag$(OBJ) \ ++ f128M_to_ui64_r_minMag$(OBJ) \ ++ f128M_to_i32_r_minMag$(OBJ) \ ++ f128M_to_i64_r_minMag$(OBJ) \ ++ f128M_to_f32$(OBJ) \ ++ f128M_to_f64$(OBJ) \ ++ f128M_to_extF80M$(OBJ) \ ++ f128M_roundToInt$(OBJ) \ ++ f128M_add$(OBJ) \ ++ f128M_sub$(OBJ) \ ++ f128M_mul$(OBJ) \ ++ f128M_mulAdd$(OBJ) \ ++ f128M_div$(OBJ) \ ++ f128M_rem$(OBJ) \ ++ f128M_sqrt$(OBJ) \ ++ f128M_eq$(OBJ) \ ++ f128M_le$(OBJ) \ ++ f128M_lt$(OBJ) \ ++ f128M_eq_signaling$(OBJ) \ ++ f128M_le_quiet$(OBJ) \ ++ f128M_lt_quiet$(OBJ) \ ++ ++OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) ++ ++$(OBJS_ALL): \ ++ platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ ++ $(SOURCE_DIR)/include/primitives.h ++$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ ++ $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ ++ $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ ++ $(SOURCE_DIR)/include/softfloat.h ++ ++$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c ++ $(COMPILE_C) $(SOURCE_DIR)/$*.c ++ ++$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c ++ $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c ++ ++softfloat$(LIB): $(OBJS_ALL) ++ $(DELETE) $@ ++ $(MAKELIB) $^ ++ ++.PHONY: clean ++clean: ++ $(DELETE) $(OBJS_ALL) softfloat$(LIB) ++ +diff --git a/SoftFloat-3a/build/Linux-Cross-Compile/platform.h b/SoftFloat-3a/build/Linux-Cross-Compile/platform.h +new file mode 100644 +index 0000000..5e566fc +--- /dev/null ++++ b/SoftFloat-3a/build/Linux-Cross-Compile/platform.h +@@ -0,0 +1,44 @@ ++ ++/*============================================================================ ++ ++This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic ++Package, Release 3a, by John R. Hauser. ++ ++Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ ++ 1. Redistributions of source code must retain the above copyright notice, ++ this list of conditions, and the following disclaimer. ++ ++ 2. Redistributions in binary form must reproduce the above copyright notice, ++ this list of conditions, and the following disclaimer in the documentation ++ and/or other materials provided with the distribution. ++ ++ 3. Neither the name of the University nor the names of its contributors may ++ be used to endorse or promote products derived from this software without ++ specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY ++EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE ++DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY ++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++*----------------------------------------------------------------------------*/ ++#define LITTLEENDIAN 1 ++ ++/*---------------------------------------------------------------------------- ++*----------------------------------------------------------------------------*/ ++#define INLINE extern inline ++ +-- +2.1.4 + diff --git a/meta-openembedded/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch b/meta-openembedded/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch new file mode 100644 index 000000000..71ca343cc --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch @@ -0,0 +1,396 @@ +Upstream-Status: Inappropriate [configuration] + +From 9aa4a416f05967320c1aa52bdccfe105a3bf3269 Mon Sep 17 00:00:00 2001 +From: Fabio Berton <fabio.berton@ossystems.com.br> +Date: Thu, 4 Feb 2016 09:16:09 -0200 +Subject: [PATCH 2/2] Makefile for cross compile TestFloat + +Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> +--- + TestFloat-3a/build/Linux-Cross-Compile/Makefile | 321 ++++++++++++++++++++++ + TestFloat-3a/build/Linux-Cross-Compile/platform.h | 45 +++ + 2 files changed, 366 insertions(+) + create mode 100644 TestFloat-3a/build/Linux-Cross-Compile/Makefile + create mode 100644 TestFloat-3a/build/Linux-Cross-Compile/platform.h + +diff --git a/TestFloat-3a/build/Linux-Cross-Compile/Makefile b/TestFloat-3a/build/Linux-Cross-Compile/Makefile +new file mode 100644 +index 0000000..a89326a +--- /dev/null ++++ b/TestFloat-3a/build/Linux-Cross-Compile/Makefile +@@ -0,0 +1,321 @@ ++ ++#============================================================================= ++# ++# This Makefile is part of TestFloat, Release 3a, a package of programs for ++# testing the correctness of floating-point arithmetic complying with the IEEE ++# Standard for Floating-Point, by John R. Hauser. ++# ++# Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of ++# California. All rights reserved. ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are met: ++# ++# 1. Redistributions of source code must retain the above copyright notice, ++# this list of conditions, and the following disclaimer. ++# ++# 2. Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions, and the following disclaimer in the ++# documentation and/or other materials provided with the distribution. ++# ++# 3. Neither the name of the University nor the names of its contributors ++# may be used to endorse or promote products derived from this software ++# without specific prior written permission. ++# ++# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY ++# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE ++# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY ++# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++# ++#============================================================================= ++ ++SOURCE_DIR = ../../source ++SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C ++SOFTFLOAT_DIR = ../../../SoftFloat-3a ++SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include ++PLATFORM = Linux-Cross-Compile ++ ++SOFTFLOAT_H = \ ++ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \ ++ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h ++SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB) ++ ++TESTFLOAT_OPTS = -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80 -fgnu89-inline ++ ++DELETE = rm -f ++C_INCLUDES = \ ++ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR) ++COMPILE_C = \ ++ ${CC} -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ ++ $(C_INCLUDES) -O2 -o $@ ++COMPILE_SLOWFLOAT_C = \ ++ ${CC} -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ ++ $(C_INCLUDES) -O3 -o $@ ++MAKELIB = ${AR} crs $@ ++LINK = ${CC} -o $@ ${LDFLAGS} ++OTHER_LIBS = -lm ++ ++OBJ = .o ++LIB = .a ++EXE = ++ ++.PHONY: all ++all: \ ++ testsoftfloat$(EXE) \ ++ timesoftfloat$(EXE) \ ++ testfloat_gen$(EXE) \ ++ testfloat_ver$(EXE) \ ++ testfloat$(EXE) \ ++ ++OBJS_GENCASES = \ ++ genCases_ui32$(OBJ) \ ++ genCases_ui64$(OBJ) \ ++ genCases_i32$(OBJ) \ ++ genCases_i64$(OBJ) \ ++ genCases_f32$(OBJ) \ ++ genCases_f64$(OBJ) \ ++ genCases_extF80$(OBJ) \ ++ genCases_f128$(OBJ) \ ++ ++OBJS_WRITECASE = \ ++ writeCase_a_ui32$(OBJ) \ ++ writeCase_a_ui64$(OBJ) \ ++ writeCase_a_f32$(OBJ) \ ++ writeCase_ab_f32$(OBJ) \ ++ writeCase_abc_f32$(OBJ) \ ++ writeCase_a_f64$(OBJ) \ ++ writeCase_ab_f64$(OBJ) \ ++ writeCase_abc_f64$(OBJ) \ ++ writeCase_a_extF80M$(OBJ) \ ++ writeCase_ab_extF80M$(OBJ) \ ++ writeCase_abc_extF80M$(OBJ) \ ++ writeCase_a_f128M$(OBJ) \ ++ writeCase_ab_f128M$(OBJ) \ ++ writeCase_abc_f128M$(OBJ) \ ++ writeCase_z_bool$(OBJ) \ ++ writeCase_z_ui32$(OBJ) \ ++ writeCase_z_ui64$(OBJ) \ ++ writeCase_z_f32$(OBJ) \ ++ writeCase_z_f64$(OBJ) \ ++ writeCase_z_extF80M$(OBJ) \ ++ writeCase_z_f128M$(OBJ) \ ++ ++OBJS_TEST = \ ++ test_a_ui32_z_f32$(OBJ) \ ++ test_a_ui32_z_f64$(OBJ) \ ++ test_a_ui32_z_extF80$(OBJ) \ ++ test_a_ui32_z_f128$(OBJ) \ ++ test_a_ui64_z_f32$(OBJ) \ ++ test_a_ui64_z_f64$(OBJ) \ ++ test_a_ui64_z_extF80$(OBJ) \ ++ test_a_ui64_z_f128$(OBJ) \ ++ test_a_i32_z_f32$(OBJ) \ ++ test_a_i32_z_f64$(OBJ) \ ++ test_a_i32_z_extF80$(OBJ) \ ++ test_a_i32_z_f128$(OBJ) \ ++ test_a_i64_z_f32$(OBJ) \ ++ test_a_i64_z_f64$(OBJ) \ ++ test_a_i64_z_extF80$(OBJ) \ ++ test_a_i64_z_f128$(OBJ) \ ++ test_a_f32_z_ui32_rx$(OBJ) \ ++ test_a_f32_z_ui64_rx$(OBJ) \ ++ test_a_f32_z_i32_rx$(OBJ) \ ++ test_a_f32_z_i64_rx$(OBJ) \ ++ test_a_f32_z_ui32_x$(OBJ) \ ++ test_a_f32_z_ui64_x$(OBJ) \ ++ test_a_f32_z_i32_x$(OBJ) \ ++ test_a_f32_z_i64_x$(OBJ) \ ++ test_a_f32_z_f64$(OBJ) \ ++ test_a_f32_z_extF80$(OBJ) \ ++ test_a_f32_z_f128$(OBJ) \ ++ test_az_f32$(OBJ) \ ++ test_az_f32_rx$(OBJ) \ ++ test_abz_f32$(OBJ) \ ++ test_abcz_f32$(OBJ) \ ++ test_ab_f32_z_bool$(OBJ) \ ++ test_a_f64_z_ui32_rx$(OBJ) \ ++ test_a_f64_z_ui64_rx$(OBJ) \ ++ test_a_f64_z_i32_rx$(OBJ) \ ++ test_a_f64_z_i64_rx$(OBJ) \ ++ test_a_f64_z_ui32_x$(OBJ) \ ++ test_a_f64_z_ui64_x$(OBJ) \ ++ test_a_f64_z_i32_x$(OBJ) \ ++ test_a_f64_z_i64_x$(OBJ) \ ++ test_a_f64_z_f32$(OBJ) \ ++ test_a_f64_z_extF80$(OBJ) \ ++ test_a_f64_z_f128$(OBJ) \ ++ test_az_f64$(OBJ) \ ++ test_az_f64_rx$(OBJ) \ ++ test_abz_f64$(OBJ) \ ++ test_abcz_f64$(OBJ) \ ++ test_ab_f64_z_bool$(OBJ) \ ++ test_a_extF80_z_ui32_rx$(OBJ) \ ++ test_a_extF80_z_ui64_rx$(OBJ) \ ++ test_a_extF80_z_i32_rx$(OBJ) \ ++ test_a_extF80_z_i64_rx$(OBJ) \ ++ test_a_extF80_z_ui32_x$(OBJ) \ ++ test_a_extF80_z_ui64_x$(OBJ) \ ++ test_a_extF80_z_i32_x$(OBJ) \ ++ test_a_extF80_z_i64_x$(OBJ) \ ++ test_a_extF80_z_f32$(OBJ) \ ++ test_a_extF80_z_f64$(OBJ) \ ++ test_a_extF80_z_f128$(OBJ) \ ++ test_az_extF80$(OBJ) \ ++ test_az_extF80_rx$(OBJ) \ ++ test_abz_extF80$(OBJ) \ ++ test_ab_extF80_z_bool$(OBJ) \ ++ test_a_f128_z_ui32_rx$(OBJ) \ ++ test_a_f128_z_ui64_rx$(OBJ) \ ++ test_a_f128_z_i32_rx$(OBJ) \ ++ test_a_f128_z_i64_rx$(OBJ) \ ++ test_a_f128_z_ui32_x$(OBJ) \ ++ test_a_f128_z_ui64_x$(OBJ) \ ++ test_a_f128_z_i32_x$(OBJ) \ ++ test_a_f128_z_i64_x$(OBJ) \ ++ test_a_f128_z_f32$(OBJ) \ ++ test_a_f128_z_f64$(OBJ) \ ++ test_a_f128_z_extF80$(OBJ) \ ++ test_az_f128$(OBJ) \ ++ test_az_f128_rx$(OBJ) \ ++ test_abz_f128$(OBJ) \ ++ test_abcz_f128$(OBJ) \ ++ test_ab_f128_z_bool$(OBJ) \ ++ ++OBJS_LIB = \ ++ uint128$(OBJ) \ ++ fail$(OBJ) \ ++ functions_common$(OBJ) \ ++ functionInfos$(OBJ) \ ++ standardFunctionInfos$(OBJ) \ ++ random$(OBJ) \ ++ genCases_common$(OBJ) \ ++ $(OBJS_GENCASES) \ ++ genCases_writeTestsTotal$(OBJ) \ ++ verCases_common$(OBJ) \ ++ verCases_writeFunctionName$(OBJ) \ ++ readHex$(OBJ) \ ++ writeHex$(OBJ) \ ++ $(OBJS_WRITECASE) \ ++ testLoops_common$(OBJ) \ ++ $(OBJS_TEST) \ ++ ++uint128$(OBJ): $(SOURCE_DIR)/uint128.h ++fail$(OBJ): $(SOURCE_DIR)/fail.h ++functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h ++functionInfos$(OBJ): $(SOURCE_DIR)/functions.h ++standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h ++random$(OBJ): $(SOURCE_DIR)/random.h ++genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h ++$(OBJS_GENCASES): \ ++ $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h ++genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h ++genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h ++verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h ++verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h ++readHex$(OBJ): $(SOURCE_DIR)/readHex.h ++writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h ++$(OBJS_WRITECASE): \ ++ $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h ++testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h ++$(OBJS_TEST): \ ++ $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \ ++ $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h ++$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c ++ $(COMPILE_C) $(SOURCE_DIR)/$*.c ++testfloat$(LIB): $(OBJS_LIB) ++ $(MAKELIB) $^ ++ ++OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ) ++ ++slowfloat$(OBJ): \ ++ platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \ ++ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c ++ $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c ++testsoftfloat$(OBJ): \ ++ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ ++ $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \ ++ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \ ++ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c ++ $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c ++ ++testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB) ++ $(LINK) $^ $(OTHER_LIBS) ++ ++OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ) ++ ++timesoftfloat$(OBJ): \ ++ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ ++ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c ++ $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c ++ ++timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB) ++ $(LINK) $^ $(OTHER_LIBS) ++ ++OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ) ++ ++genLoops$(OBJ): \ ++ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ ++ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \ ++ $(SOURCE_DIR)/genLoops.c ++ $(COMPILE_C) $(SOURCE_DIR)/genLoops.c ++testfloat_gen$(OBJ): \ ++ $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \ ++ $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \ ++ $(SOURCE_DIR)/testfloat_gen.c ++ $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c ++ ++testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB) ++ $(LINK) $^ $(OTHER_LIBS) ++ ++OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ) ++ ++verLoops$(OBJ): \ ++ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ ++ $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \ ++ $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c ++ $(COMPILE_C) $(SOURCE_DIR)/verLoops.c ++testfloat_ver$(OBJ): \ ++ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ ++ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \ ++ $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \ ++ $(SOURCE_DIR)/testfloat_ver.c ++ $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c ++ ++testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB) ++ $(LINK) $^ $(OTHER_LIBS) ++ ++OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ) ++ ++subjfloat$(OBJ): \ ++ platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \ ++ $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c ++ $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c ++subjfloat_functions$(OBJ): \ ++ platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \ ++ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c ++ $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c ++testfloat$(OBJ): \ ++ platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ ++ $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \ ++ $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \ ++ $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c ++ $(COMPILE_C) $(SOURCE_DIR)/testfloat.c ++ ++testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB) ++ $(LINK) $^ $(OTHER_LIBS) ++ ++.PHONY: clean ++clean: ++ $(DELETE) $(OBJS_LIB) testfloat$(LIB) ++ $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE) ++ $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE) ++ $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE) ++ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE) ++ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE) ++ +diff --git a/TestFloat-3a/build/Linux-Cross-Compile/platform.h b/TestFloat-3a/build/Linux-Cross-Compile/platform.h +new file mode 100644 +index 0000000..09e63a0 +--- /dev/null ++++ b/TestFloat-3a/build/Linux-Cross-Compile/platform.h +@@ -0,0 +1,45 @@ ++ ++/*============================================================================ ++ ++This C header file is part of TestFloat, Release 3a, a package of programs for ++testing the correctness of floating-point arithmetic complying with the IEEE ++Standard for Floating-Point, by John R. Hauser. ++ ++Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ ++ 1. Redistributions of source code must retain the above copyright notice, ++ this list of conditions, and the following disclaimer. ++ ++ 2. Redistributions in binary form must reproduce the above copyright notice, ++ this list of conditions, and the following disclaimer in the documentation ++ and/or other materials provided with the distribution. ++ ++ 3. Neither the name of the University nor the names of its contributors may ++ be used to endorse or promote products derived from this software without ++ specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY ++EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE ++DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY ++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++=============================================================================*/ ++ ++/*---------------------------------------------------------------------------- ++*----------------------------------------------------------------------------*/ ++#define LITTLEENDIAN 1 ++ ++/*---------------------------------------------------------------------------- ++*----------------------------------------------------------------------------*/ ++#define INLINE extern inline ++ +-- +2.1.4 + diff --git a/meta-openembedded/meta-oe/recipes-test/testfloat/testfloat_3a.bb b/meta-openembedded/meta-oe/recipes-test/testfloat/testfloat_3a.bb new file mode 100644 index 000000000..28e967762 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-test/testfloat/testfloat_3a.bb @@ -0,0 +1,35 @@ +DESCRIPTION = "Berkeley TestFloat is a small collection of programs for \ + testing that an implementation of binary floating-point conforms to the \ + IEEE Standard for Floating-Point Arithmetic." + +HOMEPAGE = "http://www.jhauser.us/arithmetic/TestFloat.html" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://TestFloat-${PV}/COPYING.txt;md5=e45c175a323b5727777fb6bd4b26eafc" + +SRC_URI = "\ + http://www.jhauser.us/arithmetic/TestFloat-3a.zip;name=TestFloat \ + http://www.jhauser.us/arithmetic/SoftFloat-3a.zip;name=SoftFloat \ + file://0001-Makefile-for-cross-compile-SoftFloat.patch \ + file://0002-Makefile-for-cross-compile-TestFloat.patch \ +" +SRC_URI[TestFloat.md5sum] = "5a124e85ab74c5e52da27d401cea6cc3" +SRC_URI[TestFloat.sha256sum] = "fa258b5b3c751656a372051adee4183e19ad4763032322eb7a87dfb9e2c22c75" +SRC_URI[SoftFloat.md5sum] = "e53bd4550cf99690642c41374d188517" +SRC_URI[SoftFloat.sha256sum] = "946fd23180559d60eb6683dda1cf8b142f5426dedfefb97b03c6afdfd70ee9e0" + +S = "${WORKDIR}" + +do_compile(){ + oe_runmake -C SoftFloat-${PV}/build/Linux-Cross-Compile/ + oe_runmake -C TestFloat-${PV}/build/Linux-Cross-Compile/ +} + +do_install(){ + install -d ${D}/${bindir} + install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/testfloat ${D}/${bindir} + install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/testfloat_gen ${D}/${bindir} + install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/testfloat_ver ${D}/${bindir} + install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/testsoftfloat ${D}/${bindir} + install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/timesoftfloat ${D}/${bindir} +} |