From 7225a3d4513137a8e13a5db39538e007b8faa886 Mon Sep 17 00:00:00 2001
From: roboo <robo.karasek@gmail.com>
Date: Mon, 22 Aug 2016 20:57:26 +0200
Subject: Change APPVEYOR_OPENSSL to OPENSSL_DIRS for better test readability

---
 test/test_environment.lua | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/test_environment.lua b/test/test_environment.lua
index 37bd38f1..ab6c3edd 100644
--- a/test/test_environment.lua
+++ b/test/test_environment.lua
@@ -153,6 +153,7 @@ end
 function test_env.set_args()
    -- if at least Lua/LuaJIT version argument was found on input start to parse other arguments to env. variables
    test_env.TYPE_TEST_ENV = "minimal"
+   test_env.OPENSSL_DIRS = ""
    test_env.RESET_ENV = true
 
    for _, argument in ipairs(arg) do
@@ -168,7 +169,7 @@ function test_env.set_args()
          test_env.TRAVIS = true
       elseif argument == "appveyor" then
          test_env.APPVEYOR = true
-         test_env.APPVEYOR_OPENSSL = "OPENSSL_LIBDIR=C:\\OpenSSL-Win32\\lib OPENSSL_INCDIR=C:\\OpenSSL-Win32\\include"
+         test_env.OPENSSL_DIRS = "OPENSSL_LIBDIR=C:\\OpenSSL-Win32\\lib OPENSSL_INCDIR=C:\\OpenSSL-Win32\\include"
       elseif argument:find("^os=") then
          test_env.TEST_TARGET_OS = argument:match("^os=(.*)$")
       else
-- 
cgit v1.2.3-55-g6feb


From 6d9c9997645c07ed93719d85e260d9ffbc2d1d25 Mon Sep 17 00:00:00 2001
From: roboo <robo.karasek@gmail.com>
Date: Mon, 22 Aug 2016 21:01:23 +0200
Subject: Change APPVEYOR_OPENSSL to OPENSSL_DIRS for better test readability

---
 spec/build_spec.lua   | 18 +++---------------
 spec/install_spec.lua | 12 ++----------
 spec/pack_spec.lua    |  6 +-----
 spec/upload_spec.lua  | 12 ++----------
 4 files changed, 8 insertions(+), 40 deletions(-)

diff --git a/spec/build_spec.lua b/spec/build_spec.lua
index b4f838ca..8f08f0a0 100644
--- a/spec/build_spec.lua
+++ b/spec/build_spec.lua
@@ -120,11 +120,7 @@ describe("LuaRocks build tests #blackbox #b_build", function()
       end)
       
       it("LuaRocks build luasec with skipping dependency checks", function()
-         if test_env.APPVEYOR then
-            assert.is_true(run.luarocks_bool("build luasec " .. test_env.APPVEYOR_OPENSSL .. " --nodeps"))
-         else
-            assert.is_true(run.luarocks_bool("build luasec --nodeps"))
-         end
+         assert.is_true(run.luarocks_bool("build luasec " .. test_env.OPENSSL_DIRS .. " --nodeps"))
          assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec/0.6-1/luasec-0.6-1.rockspec"))
       end)
       
@@ -150,11 +146,7 @@ describe("LuaRocks build tests #blackbox #b_build", function()
       end
 
       it("LuaRocks build luasec only deps", function()
-         if test_env.APPVEYOR then
-            assert.is_true(run.luarocks_bool(test_env.quiet("build luasec " .. test_env.APPVEYOR_OPENSSL .. " --only-deps")))
-         else
-            assert.is_true(run.luarocks_bool(test_env.quiet("build luasec --only-deps")))
-         end
+         assert.is_true(run.luarocks_bool(test_env.quiet("build luasec " .. test_env.OPENSSL_DIRS .. " --only-deps")))
          assert.is_false(run.luarocks_bool("show luasec"))
          assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec/0.6-1/luasec-0.6-1.rockspec"))
       end)
@@ -189,12 +181,8 @@ describe("LuaRocks build tests #blackbox #b_build", function()
       
       it("LuaRocks build with https", function()
          assert.is_true(run.luarocks_bool("download --rockspec validate-args 1.5.4-1"))
+         assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.OPENSSL_DIRS)))
          
-         if test_env.APPVEYOR then
-            assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.APPVEYOR_OPENSSL)))
-         else
-            assert.is_true(run.luarocks_bool(test_env.quiet("install luasec")))
-         end
          assert.is_true(run.luarocks_bool("build validate-args-1.5.4-1.rockspec"))
          assert.is.truthy(run.luarocks("show validate-args"))
          assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/validate-args/1.5.4-1/validate-args-1.5.4-1.rockspec"))
diff --git a/spec/install_spec.lua b/spec/install_spec.lua
index 2b6cb77f..e5b9e2cc 100644
--- a/spec/install_spec.lua
+++ b/spec/install_spec.lua
@@ -66,22 +66,14 @@ describe("LuaRocks install tests #blackbox #b_install", function()
       end)
 
       it("LuaRocks install luasec and show luasocket (dependency)", function()
-         if test_env.APPVEYOR then
-            assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.APPVEYOR_OPENSSL)))
-         else
-            assert.is_true(run.luarocks_bool(test_env.quiet("install luasec")))
-         end
+         assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.OPENSSL_DIRS)))
          assert.is_true(run.luarocks_bool("show luasocket"))
       end)
    end)
 
    describe("LuaRocks install - more complex tests", function()
       it('LuaRocks install luasec with skipping dependency checks', function()
-         if test_env.APPVEYOR then
-            assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.APPVEYOR_OPENSSL .. " --nodeps")))
-         else
-            assert.is_true(run.luarocks_bool(test_env.quiet("install luasec --nodeps")))
-         end
+         assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.OPENSSL_DIRS .. " --nodeps")))
          assert.is_true(run.luarocks_bool(test_env.quiet("show luasec")))
          if env_variables.TYPE_TEST_ENV == "minimal" then
             assert.is_false(run.luarocks_bool(test_env.quiet("show luasocket")))
diff --git a/spec/pack_spec.lua b/spec/pack_spec.lua
index 21f33b02..3191e80c 100644
--- a/spec/pack_spec.lua
+++ b/spec/pack_spec.lua
@@ -49,11 +49,7 @@ describe("LuaRocks pack tests #blackbox #b_pack", function()
    end)
 
    it("LuaRocks pack src", function()
-      if test_env.APPVEYOR then
-         assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.APPVEYOR_OPENSSL)))
-      else
-         assert.is_true(run.luarocks_bool(test_env.quiet("install luasec")))
-      end
+      assert.is_true(run.luarocks_bool(test_env.quiet("install luasec " .. test_env.OPENSSL_DIRS)))
       assert.is_true(run.luarocks_bool("download --rockspec luasocket 3.0rc1-2"))
       assert.is_true(run.luarocks_bool("pack luasocket-3.0rc1-2.rockspec"))
       assert.is_true(test_env.remove_files(lfs.currentdir(), "luasocket-"))
diff --git a/spec/upload_spec.lua b/spec/upload_spec.lua
index af4c36d3..ff39cb96 100644
--- a/spec/upload_spec.lua
+++ b/spec/upload_spec.lua
@@ -63,18 +63,10 @@ describe("LuaRocks upload tests #blackbox #b_upload", function()
       end)
 
       it("LuaRocks upload rockspec with api-key", function()
-         if test_env.APPVEYOR then
-            assert.is_true(run.luarocks_bool("upload " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec " .. test_env.APPVEYOR_OPENSSL .. " --api-key=123", {LUAROCKS_CONFIG = testing_paths.testing_dir .. "/luarocks_site.lua"}))
-         else
-            assert.is_true(run.luarocks_bool("upload " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec --api-key=123", {LUAROCKS_CONFIG = testing_paths.testing_dir .. "/luarocks_site.lua"}))
-         end
+         assert.is_true(run.luarocks_bool("upload " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec " .. test_env.OPENSSL_DIRS .. " --api-key=123", {LUAROCKS_CONFIG = testing_paths.testing_dir .. "/luarocks_site.lua"}))
       end)
       it("LuaRocks upload rockspec with api-key and skip-pack", function()
-         if test_env.APPVEYOR then
-            assert.is_true(run.luarocks_bool("upload --skip-pack " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec " .. test_env.APPVEYOR_OPENSSL .. " --api-key=123", {LUAROCKS_CONFIG = testing_paths.testing_dir .. "/luarocks_site.lua"}))
-         else
-            assert.is_true(run.luarocks_bool("upload --skip-pack " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec --api-key=123", {LUAROCKS_CONFIG = testing_paths.testing_dir .. "/luarocks_site.lua"}))
-         end
+         assert.is_true(run.luarocks_bool("upload --skip-pack " .. testing_paths.testing_server .. "/luasocket-3.0rc1-2.rockspec " .. test_env.OPENSSL_DIRS .. " --api-key=123", {LUAROCKS_CONFIG = testing_paths.testing_dir .. "/luarocks_site.lua"}))
       end)
    end)
 end)
-- 
cgit v1.2.3-55-g6feb