File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,15 @@ module RunLoop
22
33 # @!visibility private
44 module DetectAUT
5+ @@xcodeproj = nil
6+
7+ def self . xcodeproj
8+ @@xcodeproj
9+ end
510
611 # @!visibility private
712 def self . detect_app_under_test ( options )
13+ @@xcodeproj = xcodeproj_from_options ( options )
814 app = self . detect_app ( options )
915 if app . is_a? ( RunLoop ::App ) || app . is_a? ( RunLoop ::Ipa )
1016 {
@@ -124,6 +130,16 @@ def globs_for_app_search(base_dir)
124130
125131 private
126132
133+ # @!visibility private
134+ def self . xcodeproj_from_options ( options )
135+ value = options [ :xcodeproj ]
136+ if value . nil? || value == ""
137+ nil
138+ else
139+ File . expand_path ( value )
140+ end
141+ end
142+
127143 # @!visibility private
128144 def self . app_from_options ( options )
129145 options [ :app ] || options [ :bundle_id ]
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ def xcode_project?
1010 end
1111
1212 # @!visibility private
13- def xcodeproj
14- xcodeproj = RunLoop ::Environment . xcodeproj
13+ def xcodeproj ( options = { } )
14+ xcodeproj = RunLoop ::Environment . xcodeproj || RunLoop :: DetectAUT . xcodeproj
1515
1616 if xcodeproj && !File . directory? ( xcodeproj )
1717 raise_xcodeproj_missing ( xcodeproj )
You can’t perform that action at this time.
0 commit comments