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 <[email protected]>
PR-URL: #50286
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
mhdawson authored and targos committed Nov 11, 2023
1 parent 5ccdda4 commit 2006b57
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 2006b57

Please sign in to comment.