Skip to content

Commit 2006b57

Browse files
mhdawsontargos
authored andcommitted
benchmark: skip test-benchmark-os on IBMi
- 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>
1 parent 5ccdda4 commit 2006b57

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

benchmark/os/uptime.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
'use strict';
22

3+
const os = require('os');
34
const common = require('../common.js');
4-
const uptime = require('os').uptime;
55
const assert = require('assert');
66

7+
const uptime = os.uptime;
8+
79
const bench = common.createBenchmark(main, {
810
n: [1e5],
911
});
1012

1113
function main({ n }) {
14+
if (os.type() === 'OS400') {
15+
console.log('Skipping: os.uptime is not implemented on IBMi');
16+
process.exit(0);
17+
}
18+
1219
// Warm up.
1320
const length = 1024;
1421
const array = [];

test/benchmark/benchmark.status

-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,3 @@ prefix benchmark
2020

2121
[$arch==arm]
2222

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

0 commit comments

Comments
 (0)