From ce42ce435e7fbdddd9dacc258b4aea2789a7e8f6 Mon Sep 17 00:00:00 2001 From: Anand Kumar Singh Date: Thu, 17 Nov 2022 01:52:49 +0530 Subject: [PATCH] InterOP: enable test report generation for tests (#6307) * enable test report generation for tests Signed-off-by: anandrkskd * add test-reports to gitignore Signed-off-by: anandrkskd Signed-off-by: anandrkskd --- .gitignore | 2 +- Makefile | 6 +++--- scripts/openshiftci-presubmit-all-tests.sh | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 377f97956..7908c9ab4 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ bin coverage.txt # Ignore test reports -reports/ +test-*.xml # # GO SPECIFIC diff --git a/Makefile b/Makefile index 9c3b1573b..87532628d 100644 --- a/Makefile +++ b/Makefile @@ -190,15 +190,15 @@ openshiftci-presubmit-unittests: .PHONY: test-integration-cluster test-integration-cluster: - $(RUN_GINKGO) $(GINKGO_FLAGS) --label-filter="!nocluster" tests/integration + $(RUN_GINKGO) $(GINKGO_FLAGS) --junit-report="test-integration.xml" --label-filter="!nocluster" tests/integration .PHONY: test-integration-no-cluster test-integration-no-cluster: - $(RUN_GINKGO) $(GINKGO_FLAGS_AUTO) --label-filter=nocluster tests/integration + $(RUN_GINKGO) $(GINKGO_FLAGS_AUTO) --junit-report="test-integration-nc.xml" --label-filter=nocluster tests/integration .PHONY: test-integration test-integration: test-integration-no-cluster test-integration-cluster .PHONY: test-e2e test-e2e: - $(RUN_GINKGO) $(GINKGO_FLAGS) tests/e2escenarios \ No newline at end of file + $(RUN_GINKGO) $(GINKGO_FLAGS) --junit-report="test-e2e.xml" tests/e2escenarios \ No newline at end of file diff --git a/scripts/openshiftci-presubmit-all-tests.sh b/scripts/openshiftci-presubmit-all-tests.sh index 48fb1b04d..e5a922b61 100755 --- a/scripts/openshiftci-presubmit-all-tests.sh +++ b/scripts/openshiftci-presubmit-all-tests.sh @@ -55,4 +55,7 @@ else fi fi +#copy artifact to shared volume +cp -r test-*.xml $ARTIFACT_DIR + oc logout