mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-23 12:48:05 -05:00
WiP for source cache test
This commit is contained in:
@@ -7,9 +7,7 @@ class Basics < IntegrationTest
|
||||
def test_cpm_default
|
||||
prj = make_project 'no-deps'
|
||||
prj.create_lists_with({})
|
||||
|
||||
cfg_result = prj.configure
|
||||
assert_success cfg_result
|
||||
assert_success prj.configure
|
||||
|
||||
@cache = prj.read_cache
|
||||
|
||||
@@ -36,6 +34,19 @@ class Basics < IntegrationTest
|
||||
assert_same_path File.join(prj.bin_dir, 'CPM_modules'), check_and_get('CPM_MODULE_PATH')
|
||||
end
|
||||
|
||||
# Test when env CPM_SOURCE_CACHE is set
|
||||
def test_env_cpm_source_cache
|
||||
ENV['CPM_SOURCE_CACHE'] = cur_test_dir
|
||||
|
||||
prj = make_project 'no-deps'
|
||||
prj.create_lists_with({})
|
||||
assert_success prj.configure
|
||||
|
||||
@cache = prj.read_cache
|
||||
|
||||
assert_equal cur_test_dir, check_and_get('CPM_SOURCE_CACHE', 'PATH')
|
||||
end
|
||||
|
||||
def check_and_get(key, type = 'INTERNAL')
|
||||
e = @cache.entries[key]
|
||||
assert_not_nil e, key
|
||||
|
||||
Reference in New Issue
Block a user