fix newline in raw string in e2e net perf case

This commit is contained in:
m1093782566 2017-05-28 23:03:46 +08:00
parent 17ec91c572
commit 7ffd5b293c

View File

@ -69,6 +69,7 @@ func (i *IPerfResults) ToTSV() string {
// NewIPerf parses an IPerf CSV output line into an IPerfResult. // NewIPerf parses an IPerf CSV output line into an IPerfResult.
func NewIPerf(csvLine string) *IPerfResult { func NewIPerf(csvLine string) *IPerfResult {
csvLine = strings.Trim(csvLine, "\n")
slice := StrSlice(strings.Split(csvLine, ",")) slice := StrSlice(strings.Split(csvLine, ","))
if len(slice) != 9 { if len(slice) != 9 {
framework.Failf("Incorrect fields in the output: %v (%v out of 9)", slice, len(slice)) framework.Failf("Incorrect fields in the output: %v (%v out of 9)", slice, len(slice))