coverage over multiple packages (#6420)
This commit is contained in:
		@@ -12,11 +12,10 @@ source ci/_
 | 
				
			|||||||
: "${CI_COMMIT:=local}"
 | 
					: "${CI_COMMIT:=local}"
 | 
				
			||||||
reportName="lcov-${CI_COMMIT:0:9}"
 | 
					reportName="lcov-${CI_COMMIT:0:9}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ -n $1 ]]; then
 | 
					if [[ -z $1 ]]; then
 | 
				
			||||||
  crate="--package $1"
 | 
					   packages=( --lib --all --exclude solana-local-cluster )
 | 
				
			||||||
  shift
 | 
					 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  crate="--all --exclude solana-local-cluster"
 | 
					  packages=( "$@" )
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
coverageFlags=(-Zprofile)                # Enable coverage
 | 
					coverageFlags=(-Zprofile)                # Enable coverage
 | 
				
			||||||
@@ -37,10 +36,9 @@ fi
 | 
				
			|||||||
rm -rf target/cov/$reportName
 | 
					rm -rf target/cov/$reportName
 | 
				
			||||||
 | 
					
 | 
				
			||||||
source ci/rust-version.sh nightly
 | 
					source ci/rust-version.sh nightly
 | 
				
			||||||
# shellcheck disable=SC2086 #
 | 
					
 | 
				
			||||||
RUST_LOG=solana=trace _ cargo +$rust_nightly test --target-dir target/cov --lib --no-run $crate "$@"
 | 
					RUST_LOG=solana=trace _ cargo +$rust_nightly test --target-dir target/cov --no-run "${packages[@]}"
 | 
				
			||||||
# shellcheck disable=SC2086 #
 | 
					RUST_LOG=solana=trace _ cargo +$rust_nightly test --target-dir target/cov "${packages[@]}" 2> target/cov/coverage-stderr.log
 | 
				
			||||||
RUST_LOG=solana=trace _ cargo +$rust_nightly test --target-dir target/cov --lib $crate "$@" 2> target/cov/coverage-stderr.log
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "--- grcov"
 | 
					echo "--- grcov"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user