From b5416481bee216c039060dda0bd40c9fac2a98b7 Mon Sep 17 00:00:00 2001 From: emadum Date: Thu, 19 Nov 2020 11:09:05 -0500 Subject: [PATCH 1/4] chore(ci): xunit integration --- .evergreen/config.yml.in | 6 +++++- .gitignore | 3 +++ package-lock.json | 6 ++++++ package.json | 1 + test/mocha.opts | 1 + 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.evergreen/config.yml.in b/.evergreen/config.yml.in index 405e9160647..0588c53cbf6 100644 --- a/.evergreen/config.yml.in +++ b/.evergreen/config.yml.in @@ -464,7 +464,10 @@ functions: -v \ --fault revoked - + upload test results: + - command: attach.xunit_results + params: + file: src/xunit.xml pre: - func: "fetch source" - func: "prepare resources" @@ -473,4 +476,5 @@ pre: - func: "make files executable" post: + - func: "upload test results" - func: "cleanup" diff --git a/.gitignore b/.gitignore index 66bbd676ea8..abd919a61b9 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,9 @@ manual_tests/ docs/build docs/Makefile +# xunit test output for CI +xunit.xml + # Directory for dbs db diff --git a/package-lock.json b/package-lock.json index 0db2dc90c1a..57f09ff43a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3816,6 +3816,12 @@ } } }, + "spec-xunit-file": { + "version": "0.0.1-3", + "resolved": "https://registry.npmjs.org/spec-xunit-file/-/spec-xunit-file-0.0.1-3.tgz", + "integrity": "sha1-hVpmq4w4LrMWXfkoqB0HSQKdI4Y=", + "dev": true + }, "standard-version": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-4.4.0.tgz", diff --git a/package.json b/package.json index 2ad3ea9241a..913c6793eca 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "sinon": "^4.3.0", "sinon-chai": "^3.2.0", "snappy": "^6.3.4", + "spec-xunit-file": "0.0.1-3", "standard-version": "^4.4.0", "util.promisify": "^1.0.1", "worker-farm": "^1.5.0", diff --git a/test/mocha.opts b/test/mocha.opts index 7ff3fc1319d..bb788046251 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -2,3 +2,4 @@ --timeout 60000 --file test/tools/runner --ui test/tools/runner/metadata_ui.js + --reporter spec-xunit-file \ No newline at end of file From 10774eaa8bdaabc60b987f6279ee8f74396d2e2d Mon Sep 17 00:00:00 2001 From: emadum Date: Thu, 19 Nov 2020 11:10:39 -0500 Subject: [PATCH 2/4] generate config.yml --- .evergreen/config.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 394c6371afc..ef2312d587a 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -375,7 +375,7 @@ functions: UNIFIED=${UNIFIED} \ CA_FILE="$DRIVERS_TOOLS/.evergreen/ocsp/rsa/ca.pem" \ OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \ - bash ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-tests.sh + sh ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-tests.sh run-valid-ocsp-server: - command: shell.exec params: @@ -412,12 +412,17 @@ functions: -p 8100 \ -v \ --fault revoked + upload test results: + - command: attach.xunit_results + params: + file: src/xunit.xml pre: - func: fetch source - func: prepare resources - func: fix absolute paths - func: make files executable post: + - func: upload test results - func: cleanup tasks: - name: test-latest-server From 4885ada18931f2e1d0631b1605d994230548b33d Mon Sep 17 00:00:00 2001 From: emadum Date: Thu, 19 Nov 2020 11:14:45 -0500 Subject: [PATCH 3/4] fix: update config.yml.in with change to config.yml --- .evergreen/config.yml | 2 +- .evergreen/config.yml.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index ef2312d587a..e22ced00e47 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -375,7 +375,7 @@ functions: UNIFIED=${UNIFIED} \ CA_FILE="$DRIVERS_TOOLS/.evergreen/ocsp/rsa/ca.pem" \ OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \ - sh ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-tests.sh + bash ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-tests.sh run-valid-ocsp-server: - command: shell.exec params: diff --git a/.evergreen/config.yml.in b/.evergreen/config.yml.in index 0588c53cbf6..e450f48340f 100644 --- a/.evergreen/config.yml.in +++ b/.evergreen/config.yml.in @@ -424,7 +424,7 @@ functions: UNIFIED=${UNIFIED} \ CA_FILE="$DRIVERS_TOOLS/.evergreen/ocsp/rsa/ca.pem" \ OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \ - sh ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-tests.sh + bash ${PROJECT_DIRECTORY}/.evergreen/run-ocsp-tests.sh run-valid-ocsp-server: - command: shell.exec From 75305b3aeeda62775e77487c468dac7c04370aec Mon Sep 17 00:00:00 2001 From: emadum Date: Thu, 19 Nov 2020 11:15:33 -0500 Subject: [PATCH 4/4] cleanup --- test/mocha.opts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mocha.opts b/test/mocha.opts index bb788046251..cf335621394 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -2,4 +2,4 @@ --timeout 60000 --file test/tools/runner --ui test/tools/runner/metadata_ui.js - --reporter spec-xunit-file \ No newline at end of file + --reporter spec-xunit-file