Skip to content

Commit

Permalink
chore: rp-preproc cleanup (#1023)
Browse files Browse the repository at this point in the history
  • Loading branch information
tnevrlka authored Apr 4, 2024
1 parent c74886f commit 8a6b8e8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 373 deletions.
23 changes: 0 additions & 23 deletions cmd/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import (
"testing"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/types"
"github.com/onsi/gomega"

"github.com/redhat-appstudio/e2e-tests/pkg/framework"
_ "github.com/redhat-appstudio/e2e-tests/tests/build"
_ "github.com/redhat-appstudio/e2e-tests/tests/byoc"
_ "github.com/redhat-appstudio/e2e-tests/tests/enterprise-contract"
Expand All @@ -27,12 +25,7 @@ import (
"k8s.io/klog/v2"
)

var generateRPPreprocReport bool
var rpPreprocDir string

func init() {
flag.BoolVar(&generateRPPreprocReport, "generate-rppreproc-report", false, "Generate report and folders for RP Preproc")
flag.StringVar(&rpPreprocDir, "rp-preproc-dir", ".", "Folder for RP Preproc")

klog.SetLogger(ginkgo.GinkgoLogr)

Expand All @@ -53,19 +46,3 @@ func TestE2E(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Red Hat App Studio E2E tests")
}

var _ = ginkgo.ReportAfterSuite("RP Preproc reporter", func(report types.Report) {
if generateRPPreprocReport {
//Generate Logs in dirs
framework.GenerateRPPreprocReport(report, rpPreprocDir)
//Generate modified JUnit xml file
resultsPath := rpPreprocDir + "/rp_preproc/results/"
if err := os.MkdirAll(resultsPath, os.ModePerm); err != nil {
klog.Error(err)
}
err := framework.GenerateCustomJUnitReport(report, resultsPath+"xunit.xml")
if err != nil {
klog.Error(err)
}
}
})
2 changes: 1 addition & 1 deletion magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ func CleanWorkload() error {

func runTests(labelsToRun string, junitReportFile string) error {
// added --output-interceptor-mode=none to mitigate RHTAPBUGS-34
return sh.RunV("ginkgo", "-p", "--output-interceptor-mode=none", "--timeout=90m", fmt.Sprintf("--output-dir=%s", artifactDir), "--junit-report="+junitReportFile, "--label-filter="+labelsToRun, "./cmd", "--", "--generate-rppreproc-report=true", fmt.Sprintf("--rp-preproc-dir=%s", artifactDir))
return sh.RunV("ginkgo", "-p", "--output-interceptor-mode=none", "--timeout=90m", fmt.Sprintf("--output-dir=%s", artifactDir), "--junit-report="+junitReportFile, "--label-filter="+labelsToRun, "./cmd", "--")
}

func CleanupRegisteredPacServers() error {
Expand Down
Loading

0 comments on commit 8a6b8e8

Please sign in to comment.