tss-testsuite: update to the latest and code style fixup

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
This commit is contained in:
Lans Zhang
2017-07-20 13:32:44 +08:00
parent 9ee97956a6
commit d5ea27e293
4 changed files with 66 additions and 99 deletions
@@ -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
@@ -1,25 +0,0 @@
From 93f3d150cc1147997be4401b5a14c5bb3120bf0a Mon Sep 17 00:00:00 2001
From: Yang, Xiao <xiao.yang@windriver.com>
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
@@ -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"
@@ -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"