From d5ea27e293506333cc23548f763d66f986d5a1ee Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Thu, 20 Jul 2017 13:32:44 +0800 Subject: tss-testsuite: update to the latest and code style fixup Signed-off-by: Lans Zhang --- .../files/fix-hardcode-path-in-tsstests.sh.patch | 16 ------ ...x-missing-LDFLAGS-in-compile-command-line.patch | 25 -------- .../recipes-tpm/tss-testsuite/tss-testsuite_0.3.bb | 58 ------------------- .../recipes-tpm/tss-testsuite/tss-testsuite_git.bb | 66 ++++++++++++++++++++++ 4 files changed, 66 insertions(+), 99 deletions(-) delete mode 100644 meta-tpm/recipes-tpm/tss-testsuite/files/fix-hardcode-path-in-tsstests.sh.patch delete mode 100644 meta-tpm/recipes-tpm/tss-testsuite/files/fix-missing-LDFLAGS-in-compile-command-line.patch delete mode 100644 meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_0.3.bb create mode 100644 meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_git.bb diff --git a/meta-tpm/recipes-tpm/tss-testsuite/files/fix-hardcode-path-in-tsstests.sh.patch b/meta-tpm/recipes-tpm/tss-testsuite/files/fix-hardcode-path-in-tsstests.sh.patch deleted file mode 100644 index a9e6680..0000000 --- a/meta-tpm/recipes-tpm/tss-testsuite/files/fix-hardcode-path-in-tsstests.sh.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/tsstests.sh b/tsstests.sh -index 6a1a5e5..ebaf6c3 100755 ---- a/tsstests.sh -+++ b/tsstests.sh -@@ -54,9 +54,9 @@ TEST_OUTPUT= - OUTPUT_FORMAT="standard" - - # this variable needs to be changed to testcases/tcg/ for ltp compatibility --TESTCASEDIR=testsuite/tcg/ -+TESTCASEDIR=tcg/ - --cd .. -+cd `dirname $0` - - export LTPTSSROOT=$PWD - diff --git a/meta-tpm/recipes-tpm/tss-testsuite/files/fix-missing-LDFLAGS-in-compile-command-line.patch b/meta-tpm/recipes-tpm/tss-testsuite/files/fix-missing-LDFLAGS-in-compile-command-line.patch deleted file mode 100644 index 3c11371..0000000 --- a/meta-tpm/recipes-tpm/tss-testsuite/files/fix-missing-LDFLAGS-in-compile-command-line.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 93f3d150cc1147997be4401b5a14c5bb3120bf0a Mon Sep 17 00:00:00 2001 -From: Yang, Xiao -Date: Thu, 21 Mar 2013 14:24:24 +0800 -Subject: [PATCH] fix missing LDFLAGS in compile command line to locate libs - ---- - tcg/transport/Makefile | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/tcg/transport/Makefile b/tcg/transport/Makefile -index 7b511a0..21568dc 100644 ---- a/tcg/transport/Makefile -+++ b/tcg/transport/Makefile -@@ -27,7 +27,7 @@ else - OPTS = - endif - ALL = $(shell ls *.c | sed "s/\.c//g") --LIBS = ../common/common.o -ltspi -+LIBS = ../common/common.o -ltspi $(LDFLAGS) - CFLAGS += -g -I../include - - .c: --- -1.7.0.4 - diff --git a/meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_0.3.bb b/meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_0.3.bb deleted file mode 100644 index 81b8542..0000000 --- a/meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_0.3.bb +++ /dev/null @@ -1,58 +0,0 @@ -SUMMARY = "Testcases to exercise the TSS stack/TSS API" -HOMEPAGE = "${SOURCEFORGE_MIRROR}/projects/trousers/files" -SECTION = "console/utils" -DESCRIPTION = "\ - These are the testcases that exercise the TSS stack. They can be run \ - either through the the LTP framework or standalone. The testcases \ - have been tested against the 20040304 version of LTP. \ - \ - Please do not execute these testcases on a machine where you are actively \ - using the TPM. \ -" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" - -SRC_URI = "\ - https://sourceforge.net/projects/trousers/files/TSS%20API%20test%20suite/0.3/testsuite-${PV}.tar.gz; \ - file://fix-missing-LDFLAGS-in-compile-command-line.patch; \ - file://fix-failure-of-.so-LD-with-cortexa8t-neon-wrswrap-linux.patch; \ - file://fix-hardcode-path-in-tsstests.sh.patch \ - file://testsuite-transport-init.patch \ - file://Tspi_TPM_LoadMaintenancePubKey01.patch \ - file://transport-Tspi_TPM_Delegate.patch \ - file://common_c_no_des.patch \ - file://Tspi_TPM_CreateIdentity_no_des.patch \ - file://Tspi_TPM_CreateIdentityWithCallbacks_no_des.patch \ -" -SRC_URI[md5sum] = "1ebd0e7783178abdfc8c40bc8cb8875f" -SRC_URI[sha256sum] = "5382539fa69cf480d44f924e54a0f2718134b26baa29137ba351a0eef4873c98" - -DEPENDS = "trousers" -RDEPENDS_${PN} = "tpm-tools openssl bash" - -CFLAGS += "-DOPENSSL_NO_DES" -EXTRA_OEMAKE = " -C tcg 'CC=${CC}' " -LDFLAGS += "-L${STAGING_LIBDIR} -lcrypto -lpthread" - -S = "${WORKDIR}/testsuite-${PV}" - -do_configure_prepend () { - cp ${S}/tcg/Makefile ${S} - cp ${S}/tcg/init/makefile ${S}/tcg/init/Makefile - # remove test case about DES - rm -rf ${S}/tcg/context/Tspi_Context_GetCapability13.c -} - -testsuite_SUBDIRS = "cmk context data delegation hash highlevel init key nv pcrcomposite policy tpm transport tspi" -do_install () { - install -d ${D}/opt/tss-testsuite/tcg - for i in ${testsuite_SUBDIRS}; do \ - echo "Installing ${i}"; \ - cp -rf tcg/${i} ${D}/opt/tss-testsuite/tcg/; \ - done; - install -m 0755 tsstests.sh ${D}/opt/tss-testsuite -} - -FILES_${PN} += "/opt/*" -FILES_${PN}-dbg += "/opt/tss-testsuite/tcg/*/.debug /opt/tss-testsuite/tcg/*/*/.debug" diff --git a/meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_git.bb b/meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_git.bb new file mode 100644 index 0000000..2034370 --- /dev/null +++ b/meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_git.bb @@ -0,0 +1,66 @@ +SUMMARY = "Testcases to exercise the TSS stack/TSS API" +DESCRIPTION = "\ +These are the testcases that exercise the TSS stack. They can be run \ +either through the the LTP framework or standalone. The testcases \ +have been tested against the 20040304 version of LTP. \ +\ +Please do not execute these testcases on a machine where you are actively \ +using the TPM. \ +" +HOMEPAGE = "${SOURCEFORGE_MIRROR}/projects/trousers" +SECTION = "security/tpm" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "trousers" + +PV = "git${SRCPV}" + +SRC_URI = "\ + git://git.code.sf.net/p/trousers/testsuite \ + file://fix-failure-of-.so-LD-with-cortexa8t-neon-wrswrap-linux.patch \ + file://testsuite-transport-init.patch \ + file://Tspi_TPM_LoadMaintenancePubKey01.patch \ + file://transport-Tspi_TPM_Delegate.patch \ + file://common_c_no_des.patch \ + file://Tspi_TPM_CreateIdentity_no_des.patch \ + file://Tspi_TPM_CreateIdentityWithCallbacks_no_des.patch \ +" +SRCREV = "f8f5c8684fd18522f8b8a82c416b088e886a1b7d" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "-C tcg 'CC=${CC}'" + +testsuite_SUBDIRS = "\ + cmk context data delegation hash highlevel init key nv \ + pcrcomposite policy tpm transport tspi \ +" + +CFLAGS += "-DOPENSSL_NO_DES" +LDFLAGS += "-L${STAGING_LIBDIR} -lcrypto -lpthread" + +do_configure_prepend() { + cp -f "${S}/tcg/Makefile" "${S}" + cp -f "${S}/tcg/init/makefile" "${S}/tcg/init/Makefile" + # remove test case about DES + rm -rf "${S}/tcg/context/Tspi_Context_GetCapability13.c" +} + +do_install() { + install -d "${D}/opt/tss-testsuite/tcg" + for i in ${testsuite_SUBDIRS}; do \ + echo "Installing ${i}"; \ + cp -rf "tcg/${i}" "${D}/opt/tss-testsuite/tcg/"; \ + done; + install -m 0755 tsstests.sh "${D}/opt/tss-testsuite" +} + +FILES_${PN} += "/opt/*" +FILES_${PN}-dbg += "\ + /opt/tss-testsuite/tcg/*/.debug \ + /opt/tss-testsuite/tcg/*/*/.debug \ +" + +RDEPENDS_${PN} += "tpm-tools openssl bash" -- cgit v1.2.3-54-g00ecf