Commit 1fcb843c by Mithgol the Webmaster

skip JSON tests only when `--sqlite=/usr` (or similar) is tested

parent fe4812ed
...@@ -20,6 +20,7 @@ npm test ...@@ -20,6 +20,7 @@ npm test
publish publish
# now test building against shared sqlite # now test building against shared sqlite
export NODE_SQLITE3_JSON1=no
if [[ $(uname -s) == 'Darwin' ]]; then if [[ $(uname -s) == 'Darwin' ]]; then
brew install sqlite brew install sqlite
npm install --build-from-source --sqlite=$(brew --prefix) --clang=1 npm install --build-from-source --sqlite=$(brew --prefix) --clang=1
...@@ -27,6 +28,7 @@ else ...@@ -27,6 +28,7 @@ else
npm install --build-from-source --sqlite=/usr --clang=1 npm install --build-from-source --sqlite=/usr --clang=1
fi fi
npm test npm test
export NODE_SQLITE3_JSON1=yes
platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/") platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/")
...@@ -61,6 +63,7 @@ if [[ $(uname -s) == 'Linux' ]]; then ...@@ -61,6 +63,7 @@ if [[ $(uname -s) == 'Linux' ]]; then
# broken for some unknown reason against io.js # broken for some unknown reason against io.js
if [[ ${NODE_VERSION:0:4} != 'iojs' ]]; then if [[ ${NODE_VERSION:0:4} != 'iojs' ]]; then
# test source compile in 32 bit mode against external libsqlite3 # test source compile in 32 bit mode against external libsqlite3
export NODE_SQLITE3_JSON1=no
CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr --clang=1 CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr --clang=1
npm test npm test
fi fi
......
var sqlite3 = require('..'); var sqlite3 = require('..');
describe.skip('json', function() { if( process.env.NODE_SQLITE3_JSON1 === 'no' ){
describe('json', function() {
it(
'skips JSON tests when --sqlite=/usr (or similar) is tested',
function(){}
);
});
} else {
describe('json', function() {
var db; var db;
before(function(done) { before(function(done) {
...@@ -10,4 +18,5 @@ describe.skip('json', function() { ...@@ -10,4 +18,5 @@ describe.skip('json', function() {
it('should select JSON', function(done) { it('should select JSON', function(done) {
db.run('SELECT json(?)', JSON.stringify({ok:true}), done); db.run('SELECT json(?)', JSON.stringify({ok:true}), done);
}); });
}); });
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment