[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Tue Sep 15 13:28:37 UTC 2015


The branch master has been updated
       via  2e996acf2fb68ddc0248beda6682cbf078eefc78 (commit)
       via  1780e6d916d83f812ffceec56ac3d8fa97b83248 (commit)
      from  187bad4c241ad2a929745546fd473f0692879fa7 (commit)


- Log -----------------------------------------------------------------
commit 2e996acf2fb68ddc0248beda6682cbf078eefc78
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Sep 15 14:07:46 2015 +0200

    Extend the notes on how to do testing
    
    These notes include the use of HARNESS_VERBOSE (see the manual for
    Test::Harness) and the method to enumerate specific tests to run.
    
    Reviewed-by: Emilia Käsper <emilia at openssl.org>

commit 1780e6d916d83f812ffceec56ac3d8fa97b83248
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Sep 15 14:07:10 2015 +0200

    Add a method to list available tests
    
    Reviewed-by: Emilia Käsper <emilia at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 INSTALL           | 40 ++++++++++++++++++++++++++++++++--------
 Makefile.org      |  4 ++++
 test/Makefile     |  2 ++
 test/run_tests.pl | 13 ++++++++++---
 4 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/INSTALL b/INSTALL
index 9bb98be..9173a4e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -173,14 +173,38 @@
 
        $ make test
 
-     If a test fails, look at the output.  There may be reasons for
-     the failure that isn't a problem in OpenSSL itself (like a missing
-     or malfunctioning bc).  If it is a problem with OpenSSL itself,
-     try removing any compiler optimization flags from the CFLAG line
-     in Makefile.ssl and run "make clean; make". Please send a bug
-     report to <openssl-bugs at openssl.org>, including the output of
-     "make report" in order to be added to the request tracker at
-     http://www.openssl.org/support/rt.html.
+     If some tests fail, look at the output.  There may be reasons for
+     the failure that isn't a problem in OpenSSL itself (like a
+     malfunction with Perl).  You may want increased verbosity, that
+     can be accomplished like this:
+
+       $ HARNESS_VERBOSE=yes make test
+
+     Also, you will find logs for all commands the tests have executed
+     in logs, test/test_*.log, one for each individual test.
+
+     If you want to run just one or a few specific tests, you can use
+     the make variable TESTS to specify them, like this:
+
+       $ make TESTS='test_rsa test_dsa' test
+
+     And of course, you can combine:
+       
+       $ HARNESS_VERBOSE=yes make TESTS='test_rsa test_dsa' test
+
+     You can find the list of available tests like this:
+
+       $ make list-tests
+
+     If you find a problem with OpenSSL itself, try removing any
+     compiler optimization flags from the CFLAG line in Makefile and
+     run "make clean; make".
+
+     Please send a bug report to <openssl-bugs at openssl.org>, and when
+     you do, please run the following and include the output in your
+     report:
+
+       $ make report
 
   4. If everything tests ok, install OpenSSL with
 
diff --git a/Makefile.org b/Makefile.org
index 2f8e472..c56aa86 100644
--- a/Makefile.org
+++ b/Makefile.org
@@ -439,6 +439,10 @@ tests: rehash
 	$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
 	OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
 
+list-tests:
+	@(cd test && \
+	        $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. list-tests)
+
 report:
 	@$(PERL) util/selftest.pl
 
diff --git a/test/Makefile b/test/Makefile
index 779d23a..e938633 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -153,6 +153,8 @@ tags:
 
 tests:	exe apps
 	TOP=$(TOP) PERL=$(PERL) $(PERL) run_tests.pl $(TESTS)
+list-tests:
+	@TOP=$(TOP) PERL=$(PERL) $(PERL) run_tests.pl list
 
 apps:
 	@(cd ..; $(MAKE) DIRS=apps all)
diff --git a/test/run_tests.pl b/test/run_tests.pl
index 7e61282..cacbc02 100644
--- a/test/run_tests.pl
+++ b/test/run_tests.pl
@@ -26,7 +26,8 @@ my @tests = ( "alltests" );
 if (@ARGV) {
     @tests = @ARGV;
 }
-if (grep /^alltests$/, @tests) {
+my $list_mode = scalar(grep /^list$/, @tests) != 0;
+if (grep /^alltests|list$/, @tests) {
     @tests = grep {
 	basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/
     } glob(catfile($recipesdir,"*.t"));
@@ -40,6 +41,12 @@ if (grep /^alltests$/, @tests) {
     @tests = @t;
 }
 
- at tests = map { abs2rel($_, rel2abs(curdir())); } @tests;
+if ($list_mode) {
+    @tests = map { $_ = basename($_); $_ =~ s/^[0-9][0-9]-//; $_ =~ s/\.t$//;
+                   $_ } @tests;
+    print join("\n", @tests), "\n";
+} else {
+    @tests = map { abs2rel($_, rel2abs(curdir())); } @tests;
 
-runtests(sort @tests);
+    runtests(sort @tests);
+}


More information about the openssl-commits mailing list