diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-03-30 15:21:05 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-03-30 19:52:17 -0300 |
| commit | 43adf5df7465c39a9f6fc735654aabac991cabb5 (patch) | |
| tree | 2b8a4e93bc2334a5f546cba9dcad4cb99332576e /spec/util/test_env.lua | |
| parent | ad4b4b29a7af9c8df859781dab51ef38a9a9895d (diff) | |
| download | luarocks-43adf5df7465c39a9f6fc735654aabac991cabb5.tar.gz luarocks-43adf5df7465c39a9f6fc735654aabac991cabb5.tar.bz2 luarocks-43adf5df7465c39a9f6fc735654aabac991cabb5.zip | |
Tests: make sure tests run from testrun/
Diffstat (limited to 'spec/util/test_env.lua')
| -rw-r--r-- | spec/util/test_env.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua index ce2b1728..2232de87 100644 --- a/spec/util/test_env.lua +++ b/spec/util/test_env.lua | |||
| @@ -494,16 +494,16 @@ local function create_paths(luaversion_full) | |||
| 494 | testing_paths.luarocks_tmp = "/tmp/luarocks_testing" | 494 | testing_paths.luarocks_tmp = "/tmp/luarocks_testing" |
| 495 | end | 495 | end |
| 496 | 496 | ||
| 497 | testing_paths.luarocks_dir = lfs.currentdir() | 497 | local base_dir = lfs.currentdir() |
| 498 | 498 | ||
| 499 | if test_env.TEST_TARGET_OS == "windows" then | 499 | if test_env.TEST_TARGET_OS == "windows" then |
| 500 | testing_paths.luarocks_dir = testing_paths.luarocks_dir:gsub("\\","/") | 500 | base_dir = base_dir:gsub("\\","/") |
| 501 | end | 501 | end |
| 502 | 502 | ||
| 503 | testing_paths.fixtures_dir = testing_paths.luarocks_dir .. "/spec/fixtures" | 503 | testing_paths.fixtures_dir = base_dir .. "/spec/fixtures" |
| 504 | testing_paths.util_dir = testing_paths.luarocks_dir .. "/spec/util" | 504 | testing_paths.util_dir = base_dir .. "/spec/util" |
| 505 | testing_paths.testrun_dir = testing_paths.luarocks_dir .. "/testrun" | 505 | testing_paths.testrun_dir = base_dir .. "/testrun" |
| 506 | testing_paths.src_dir = testing_paths.luarocks_dir .. "/src" | 506 | testing_paths.src_dir = base_dir .. "/src" |
| 507 | testing_paths.testing_lrprefix = testing_paths.testrun_dir .. "/testing_lrprefix-" .. luaversion_full | 507 | testing_paths.testing_lrprefix = testing_paths.testrun_dir .. "/testing_lrprefix-" .. luaversion_full |
| 508 | testing_paths.testing_tree = testing_paths.testrun_dir .. "/testing-" .. luaversion_full | 508 | testing_paths.testing_tree = testing_paths.testrun_dir .. "/testing-" .. luaversion_full |
| 509 | testing_paths.testing_tree_copy = testing_paths.testrun_dir .. "/testing_copy-" .. luaversion_full | 509 | testing_paths.testing_tree_copy = testing_paths.testrun_dir .. "/testing_copy-" .. luaversion_full |
| @@ -566,6 +566,8 @@ function test_env.setup_specs(extra_rocks) | |||
| 566 | if test_env.RESET_ENV then | 566 | if test_env.RESET_ENV then |
| 567 | reset_environment(test_env.testing_paths, test_env.md5sums, test_env.env_variables) | 567 | reset_environment(test_env.testing_paths, test_env.md5sums, test_env.env_variables) |
| 568 | end | 568 | end |
| 569 | |||
| 570 | lfs.chdir(test_env.testing_paths.testrun_dir) | ||
| 569 | end | 571 | end |
| 570 | 572 | ||
| 571 | --- Test if required rock is installed and if not, install it. | 573 | --- Test if required rock is installed and if not, install it. |
