From 2006b57a9a80adaa23843fcf84f54d57f6bb0802 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 19 Oct 2023 12:46:04 +0000 Subject: [PATCH] benchmark: skip test-benchmark-os on IBMi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - IBMi does not have the os.uptime implemented so skip otherwise CI tests fail. Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/50286 Reviewed-By: Vinícius Lourenço Claro Cardoso Reviewed-By: Richard Lau Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca --- benchmark/os/uptime.js | 9 ++++++++- test/benchmark/benchmark.status | 3 --- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/benchmark/os/uptime.js b/benchmark/os/uptime.js index 2f25dfe670b722..9826107c69d039 100644 --- a/benchmark/os/uptime.js +++ b/benchmark/os/uptime.js @@ -1,14 +1,21 @@ 'use strict'; +const os = require('os'); const common = require('../common.js'); -const uptime = require('os').uptime; const assert = require('assert'); +const uptime = os.uptime; + const bench = common.createBenchmark(main, { n: [1e5], }); function main({ n }) { + if (os.type() === 'OS400') { + console.log('Skipping: os.uptime is not implemented on IBMi'); + process.exit(0); + } + // Warm up. const length = 1024; const array = []; diff --git a/test/benchmark/benchmark.status b/test/benchmark/benchmark.status index a1d5fdba756546..65e4d815552d3c 100644 --- a/test/benchmark/benchmark.status +++ b/test/benchmark/benchmark.status @@ -20,6 +20,3 @@ prefix benchmark [$arch==arm] -[$system==ibmi] -test-benchmark-os.js: SKIP -