Skip to content

Commit

Permalink
benchmark: skip test-benchmark-os on IBMi
Browse files Browse the repository at this point in the history
- IBMi does not have the os.uptime implemented so skip
  otherwise CI tests fail.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: nodejs#50286
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
mhdawson authored and alexfernandez committed Nov 1, 2023
1 parent 6b19329 commit af0fe08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 8 additions & 1 deletion benchmark/os/uptime.js
Original file line number Diff line number Diff line change
@@ -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 = [];
Expand Down
3 changes: 0 additions & 3 deletions test/benchmark/benchmark.status
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ prefix benchmark

[$arch==arm]

[$system==ibmi]
test-benchmark-os.js: SKIP

0 comments on commit af0fe08

Please sign in to comment.