mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Extend itest coverage prodiver example
* Add how to create a coverage file per cgi call and merge them in the description which is in the code comments.
This commit is contained in:
parent
50ec5678cb
commit
85447c20b7
1 changed files with 7 additions and 1 deletions
|
|
@ -15,11 +15,17 @@ import (
|
||||||
// pushd /usr/lib/cgi-bin
|
// pushd /usr/lib/cgi-bin
|
||||||
// mv csaf_provider.go csaf_provider2.go
|
// mv csaf_provider.go csaf_provider2.go
|
||||||
// echo '#!/bin/bash
|
// echo '#!/bin/bash
|
||||||
// exec /usr/lib/cgi-bin/csaf_provider.debug -test.coverprofile=/tmp/csaf_provider-itest.cov -- "$@"
|
// exec /usr/lib/cgi-bin/csaf_provider.debug -test.coverprofile=/tmp/csaf_provider-itest-${EPOCHREALTIME}.cov -- "$@"
|
||||||
// ' >csaf_provider.go
|
// ' >csaf_provider.go
|
||||||
// chmod a+x csaf_provider.go
|
// chmod a+x csaf_provider.go
|
||||||
//
|
//
|
||||||
// then do a cgi-bin action on the provider like using the uploader
|
// then do a cgi-bin action on the provider like using the uploader
|
||||||
|
//
|
||||||
|
// If you want to merge several runs, try
|
||||||
|
// go install github.com/wadey/gocovmerge@b5bfa59ec0adc420475f97f89b58045c721d761c
|
||||||
|
// ~/go/bin/gocovmerge /tmp/csaf_provider-ites*.cov >csaf_provider-itest-merged.cov
|
||||||
|
// cd ~/csaf_distribution
|
||||||
|
// go tool cover -func=~/csaf_provider-itest-merged.cov
|
||||||
|
|
||||||
func TestMain(t *testing.T) {
|
func TestMain(t *testing.T) {
|
||||||
var endOfTestParams int
|
var endOfTestParams int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue