[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Tue Jun 21 12:52:37 UTC 2016


The branch master has been updated
       via  14c4201958152392941615626da5d2800c98e943 (commit)
       via  a3414dc82c76526d64d23998301f6d5a9e4f0a33 (commit)
       via  3da9eeb1582ed06aad55aa1b450e37376fedf3ab (commit)
      from  c952780c25f67d0645ef5e57a8ac7dae6ce2d586 (commit)


- Log -----------------------------------------------------------------
commit 14c4201958152392941615626da5d2800c98e943
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Jun 2 17:37:26 2016 +0200

    Appveyor: test install as well, via a fake deploy_script
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

commit a3414dc82c76526d64d23998301f6d5a9e4f0a33
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Jun 2 17:37:03 2016 +0200

    Travis: When testing install, install docs as well
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

commit 3da9eeb1582ed06aad55aa1b450e37376fedf3ab
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Jun 20 14:03:12 2016 +0200

    OpenSSL::Test: Fix directory calculations in __cwd()
    
    We recalculate the location of the directories we keep track of.
    However, we did so after having moved to the new directory already, so
    the data we did the calculations from were possibly not quite correct.
    
    This change moves the calculations to happen before moving to the new
    directory.
    
    This issue is sporadic, and possibly dependent on the platform.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

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

Summary of changes:
 .travis.yml                  |  2 +-
 appveyor.yml                 | 16 +++++++++++++++-
 test/testlib/OpenSSL/Test.pm | 26 ++++++++++++++++++--------
 3 files changed, 34 insertions(+), 10 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index df3e570..38a298a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -91,7 +91,7 @@ script:
       fi
     - if [ -n "$DESTDIR" ]; then
           mkdir "../$DESTDIR";
-          make install DESTDIR="../$DESTDIR";
+          make install install_docs DESTDIR="../$DESTDIR";
       fi
     - cd ..
 
diff --git a/appveyor.yml b/appveyor.yml
index 46eaf39..c668b39 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -27,13 +27,27 @@ before_build:
         }
     - ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
     - call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM%
-    - perl Configure %TARGET% no-asm %SHARED%
+    - mkdir _build
+    - cd _build
+    - perl ..\Configure %TARGET% no-asm %SHARED%
+    - cd ..
 
 build_script:
+    - cd _build
     - nmake
+    - cd ..
 
 test_script:
+    - cd _build
     - nmake test
+    - cd ..
+
+# Fake deploy script to test installation
+deploy_script:
+    - mkdir _install
+    - cd _build
+    - nmake install install_docs DESTDIR=..\_install
+    - cd ..
 
 notifications:
     - provider: Email
diff --git a/test/testlib/OpenSSL/Test.pm b/test/testlib/OpenSSL/Test.pm
index 2cfb22a..6a10afd 100644
--- a/test/testlib/OpenSSL/Test.pm
+++ b/test/testlib/OpenSSL/Test.pm
@@ -821,12 +821,10 @@ sub __cwd {
 	mkpath($dir);
     }
 
-    # Should we just bail out here as well?  I'm unsure.
-    return undef unless chdir($dir);
-
-    if ($opts{cleanup}) {
-	rmtree(".", { safe => 0, keep_root => 1 });
-    }
+    # We are recalculating the directories we keep track of, but need to save
+    # away the result for after having moved into the new directory.
+    my %tmp_directories = ();
+    my %tmp_ENV = ();
 
     # For each of these directory variables, figure out where they are relative
     # to the directory we want to move to if they aren't absolute (if they are,
@@ -835,7 +833,7 @@ sub __cwd {
     foreach (@dirtags) {
 	if (!file_name_is_absolute($directories{$_})) {
 	    my $newpath = abs2rel(rel2abs($directories{$_}), rel2abs($dir));
-	    $directories{$_} = $newpath;
+	    $tmp_directories{$_} = $newpath;
 	}
     }
 
@@ -845,10 +843,22 @@ sub __cwd {
     foreach (@direnv) {
 	if (!file_name_is_absolute($ENV{$_})) {
 	    my $newpath = abs2rel(rel2abs($ENV{$_}), rel2abs($dir));
-	    $ENV{$_} = $newpath;
+	    $tmp_ENV{$_} = $newpath;
 	}
     }
 
+    # Should we just bail out here as well?  I'm unsure.
+    return undef unless chdir($dir);
+
+    if ($opts{cleanup}) {
+	rmtree(".", { safe => 0, keep_root => 1 });
+    }
+
+    %directories = %tmp_directories;
+    foreach (keys %tmp_ENV) {
+        $ENV{$_} = $tmp_ENV{$_};
+    }
+
     if ($debug) {
 	print STDERR "DEBUG: __cwd(), directories and files:\n";
 	print STDERR "  \$directories{BLDTEST} = \"$directories{BLDTEST}\"\n";


More information about the openssl-commits mailing list