Add a test for multiple values of OVNI_TRACEDIR
This commit is contained in:
		
							parent
							
								
									d1bf4e7520
								
							
						
					
					
						commit
						0db35980a0
					
				| @ -16,3 +16,4 @@ test_emu(clockgate.c MP SHOULD_FAIL REGEX "detected large clock gate") | |||||||
| test_emu(no-cpus.c SHOULD_FAIL REGEX "loom .* has no physical CPUs") | test_emu(no-cpus.c SHOULD_FAIL REGEX "loom .* has no physical CPUs") | ||||||
| test_emu(sort-cpus-by-loom.c MP) | test_emu(sort-cpus-by-loom.c MP) | ||||||
| test_emu(sort-cpus-by-rank.c MP) | test_emu(sort-cpus-by-rank.c MP) | ||||||
|  | test_emu(tracedir-subdir.c MP DRIVER "tracedir-subdir.driver.sh") | ||||||
|  | |||||||
							
								
								
									
										15
									
								
								test/emu/ovni/tracedir-subdir.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								test/emu/ovni/tracedir-subdir.c
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | |||||||
|  | /* Copyright (c) 2023 Barcelona Supercomputing Center (BSC)
 | ||||||
|  |  * SPDX-License-Identifier: GPL-3.0-or-later */ | ||||||
|  | 
 | ||||||
|  | #include <stdlib.h> | ||||||
|  | #include "compat.h" | ||||||
|  | #include "instr.h" | ||||||
|  | 
 | ||||||
|  | int | ||||||
|  | main(void) | ||||||
|  | { | ||||||
|  | 	instr_start(0, 1); | ||||||
|  | 	instr_end(); | ||||||
|  | 
 | ||||||
|  | 	return 0; | ||||||
|  | } | ||||||
							
								
								
									
										24
									
								
								test/emu/ovni/tracedir-subdir.driver.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								test/emu/ovni/tracedir-subdir.driver.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,24 @@ | |||||||
|  | target=$OVNI_TEST_BIN | ||||||
|  | 
 | ||||||
|  | # Test referring to a empty nested subdirectory | ||||||
|  | ( | ||||||
|  |   export OVNI_TRACEDIR=a/b/c | ||||||
|  |   $target | ||||||
|  |   ovniemu $OVNI_TRACEDIR | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | # Test referring to a parent directory | ||||||
|  | ( | ||||||
|  |   mkdir -p x/y/z | ||||||
|  |   cd x/y/z | ||||||
|  |   export OVNI_TRACEDIR=../../w | ||||||
|  |   $target | ||||||
|  |   ovniemu $OVNI_TRACEDIR | ||||||
|  | ) | ||||||
|  | 
 | ||||||
|  | # Test with full path | ||||||
|  | ( | ||||||
|  |   export OVNI_TRACEDIR=$(pwd)/fullpath | ||||||
|  |   $target | ||||||
|  |   ovniemu $OVNI_TRACEDIR | ||||||
|  | ) | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user