Repository: nodejs/node
Pull request: test: change jenkins reporter

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->

This PR intends to change the test reporter in Jenkins CI to report errors only.

Follow up of #56739

Changed files:
filename: test/es-module/test-esm-no-addons.mjs
patch: @@ -15,8 +15,7 @@ if (isMainThread) {
     loadFixture('pkgexports/no-addons').then(
       mustCall((module) => {
         const message = module.default;
-
-        if (process.execArgv.length === 0) {
+        if (!process.execArgv.includes('--no-addons')) {
           assert.strictEqual(message, 'using native addons');
         } else {
           assert.strictEqual(message, 'not using native addons');

filename: tools/test.py
patch: @@ -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
@@ -1448,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=True, action="store_true")
   return result
 
 
@@ -1663,6 +1664,10 @@ def Main():
     options.node_args.append("--always-turbofan")
     options.progress = "deopts"
 
+  if options.error_reporter:
+    options.node_args.append('--test-reporter=./test/common/test-error-reporter.js')
+    options.node_args.append('--test-reporter-destination=stdout')
+
   if options.worker:
     run_worker = join(workspace, "tools", "run-worker.js")
     options.node_args.append(run_worker)