summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-07-17 09:33:35 -0700
committerRich Trott <rtrott@gmail.com>2016-07-20 09:55:36 -0700
commit135a863f80791f7ecf7e05e5719018bb86f35cd9 (patch)
treedf2bba6defc4851687d9507093a7d40820a91f56 /test
parent74f09432845b048598a95bf5abe6a611df5056b1 (diff)
downloadandroid-node-v8-135a863f80791f7ecf7e05e5719018bb86f35cd9.tar.gz
android-node-v8-135a863f80791f7ecf7e05e5719018bb86f35cd9.tar.bz2
android-node-v8-135a863f80791f7ecf7e05e5719018bb86f35cd9.zip
test: increase RAM requirement for intensive tests
test-fs-read-buffer-tostring-fail and test-fs-readfile-tostring-fail have been timing out on Raspberry Pi 3 devices on the continuous integration server. These devices have 1 Gb of RAM and the tests are memory intensive. Previous checks for memory intensive tests used a 512 Mb cut-off, but that was probably instituted when we only had Pi 1 devices. Consequently, this change increases the threshold for memory-intensive tests to 1 Gb and adds that threshold to test-fs-readfile-tostring-fail. PR-URL: https://github.com/nodejs/node/pull/7772 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'test')
-rw-r--r--test/common.js2
-rw-r--r--test/parallel/test-fs-readfile-tostring-fail.js7
2 files changed, 8 insertions, 1 deletions
diff --git a/test/common.js b/test/common.js
index 308411a13d..aacea9ae76 100644
--- a/test/common.js
+++ b/test/common.js
@@ -27,7 +27,7 @@ exports.isLinuxPPCBE = (process.platform === 'linux') &&
exports.isSunOS = process.platform === 'sunos';
exports.isFreeBSD = process.platform === 'freebsd';
-exports.enoughTestMem = os.totalmem() > 0x20000000; /* 512MB */
+exports.enoughTestMem = os.totalmem() > 0x40000000; /* 1 Gb */
exports.rootDir = exports.isWindows ? 'c:\\' : '/';
function rimrafSync(p) {
diff --git a/test/parallel/test-fs-readfile-tostring-fail.js b/test/parallel/test-fs-readfile-tostring-fail.js
index c61fa2c712..8ed9658a25 100644
--- a/test/parallel/test-fs-readfile-tostring-fail.js
+++ b/test/parallel/test-fs-readfile-tostring-fail.js
@@ -1,6 +1,13 @@
'use strict';
const common = require('../common');
+
+if (!common.enoughTestMem) {
+ const skipMessage = 'intensive toString tests due to memory confinements';
+ common.skip(skipMessage);
+ return;
+}
+
const assert = require('assert');
const fs = require('fs');
const path = require('path');