mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-24 13:18:07 -05:00
Moved env clean to cleanup to make setup methods simpler (not require super)
This commit is contained in:
@@ -31,6 +31,9 @@ raise "Cannot find 'CPM.cmake' at '#{TestLib::CPM_PATH}'" if !File.file?(TestLib
|
|||||||
puts "Running CPM.cmake integration tests"
|
puts "Running CPM.cmake integration tests"
|
||||||
puts "Temp directory: '#{TestLib::TMP_DIR}'"
|
puts "Temp directory: '#{TestLib::TMP_DIR}'"
|
||||||
|
|
||||||
|
# Clean all CPM-related env vars
|
||||||
|
TestLib.clear_env
|
||||||
|
|
||||||
class Project
|
class Project
|
||||||
def initialize(src_dir, bin_dir)
|
def initialize(src_dir, bin_dir)
|
||||||
@src_dir = src_dir
|
@src_dir = src_dir
|
||||||
@@ -142,8 +145,8 @@ end
|
|||||||
class IntegrationTest < Test::Unit::TestCase
|
class IntegrationTest < Test::Unit::TestCase
|
||||||
self.test_order = :defined # run tests in order of defintion (as opposed to alphabetical)
|
self.test_order = :defined # run tests in order of defintion (as opposed to alphabetical)
|
||||||
|
|
||||||
def setup
|
def cleanup
|
||||||
# Clear existing cpm-related env vars
|
# Clear cpm-related env vars which may have been set by the test
|
||||||
TestLib.clear_env
|
TestLib.clear_env
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ require_relative './lib'
|
|||||||
|
|
||||||
class SourceCache < IntegrationTest
|
class SourceCache < IntegrationTest
|
||||||
def setup
|
def setup
|
||||||
super
|
|
||||||
@cache_dir = File.join(cur_test_dir, 'cpmcache')
|
@cache_dir = File.join(cur_test_dir, 'cpmcache')
|
||||||
ENV['CPM_SOURCE_CACHE'] = @cache_dir
|
ENV['CPM_SOURCE_CACHE'] = @cache_dir
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user