Adds Solaris support to test scripts.
This commit is contained in:
		
							parent
							
								
									cfcbc298cd
								
							
						
					
					
						commit
						9d965bbeef
					
				@ -460,8 +460,15 @@ class CapturedStream {
 | 
				
			|||||||
    char temp_file_path[MAX_PATH + 1] = { '\0' };  // NOLINT
 | 
					    char temp_file_path[MAX_PATH + 1] = { '\0' };  // NOLINT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);
 | 
					    ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);
 | 
				
			||||||
    ::GetTempFileNameA(temp_dir_path, "gtest_redir", 0, temp_file_path);
 | 
					    const UINT success = ::GetTempFileNameA(temp_dir_path,
 | 
				
			||||||
 | 
					                                            "gtest_redir",
 | 
				
			||||||
 | 
					                                            0,  // Generate unique file name.
 | 
				
			||||||
 | 
					                                            temp_file_path);
 | 
				
			||||||
 | 
					    GTEST_CHECK_(success != 0)
 | 
				
			||||||
 | 
					        << "Unable to create a temporary file in " << temp_dir_path;
 | 
				
			||||||
    const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);
 | 
					    const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);
 | 
				
			||||||
 | 
					    GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file "
 | 
				
			||||||
 | 
					                                    << temp_file_path;
 | 
				
			||||||
    filename_ = temp_file_path;
 | 
					    filename_ = temp_file_path;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    // There's no guarantee that a test has write access to the
 | 
					    // There's no guarantee that a test has write access to the
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user