mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 03:58:27 +00:00 
			
		
		
		
	lib/igt_core: fflush stdout after printing subtest results
I often run "sudo ./test 2>&1 | tee output.txt", and when we're succeeding - never printing to stderr - the output gets buffered and is never flushed (because it doesn't point to a terminal), so I never know which test is running. With this fflush, I'm able to know when each test finishes. v2: Add blank line too (Chris) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This commit is contained in:
		
							parent
							
								
									f78574101f
								
							
						
					
					
						commit
						6cc553adf2
					
				@ -829,6 +829,8 @@ static void exit_subtest(const char *result)
 | 
				
			|||||||
	elapsed += (now.tv_nsec - subtest_time.tv_nsec) * 1e-9;
 | 
						elapsed += (now.tv_nsec - subtest_time.tv_nsec) * 1e-9;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	printf("Subtest %s: %s (%.3fs)\n", in_subtest, result, elapsed);
 | 
						printf("Subtest %s: %s (%.3fs)\n", in_subtest, result, elapsed);
 | 
				
			||||||
 | 
						fflush(stdout);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	in_subtest = NULL;
 | 
						in_subtest = NULL;
 | 
				
			||||||
	siglongjmp(igt_subtest_jmpbuf, 1);
 | 
						siglongjmp(igt_subtest_jmpbuf, 1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user