summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLans Zhang <jia.zhang@windriver.com>2017-07-20 13:32:44 +0800
committerLans Zhang <jia.zhang@windriver.com>2017-07-20 13:32:44 +0800
commitd5ea27e293506333cc23548f763d66f986d5a1ee (patch)
tree0b0a959986c502eba29e6dc03bfab34338730ae4
parent9ee97956a6fc209fa1c380ecd065ce2bf472d301 (diff)
downloadmeta-secure-core-d5ea27e293506333cc23548f763d66f986d5a1ee.tar.gz
tss-testsuite: update to the latest and code style fixup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
-rw-r--r--meta-tpm/recipes-tpm/tss-testsuite/files/fix-hardcode-path-in-tsstests.sh.patch16
-rw-r--r--meta-tpm/recipes-tpm/tss-testsuite/files/fix-missing-LDFLAGS-in-compile-command-line.patch25
-rw-r--r--meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_0.3.bb58
-rw-r--r--meta-tpm/recipes-tpm/tss-testsuite/tss-testsuite_git.bb66
4 files changed, 66 insertions, 99 deletions
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 @@
1diff --git a/tsstests.sh b/tsstests.sh
2index 6a1a5e5..ebaf6c3 100755
3--- a/tsstests.sh
4+++ b/tsstests.sh
5@@ -54,9 +54,9 @@ TEST_OUTPUT=
6 OUTPUT_FORMAT="standard"
7
8 # this variable needs to be changed to testcases/tcg/ for ltp compatibility
9-TESTCASEDIR=testsuite/tcg/
10+TESTCASEDIR=tcg/
11
12-cd ..
13+cd `dirname $0`
14
15 export LTPTSSROOT=$PWD
16
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 @@
1From 93f3d150cc1147997be4401b5a14c5bb3120bf0a Mon Sep 17 00:00:00 2001
2From: Yang, Xiao <xiao.yang@windriver.com>
3Date: Thu, 21 Mar 2013 14:24:24 +0800
4Subject: [PATCH] fix missing LDFLAGS in compile command line to locate libs
5
6---
7 tcg/transport/Makefile | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/tcg/transport/Makefile b/tcg/transport/Makefile
11index 7b511a0..21568dc 100644
12--- a/tcg/transport/Makefile
13+++ b/tcg/transport/Makefile
14@@ -27,7 +27,7 @@ else
15 OPTS =
16 endif
17 ALL = $(shell ls *.c | sed "s/\.c//g")
18-LIBS = ../common/common.o -ltspi
19+LIBS = ../common/common.o -ltspi $(LDFLAGS)
20 CFLAGS += -g -I../include
21
22 .c:
23--
241.7.0.4
25
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 @@
1SUMMARY = "Testcases to exercise the TSS stack/TSS API"
2HOMEPAGE = "${SOURCEFORGE_MIRROR}/projects/trousers/files"
3SECTION = "console/utils"
4DESCRIPTION = "\
5 These are the testcases that exercise the TSS stack. They can be run \
6 either through the the LTP framework or standalone. The testcases \
7 have been tested against the 20040304 version of LTP. \
8 \
9 Please do not execute these testcases on a machine where you are actively \
10 using the TPM. \
11"
12
13LICENSE = "GPLv2"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
15
16SRC_URI = "\
17 https://sourceforge.net/projects/trousers/files/TSS%20API%20test%20suite/0.3/testsuite-${PV}.tar.gz; \
18 file://fix-missing-LDFLAGS-in-compile-command-line.patch; \
19 file://fix-failure-of-.so-LD-with-cortexa8t-neon-wrswrap-linux.patch; \
20 file://fix-hardcode-path-in-tsstests.sh.patch \
21 file://testsuite-transport-init.patch \
22 file://Tspi_TPM_LoadMaintenancePubKey01.patch \
23 file://transport-Tspi_TPM_Delegate.patch \
24 file://common_c_no_des.patch \
25 file://Tspi_TPM_CreateIdentity_no_des.patch \
26 file://Tspi_TPM_CreateIdentityWithCallbacks_no_des.patch \
27"
28SRC_URI[md5sum] = "1ebd0e7783178abdfc8c40bc8cb8875f"
29SRC_URI[sha256sum] = "5382539fa69cf480d44f924e54a0f2718134b26baa29137ba351a0eef4873c98"
30
31DEPENDS = "trousers"
32RDEPENDS_${PN} = "tpm-tools openssl bash"
33
34CFLAGS += "-DOPENSSL_NO_DES"
35EXTRA_OEMAKE = " -C tcg 'CC=${CC}' "
36LDFLAGS += "-L${STAGING_LIBDIR} -lcrypto -lpthread"
37
38S = "${WORKDIR}/testsuite-${PV}"
39
40do_configure_prepend () {
41 cp ${S}/tcg/Makefile ${S}
42 cp ${S}/tcg/init/makefile ${S}/tcg/init/Makefile
43 # remove test case about DES
44 rm -rf ${S}/tcg/context/Tspi_Context_GetCapability13.c
45}
46
47testsuite_SUBDIRS = "cmk context data delegation hash highlevel init key nv pcrcomposite policy tpm transport tspi"
48do_install () {
49 install -d ${D}/opt/tss-testsuite/tcg
50 for i in ${testsuite_SUBDIRS}; do \
51 echo "Installing ${i}"; \
52 cp -rf tcg/${i} ${D}/opt/tss-testsuite/tcg/; \
53 done;
54 install -m 0755 tsstests.sh ${D}/opt/tss-testsuite
55}
56
57FILES_${PN} += "/opt/*"
58FILES_${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 @@
1SUMMARY = "Testcases to exercise the TSS stack/TSS API"
2DESCRIPTION = "\
3These are the testcases that exercise the TSS stack. They can be run \
4either through the the LTP framework or standalone. The testcases \
5have been tested against the 20040304 version of LTP. \
6\
7Please do not execute these testcases on a machine where you are actively \
8using the TPM. \
9"
10HOMEPAGE = "${SOURCEFORGE_MIRROR}/projects/trousers"
11SECTION = "security/tpm"
12
13LICENSE = "GPLv2"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
15
16DEPENDS = "trousers"
17
18PV = "git${SRCPV}"
19
20SRC_URI = "\
21 git://git.code.sf.net/p/trousers/testsuite \
22 file://fix-failure-of-.so-LD-with-cortexa8t-neon-wrswrap-linux.patch \
23 file://testsuite-transport-init.patch \
24 file://Tspi_TPM_LoadMaintenancePubKey01.patch \
25 file://transport-Tspi_TPM_Delegate.patch \
26 file://common_c_no_des.patch \
27 file://Tspi_TPM_CreateIdentity_no_des.patch \
28 file://Tspi_TPM_CreateIdentityWithCallbacks_no_des.patch \
29"
30SRCREV = "f8f5c8684fd18522f8b8a82c416b088e886a1b7d"
31
32S = "${WORKDIR}/git"
33
34EXTRA_OEMAKE = "-C tcg 'CC=${CC}'"
35
36testsuite_SUBDIRS = "\
37 cmk context data delegation hash highlevel init key nv \
38 pcrcomposite policy tpm transport tspi \
39"
40
41CFLAGS += "-DOPENSSL_NO_DES"
42LDFLAGS += "-L${STAGING_LIBDIR} -lcrypto -lpthread"
43
44do_configure_prepend() {
45 cp -f "${S}/tcg/Makefile" "${S}"
46 cp -f "${S}/tcg/init/makefile" "${S}/tcg/init/Makefile"
47 # remove test case about DES
48 rm -rf "${S}/tcg/context/Tspi_Context_GetCapability13.c"
49}
50
51do_install() {
52 install -d "${D}/opt/tss-testsuite/tcg"
53 for i in ${testsuite_SUBDIRS}; do \
54 echo "Installing ${i}"; \
55 cp -rf "tcg/${i}" "${D}/opt/tss-testsuite/tcg/"; \
56 done;
57 install -m 0755 tsstests.sh "${D}/opt/tss-testsuite"
58}
59
60FILES_${PN} += "/opt/*"
61FILES_${PN}-dbg += "\
62 /opt/tss-testsuite/tcg/*/.debug \
63 /opt/tss-testsuite/tcg/*/*/.debug \
64"
65
66RDEPENDS_${PN} += "tpm-tools openssl bash"