Skip to content

Commit

Permalink
fixup! test: change jenkins reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceres6 committed Jan 30, 2025
1 parent 5143039 commit 53030d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -570,15 +570,15 @@ endif
# Related CI job: node-test-commit-arm-fanned
test-ci-native: LOGLEVEL := info ## Build and test addons without building anything else.
test-ci-native: | benchmark/napi/.buildstamp test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp test/sqlite/.buildstamp
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap --error-reporter \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)

.PHONY: test-ci-js
# This target should not use a native compiler at all
# Related CI job: node-test-commit-arm-fanned
test-ci-js: | clear-stalled ## Build and test JavaScript with building anything else.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap --error-reporter \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
--skip-tests=$(CI_SKIP_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES)
Expand All @@ -594,7 +594,7 @@ test-ci-js: | clear-stalled ## Build and test JavaScript with building anything
test-ci: LOGLEVEL := info ## Build and test everything (CI).
test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests build-sqlite-tests doc-only
out/Release/cctest --gtest_output=xml:out/junit/cctest.xml
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap --error-reporter \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC)
$(NODE) ./test/embedding/test-embedding.js
Expand Down
15 changes: 9 additions & 6 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,7 @@ def HasRun(self, output):

class ActionsAnnotationProgressIndicator(DotsProgressIndicator):
def AboutToRun(self, case):
case.additional_flags = case.additional_flags.copy() if hasattr(case, 'additional_flags') else []
case.additional_flags.append('--test-reporter=./test/common/test-error-reporter.js')
case.additional_flags.append('--test-reporter-destination=stdout')
pass

def GetAnnotationInfo(self, test, output):
traceback = output.stdout + output.stderr
Expand Down Expand Up @@ -351,9 +349,7 @@ def Starting(self):
self._done = 0

def AboutToRun(self, case):
case.additional_flags = case.additional_flags.copy() if hasattr(case, 'additional_flags') else []
case.additional_flags.append('--test-reporter=./test/common/test-error-reporter.js')
case.additional_flags.append('--test-reporter-destination=stdout')
pass

def HasRun(self, output):
self._done += 1
Expand Down Expand Up @@ -1450,6 +1446,9 @@ def BuildOptions():
result.add_option("--type",
help="Type of build (simple, fips, coverage)",
default=None)
result.add_option("--error-reporter",
help="use error reporter",
default=False, action="store_true")
return result


Expand Down Expand Up @@ -1668,6 +1667,10 @@ def Main():
if options.worker:
run_worker = join(workspace, "tools", "run-worker.js")
options.node_args.append(run_worker)

if options.error_reporter:
options.node_args.append('--test-reporter=./test/common/test-error-reporter.js')
options.node_args.append('--test-reporter-destination=stdout')

processor = GetSpecialCommandProcessor(options.special_command)

Expand Down

0 comments on commit 53030d2

Please sign in to comment.