Skip to content

Commit

Permalink
Rename sql-memory-growth.js to sql-asm-memory-growth.js
Browse files Browse the repository at this point in the history
Commit other test files that use new `load_sql_lib` instead of old `load_sql_file`
  • Loading branch information
Taytay committed Jan 7, 2019
1 parent 6e769a6 commit 6b3c46d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
16 changes: 7 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ js/sql-wasm-debug.js: $(BITCODE_FILES) $(OUTPUT_WRAPPER_FILES) js/api.js exporte


.PHONY: optimized
# TODO: sql-memory-growth.js should be renamed to be asm specific
optimized: js/sql-asm.js js/sql-wasm.js js/sql-memory-growth.js
optimized: js/sql-asm.js js/sql-wasm.js js/sql-asm-memory-growth.js

js/sql-asm.js: $(BITCODE_FILES) $(OUTPUT_WRAPPER_FILES) js/api.js exported_functions exported_runtime_methods
$(EMCC) $(EMFLAGS) $(EMFLAGS_OPTIMIZED) -s WASM=0 $(BITCODE_FILES) --pre-js js/api.js -o $@
Expand All @@ -65,7 +64,7 @@ js/sql-wasm.js: $(BITCODE_FILES) $(OUTPUT_WRAPPER_FILES) js/api.js exported_func
cat js/shell-pre.js js/tmp-raw.js js/shell-post.js > $@
rm js/tmp-raw.js

js/sql-memory-growth.js: $(BITCODE_FILES) $(OUTPUT_WRAPPER_FILES) js/api.js exported_functions exported_runtime_methods
js/sql-asm-memory-growth.js: $(BITCODE_FILES) $(OUTPUT_WRAPPER_FILES) js/api.js exported_functions exported_runtime_methods
$(EMCC) $(EMFLAGS) $(EMFLAGS_OPTIMIZED) -s WASM=0 -s ALLOW_MEMORY_GROWTH=1 $(BITCODE_FILES) --pre-js js/api.js -o $@
mv $@ js/tmp-raw.js
cat js/shell-pre.js js/tmp-raw.js js/shell-post.js > $@
Expand All @@ -74,13 +73,12 @@ js/sql-memory-growth.js: $(BITCODE_FILES) $(OUTPUT_WRAPPER_FILES) js/api.js expo

# Web worker API
.PHONY: worker
worker: js/worker.sql.js js/worker.sql-asm-debug.js js/worker.sql-wasm.js js/worker.sql-wasm-debug.js
worker: js/worker.sql-asm.js js/worker.sql-asm-debug.js js/worker.sql-wasm.js js/worker.sql-wasm-debug.js

js/worker.js: coffee/worker.coffee
cat $^ | coffee --bare --compile --stdio > $@

# TODO: worker is currently asm rather than wasm
js/worker.sql.js: js/sql-asm.js js/worker.js
js/worker.sql-asm.js: js/sql-asm.js js/worker.js
cat $^ > $@

js/worker.sql-asm-debug.js: js/sql-asm-debug.js js/worker.js
Expand Down Expand Up @@ -114,7 +112,7 @@ clean:
rm -f c/sqlite3.bc \
c/extension-functions.bc \
js/sql-asm.js \
js/sql-memory-growth.js \
js/sql-asm-memory-growth.js \
js/sql.wasm \
js/sql-asm-debug.js \
js/sql-debug.wasm \
Expand All @@ -124,9 +122,9 @@ clean:
js/sql-wasm-debug.wasm \
js/api.js \
js/worker.js \
js/worker.sql.js \
js/worker.sql-asm.js \
js/worker.sql-asm-debug.js \
js/worker.sql-wasm.js \
js/worker.sql-debug-wasm.js
js/worker.sql-wasm-debug.js


6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"scripts": {
"build": "make",
"rebuild": "make clean && make",
"test": "npm run test-asm && npm run test-debug && npm run test-wasm && npm run test-wasm-debug && npm run test-memory-growth",
"test": "npm run test-asm && npm run test-asm-debug && npm run test-wasm && npm run test-wasm-debug && npm run test-asm-memory-growth",
"test-asm": "node test/all.js asm",
"test-asm-debug": "node test/all.js asm-debug",
"test-asm-memory-growth": "node test/all.js asm-memory-growth",
"test-wasm": "node test/all.js wasm",
"test-wasm-debug": "node test/all.js wasm-debug",
"test-memory-growth": "node test/all.js memory-growth"
"test-wasm-debug": "node test/all.js wasm-debug"
},
"homepage": "http://github.com/kripken/sql.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion test/test_blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exports.test = function(SQL, assert){

if (module == require.main) {
const target_file = process.argv[2];
const sql_loader = require('./load_sql_file');
const sql_loader = require('./load_sql_lib');
sql_loader(target_file).then((sql)=>{
require('test').run({
'test blob': function(assert){
Expand Down
2 changes: 1 addition & 1 deletion test/test_database.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ exports.test = function(sql, assert, done) {

if (module == require.main) {
const target_file = process.argv[2];
const sql_loader = require('./load_sql_file');
const sql_loader = require('./load_sql_lib');
sql_loader(target_file).then((sql)=>{
require('test').run({
'test database': function(assert, done){
Expand Down
2 changes: 1 addition & 1 deletion test/test_errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ exports.test = function(sql, assert) {

if (module == require.main) {
const target_file = process.argv[2];
const sql_loader = require('./load_sql_file');
const sql_loader = require('./load_sql_lib');
sql_loader(target_file).then((sql)=>{
require('test').run({
'test errors': function(assert){
Expand Down
2 changes: 1 addition & 1 deletion test/test_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ exports.test = function(SQL, assert){

if (module == require.main) {
const target_file = process.argv[2];
const sql_loader = require('./load_sql_file');
const sql_loader = require('./load_sql_lib');
sql_loader(target_file).then((sql)=>{
require('test').run({
'test functions': function(assert, done){
Expand Down

0 comments on commit 6b3c46d

Please sign in to comment.