Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Björn Stenberg" <bjst@enea.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 7/8] openssl: Add ptest
Date: Fri, 22 Feb 2013 06:05:44 -0800	[thread overview]
Message-ID: <1361541944.9309.42.camel@ted> (raw)
In-Reply-To: <1361279644-17675-8-git-send-email-bjst@enea.com>

On Tue, 2013-02-19 at 14:14 +0100, Björn Stenberg wrote:
> Signed-off-by: Björn Stenberg <bjst@enea.com>
> ---
>  .../openssl/openssl-1.0.0j/Makefiles-ptest.patch   |   74 ++++++++++++++++++++
>  .../openssl/openssl-1.0.0j/run-ptest               |    2 +
>  meta/recipes-connectivity/openssl/openssl.inc      |   19 +++++-
>  .../recipes-connectivity/openssl/openssl_1.0.0j.bb |    2 +
>  4 files changed, 96 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
>  create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
> 
> diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch b/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
> new file mode 100644
> index 0000000..e65f17b
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
> @@ -0,0 +1,74 @@
> +Add 'buildtest' and 'runtest' targets to Makefile, to build and run tests
> +cross-compiled.
> +
> +Signed-off-by: Anders Roxell <anders.roxell@enea.com>
> +Upstream-Status: Pending
> +---
> +diff -uNr a/Makefile b/Makefile
> +--- a/Makefile.org	2012-05-10 17:06:02.000000000 +0200
> ++++ b/Makefile.org	2012-10-27 00:05:55.359424024 +0200
> +@@ -411,8 +411,16 @@
> + test:   tests
> + 
> + tests: rehash
> ++	$(MAKE) buildtest
> ++	$(MAKE) runtest
> ++
> ++buildtest:
> ++	@(cd test && \
> ++	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf exe apps);
> ++
> ++runtest:
> + 	@(cd test && echo "testing..." && \
> +-	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
> ++	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf alltests );
> + 	OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
> + 
> + report:
> +diff --git a/test/Makefile b/test/Makefile
> +index 3912f82..1696767 100644
> +--- a/test/Makefile
> ++++ b/test/Makefile
> +@@ -128,7 +128,7 @@ tests:	exe apps $(TESTS)
> + apps:
> + 	@(cd ..; $(MAKE) DIRS=apps all)
> + 
> +-alltests: \
> ++all-tests= \
> + 	test_des test_idea test_sha test_md4 test_md5 test_hmac \
> + 	test_md2 test_mdc2 test_wp \
> + 	test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \
> +@@ -138,6 +138,11 @@ alltests: \
> + 	test_ss test_ca test_engine test_evp test_ssl test_tsa test_ige \
> + 	test_jpake test_cms
> + 
> ++alltests:
> ++	@(for i in $(all-tests); do \
> ++	( $(MAKE) $$i && echo "PASS: $$i" ) || echo "FAIL: $$i"; \
> ++	done)
> ++
> + test_evp:
> + 	../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
> + 
> +@@ -203,7 +208,7 @@ test_x509:
> + 	echo test second x509v3 certificate
> + 	sh ./tx509 v3-cert2.pem 2>/dev/null
> + 
> +-test_rsa: $(RSATEST)$(EXE_EXT)
> ++test_rsa:
> + 	@sh ./trsa 2>/dev/null
> + 	../util/shlib_wrap.sh ./$(RSATEST)
> + 
> +@@ -298,11 +303,11 @@ test_tsa:
> + 	  sh ./testtsa; \
> + 	fi
> + 
> +-test_ige: $(IGETEST)$(EXE_EXT)
> ++test_ige:
> + 	@echo "Test IGE mode"
> + 	../util/shlib_wrap.sh ./$(IGETEST)
> + 
> +-test_jpake: $(JPAKETEST)$(EXE_EXT)
> ++test_jpake:
> + 	@echo "Test JPAKE"
> + 	../util/shlib_wrap.sh ./$(JPAKETEST)
> diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest b/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
> new file mode 100644
> index 0000000..3b20fce
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
> @@ -0,0 +1,2 @@
> +#!/bin/sh
> +make -k runtest
> diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
> index e1e7b65..62acf95 100644
> --- a/meta/recipes-connectivity/openssl/openssl.inc
> +++ b/meta/recipes-connectivity/openssl/openssl.inc
> @@ -33,7 +33,7 @@ export DIRS = "crypto ssl apps"
>  export EX_LIBS = "-lgcc -ldl"
>  export AS = "${CC} -c"
>  
> -inherit pkgconfig siteinfo
> +inherit pkgconfig siteinfo ptest
>  
>  PACKAGES =+ "libcrypto libssl ${PN}-misc"
>  FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
> @@ -42,6 +42,8 @@ FILES_${PN} =+ " ${libdir}/ssl/*"
>  FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
>  FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
>  
> +RDEPENDS_${PN}-ptest = "openssl-misc"
> +
>  do_configure_prepend_darwin () {
>  	sed -i -e '/version-script=openssl\.ld/d' Configure
>  }
> @@ -125,6 +127,9 @@ do_configure () {
>  
>  do_compile () {
>  	oe_runmake
> +	if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ] ; then
> +	    oe_runmake buildtest
> +	fi
>  }

Final comment for now is these if checks are annoying and likely plain
wrong. I think you're trying to avoid the -native case, if so, just set
PTEST_ENABLED = 0 in native.bbclass and maybe nativesdk.bbclass
(although it would probably work there). How is this expected to work in
the multilib case? 

Cheers,

Richard




  reply	other threads:[~2013-02-22 14:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19 13:13 [PATCH 0/8] Ptest additions Björn Stenberg
2013-02-19 13:13 ` [PATCH 1/8] busybox: Add ptest Björn Stenberg
2013-02-19 14:04   ` Bernhard Reutner-Fischer
2013-02-20 14:52     ` [PATCH 1/8 v2] " Björn Stenberg
2013-02-19 13:13 ` [PATCH 2/8] zlib: " Björn Stenberg
2013-02-22 14:02   ` Richard Purdie
2013-02-22 15:56     ` Björn Stenberg
2013-02-22 17:39       ` Richard Purdie
2013-02-19 13:13 ` [PATCH 3/8] udev: " Björn Stenberg
2013-02-21  6:55   ` Saul Wold
2013-02-19 13:14 ` [PATCH 4/8] acl: " Björn Stenberg
2013-02-22 13:59   ` Richard Purdie
2013-02-19 13:14 ` [PATCH 5/8] bzip2: " Björn Stenberg
2013-02-19 13:14 ` [PATCH 6/8] openssh: " Björn Stenberg
2013-02-19 13:14 ` [PATCH 7/8] openssl: " Björn Stenberg
2013-02-22 14:05   ` Richard Purdie [this message]
2013-02-19 13:14 ` [PATCH 8/8] ptest: Add missed .debug path Björn Stenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1361541944.9309.42.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bjst@enea.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox