@@ -7,12 +7,12 @@ class TestRunningValidator < Pod::Validator
77 TEST_TARGET = 'Tests'
88
99 attr_accessor :test_files
10- attr_accessor :iphone_simulator
10+ attr_accessor :ios_simulator
1111 attr_accessor :tvos_simulator
1212
1313 def initialize ( spec_or_path , source_urls )
1414 super ( spec_or_path , source_urls )
15- self . iphone_simulator = :oldest
15+ self . ios_simulator = :oldest
1616 self . tvos_simulator = :oldest
1717 end
1818
@@ -61,7 +61,7 @@ def create_test_target(project)
6161 test_target . add_file_references ( test_files . map { |file | group . new_file ( file ) } )
6262 project . save
6363 create_test_scheme ( project , test_target )
64- project
64+ test_target
6565 end
6666
6767 def create_test_scheme ( project , test_target )
@@ -90,7 +90,7 @@ def run_tests
9090 case consumer . platform_name
9191 when :ios
9292 command += %w( CODE_SIGN_IDENTITY=- -sdk iphonesimulator )
93- command += Fourflusher ::SimControl . new . destination ( iphone_simulator , 'iOS' , deployment_target )
93+ command += Fourflusher ::SimControl . new . destination ( ios_simulator , 'iOS' , deployment_target )
9494 when :osx
9595 command += %w( LD_RUNPATH_SEARCH_PATHS=@loader_path/../Frameworks )
9696 when :tvos
@@ -100,7 +100,8 @@ def run_tests
100100 return # skip watchos
101101 end
102102
103- output , status = Dir . chdir ( validation_dir ) { _xcodebuild ( command ) }
103+ output , status = _xcodebuild ( command )
104+
104105 unless status . success?
105106 message = 'Returned an unsuccessful exit code.'
106107 if config . verbose?
@@ -110,5 +111,6 @@ def run_tests
110111 end
111112 error ( 'xcodebuild' , message )
112113 end
114+ output
113115 end
114116end
0 commit comments