| 
									
										
										
										
											2018-12-29 12:26:16 -08:00
										 |  |  | #!/bin/bash | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # This script acts like bash but runs kcov on the input script. We use it | 
					
						
							|  |  |  | # to get coverage for Spack's bash scripts. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ -z "$SPACK_ROOT" ]; then | 
					
						
							|  |  |  |     echo "ERROR: SPACK_ROOT was not set!" | 
					
						
							|  |  |  |     exit 1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-19 23:03:10 +02:00
										 |  |  | # Using a -- to separate the script to be tested from kcov is not documented | 
					
						
							|  |  |  | # as of v38, but seems to work. The same is true for the "--debug-force-bash-stderr" | 
					
						
							|  |  |  | # option, see https://github.com/SimonKagstrom/kcov/issues/61 | 
					
						
							|  |  |  | kcov --debug-force-bash-stderr "$SPACK_ROOT/coverage" -- "$@" |