diff options
author | Lans Zhang <jia.zhang@windriver.com> | 2017-07-20 13:32:44 +0800 |
---|---|---|
committer | Lans Zhang <jia.zhang@windriver.com> | 2017-07-20 13:32:44 +0800 |
commit | d5ea27e293506333cc23548f763d66f986d5a1ee (patch) | |
tree | 0b0a959986c502eba29e6dc03bfab34338730ae4 | |
parent | 9ee97956a6fc209fa1c380ecd065ce2bf472d301 (diff) | |
download | meta-secure-core-d5ea27e293506333cc23548f763d66f986d5a1ee.tar.gz |
tss-testsuite: update to the latest and code style fixup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
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 @@ | |||
1 | diff --git a/tsstests.sh b/tsstests.sh | ||
2 | index 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 @@ | |||
1 | From 93f3d150cc1147997be4401b5a14c5bb3120bf0a Mon Sep 17 00:00:00 2001 | ||
2 | From: Yang, Xiao <xiao.yang@windriver.com> | ||
3 | Date: Thu, 21 Mar 2013 14:24:24 +0800 | ||
4 | Subject: [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 | |||
10 | diff --git a/tcg/transport/Makefile b/tcg/transport/Makefile | ||
11 | index 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 | -- | ||
24 | 1.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 @@ | |||
1 | SUMMARY = "Testcases to exercise the TSS stack/TSS API" | ||
2 | HOMEPAGE = "${SOURCEFORGE_MIRROR}/projects/trousers/files" | ||
3 | SECTION = "console/utils" | ||
4 | DESCRIPTION = "\ | ||
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 | |||
13 | LICENSE = "GPLv2" | ||
14 | LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" | ||
15 | |||
16 | SRC_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 | " | ||
28 | SRC_URI[md5sum] = "1ebd0e7783178abdfc8c40bc8cb8875f" | ||
29 | SRC_URI[sha256sum] = "5382539fa69cf480d44f924e54a0f2718134b26baa29137ba351a0eef4873c98" | ||
30 | |||
31 | DEPENDS = "trousers" | ||
32 | RDEPENDS_${PN} = "tpm-tools openssl bash" | ||
33 | |||
34 | CFLAGS += "-DOPENSSL_NO_DES" | ||
35 | EXTRA_OEMAKE = " -C tcg 'CC=${CC}' " | ||
36 | LDFLAGS += "-L${STAGING_LIBDIR} -lcrypto -lpthread" | ||
37 | |||
38 | S = "${WORKDIR}/testsuite-${PV}" | ||
39 | |||
40 | do_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 | |||
47 | testsuite_SUBDIRS = "cmk context data delegation hash highlevel init key nv pcrcomposite policy tpm transport tspi" | ||
48 | do_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 | |||
57 | FILES_${PN} += "/opt/*" | ||
58 | 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 @@ | |||
1 | SUMMARY = "Testcases to exercise the TSS stack/TSS API" | ||
2 | DESCRIPTION = "\ | ||
3 | These are the testcases that exercise the TSS stack. They can be run \ | ||
4 | either through the the LTP framework or standalone. The testcases \ | ||
5 | have been tested against the 20040304 version of LTP. \ | ||
6 | \ | ||
7 | Please do not execute these testcases on a machine where you are actively \ | ||
8 | using the TPM. \ | ||
9 | " | ||
10 | HOMEPAGE = "${SOURCEFORGE_MIRROR}/projects/trousers" | ||
11 | SECTION = "security/tpm" | ||
12 | |||
13 | LICENSE = "GPLv2" | ||
14 | LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" | ||
15 | |||
16 | DEPENDS = "trousers" | ||
17 | |||
18 | PV = "git${SRCPV}" | ||
19 | |||
20 | SRC_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 | " | ||
30 | SRCREV = "f8f5c8684fd18522f8b8a82c416b088e886a1b7d" | ||
31 | |||
32 | S = "${WORKDIR}/git" | ||
33 | |||
34 | EXTRA_OEMAKE = "-C tcg 'CC=${CC}'" | ||
35 | |||
36 | testsuite_SUBDIRS = "\ | ||
37 | cmk context data delegation hash highlevel init key nv \ | ||
38 | pcrcomposite policy tpm transport tspi \ | ||
39 | " | ||
40 | |||
41 | CFLAGS += "-DOPENSSL_NO_DES" | ||
42 | LDFLAGS += "-L${STAGING_LIBDIR} -lcrypto -lpthread" | ||
43 | |||
44 | do_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 | |||
51 | do_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 | |||
60 | FILES_${PN} += "/opt/*" | ||
61 | FILES_${PN}-dbg += "\ | ||
62 | /opt/tss-testsuite/tcg/*/.debug \ | ||
63 | /opt/tss-testsuite/tcg/*/*/.debug \ | ||
64 | " | ||
65 | |||
66 | RDEPENDS_${PN} += "tpm-tools openssl bash" | ||