From 647a1563dc5d5e38aa30be692a5d1ec45a5dc496 Mon Sep 17 00:00:00 2001 From: Shyam Jeedigunta Date: Thu, 27 Apr 2017 00:48:23 +0200 Subject: [PATCH] Make metrics filenames for e2e tests indicate the test --- test/e2e/framework/framework.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 26a49b7d466..c7f842bec2f 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -348,7 +348,7 @@ func (f *Framework) AfterEach() { Logf(summaries[i].PrintHumanReadable()) } else { // TODO: learn to extract test name and append it to the kind instead of timestamp. - filePath := path.Join(TestContext.ReportDir, summaries[i].SummaryKind()+now.Format(time.RFC3339)+".txt") + filePath := path.Join(TestContext.ReportDir, summaries[i].SummaryKind()+"_"+f.BaseName+"_"+now.Format(time.RFC3339)+".txt") if err := ioutil.WriteFile(filePath, []byte(summaries[i].PrintHumanReadable()), 0644); err != nil { Logf("Failed to write file %v with test performance data: %v", filePath, err) } @@ -361,7 +361,7 @@ func (f *Framework) AfterEach() { Logf("Finished") } else { // TODO: learn to extract test name and append it to the kind instead of timestamp. - filePath := path.Join(TestContext.ReportDir, summaries[i].SummaryKind()+now.Format(time.RFC3339)+".json") + filePath := path.Join(TestContext.ReportDir, summaries[i].SummaryKind()+"_"+f.BaseName+"_"+now.Format(time.RFC3339)+".json") if err := ioutil.WriteFile(filePath, []byte(summaries[i].PrintJSON()), 0644); err != nil { Logf("Failed to write file %v with test performance data: %v", filePath, err) }