diff --git a/package.json b/package.json index b5c912b..d899e5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xprofiler", - "version": "2.5.0", + "version": "2.5.1", "description": "node.js addon to output runtime logs", "bin": { "xprofctl": "bin/xprofctl" @@ -25,8 +25,8 @@ "lint": "npm run format && eslint --fix *.js \"test/**/*.js\" lib/*.js patch/*.js bin/xprofctl scripts/**/*.js", "test": "mocha -t 0 -R spec test/*.test.js test/patch/*.test.js", "test-single": "mocha -t 0 -R spec", - "cov": "nyc --reporter=html --reporter=text --reporter=lcov mocha -R spec test/*.test.js test/patch/*.test.js --timeout 0", - "cov-single": "nyc --reporter=html --reporter=text --reporter=lcov mocha --timeout 0 -R spec", + "cov": "nyc --reporter=html --reporter=text --reporter=lcov mocha -R spec test/*.test.js test/patch/*.test.js --timeout 60000", + "cov-single": "nyc --reporter=html --reporter=text --reporter=lcov mocha --timeout 60000 -R spec", "codecov": "codecov || echo 'warning: ignoring codecov failure'", "ci": "npm run lint && npm run build && npm run cov && npm run codecov", "dep": "npm run build && npm run cov", diff --git a/test/fixtures/cases/command.js b/test/fixtures/cases/command.js index e06564c..203e819 100644 --- a/test/fixtures/cases/command.js +++ b/test/fixtures/cases/command.js @@ -399,6 +399,7 @@ exports = module.exports = function (logdir) { }, { platform: 'linux', + arch: 'x64', cmd: 'generate_coredump', profileRules: checkCoreDump, xctlRules(data) { diff --git a/test/fixtures/cases/hooks.js b/test/fixtures/cases/hooks.js index 41faf7a..d905704 100644 --- a/test/fixtures/cases/hooks.js +++ b/test/fixtures/cases/hooks.js @@ -24,6 +24,7 @@ exports = module.exports = function () { }, { platform: 'linux', + arch: 'x64', title: 'fatal error hook is valid', subTitle: 'x-fatal-error.core is created when fatal error occured.', jspath: exitFatalErrorScriptPath, diff --git a/test/fixtures/utils.js b/test/fixtures/utils.js index 29d14fb..21799db 100644 --- a/test/fixtures/utils.js +++ b/test/fixtures/utils.js @@ -152,7 +152,11 @@ exports.filterTestCaseByPlatform = function filterTestCaseByPlatform(list) { return list; } - return list.filter(item => !item.platform || item.platform === os.platform()); + return list.filter(item => { + const matchedOs = !item.platform || item.platform === os.platform(); + const matchedArch = !item.arch || item.arch === os.arch(); + return matchedOs && matchedArch; + }); }; exports.clientConst = {