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: #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 UlisesGascon committed Dec 11, 2023
1 parent 2d06eea commit dbe6c5f
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 dbe6c5f

Please sign in to comment.