@@ -80,7 +80,8 @@ def get_auth_url_from_unity_logs():
8080 content = f .read ()
8181 # Look for either our custom message or the existing LaunchAuthURL message
8282 # Get the LAST occurrence (most recent) and make sure it's a login URL, not logout
83- matches = re .findall (r'(?:PASSPORT_AUTH_URL: |LaunchAuthURL : )(https?://[^\s]+)' , content )
83+ # Now includes [Immutable] tag from PassportLogger
84+ matches = re .findall (r'(?:\[Immutable\] PASSPORT_AUTH_URL: |PASSPORT_AUTH_URL: |LaunchAuthURL : )(https?://[^\s]+)' , content )
8485 if matches :
8586 # Get the last URL and make sure it's not a logout URL
8687 for url in reversed (matches ):
@@ -124,8 +125,9 @@ def get_logout_url_from_unity_logs():
124125 try :
125126 with open (log_path , 'r' , encoding = 'utf-8' , errors = 'ignore' ) as f :
126127 content = f .read ()
127- # Look for logout URLs in Unity logs
128- matches = re .findall (r'(?:PASSPORT_LOGOUT_URL: |LaunchAuthURL : )(https?://[^\s]+)' , content )
128+ # Look for logout URLs in Unity logs (uses same PASSPORT_AUTH_URL pattern)
129+ # Now includes [Immutable] tag from PassportLogger
130+ matches = re .findall (r'(?:\[Immutable\] PASSPORT_AUTH_URL: |PASSPORT_AUTH_URL: |LaunchAuthURL : )(https?://[^\s]+)' , content )
129131 if matches :
130132 # Get the last URL and make sure it's a logout URL
131133 for url in reversed (matches ):
@@ -573,7 +575,28 @@ def open_sample_app(clear_data=False):
573575 clear_unity_data ()
574576
575577 print (f"Opening { product_name } ..." )
576- subprocess .Popen ([f"{ product_name } .exe" ], shell = True )
578+
579+ # Look for the executable in build folder first, then current directory
580+ exe_paths = [
581+ f"../build/{ product_name } .exe" , # Relative to Tests folder
582+ f"{ product_name } .exe" # Current directory (fallback)
583+ ]
584+
585+ exe_launched = False
586+ for exe_path in exe_paths :
587+ if os .path .exists (exe_path ):
588+ print (f"Found executable at: { exe_path } " )
589+ subprocess .Popen ([exe_path ], shell = True )
590+ exe_launched = True
591+ break
592+
593+ if not exe_launched :
594+ print (f"ERROR: Could not find { product_name } .exe in any of these locations:" )
595+ for path in exe_paths :
596+ abs_path = os .path .abspath (path )
597+ print (f" - { abs_path } (exists: { os .path .exists (abs_path )} )" )
598+ raise FileNotFoundError (f"Unity executable not found" )
599+
577600 time .sleep (10 )
578601 print (f"{ product_name } opened successfully." )
579602
0 commit comments