Skip to content

Commit

Permalink
Lodash dependency fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
unbornchikken committed Mar 24, 2016
1 parent e78db06 commit 95eb0f7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nooocl",
"version": "0.11.0",
"version": "0.11.1",
"author": "Gábor Mező aka unbornchikken",
"description": "NOOOCL: Node.js Object Oriented OpenCL Bindings",
"homepage": "https://github.com/unbornchikken/nooocl",
Expand All @@ -24,12 +24,12 @@
"native"
],
"scripts": {
"test": "mocha --expose-gc ./tests"
"test": "mocha --expose-gc ./tests -t 60000"
},
"dependencies": {
"bluebird": "*",
"bluebird": "2",
"ffi": "2",
"lodash": "*",
"lodash": "3",
"ref": "1",
"ref-array": "1",
"ref-struct": "1",
Expand Down
42 changes: 22 additions & 20 deletions tests/testHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,28 @@ var gpuWarn = false;

var testHelpers = {
doTest: function (testMethod, version) {
var pm = testMethod;
testMethod = function (env) {
// console.log("Testing on: " + env.device.name + " - " + env.device.platform.name);
return pm(env);
};
version = version || CLHost.supportedVersions.cl11;
var host = new CLHost(version);
var cpuEnv = testHelpers.createEnvironment(host, "cpu");
var cpuTestResult = cpuEnv ? testMethod(cpuEnv) : Bluebird.resolve();
var gpuEnv = testHelpers.createEnvironment(host, "gpu");
if (gpuEnv) {
return cpuTestResult.then(function () {
return testMethod(gpuEnv);
});
}
if (!gpuWarn) {
console.warn("GPU is not available!");
gpuWarn = true;
}
return cpuTestResult;
return Bluebird.try(function () {
var pm = testMethod;
testMethod = function (env) {
// console.log("Testing on: " + env.device.name + " - " + env.device.platform.name);
return pm(env);
};
version = version || CLHost.supportedVersions.cl11;
var host = new CLHost(version);
var cpuEnv = testHelpers.createEnvironment(host, "cpu");
var cpuTestResult = cpuEnv ? testMethod(cpuEnv) : Bluebird.resolve();
var gpuEnv = testHelpers.createEnvironment(host, "gpu");
if (gpuEnv) {
return cpuTestResult.then(function () {
return testMethod(gpuEnv);
});
}
if (!gpuWarn) {
console.warn("GPU is not available!");
gpuWarn = true;
}
return cpuTestResult;
});
},
createEnvironment: function (host, hardware) {
assert(_.isObject(host));
Expand Down

0 comments on commit 95eb0f7

Please sign in to comment.