Skip to content

Commit ead09e9

Browse files
authored
Picking files from test/prototype (#70)
1 parent 1869d2c commit ead09e9

File tree

6 files changed

+30
-2
lines changed

6 files changed

+30
-2
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,17 @@ libzim-wasm.dev.js: libzim_bindings.cpp prejs_file_api.js postjs_file_api.js
9393
# Development ASM version for testing with WORKERFS and NODEFS, completely unoptimized
9494
libzim-asm.dev.js: libzim_bindings.cpp prejs_file_api.js postjs_file_api.js
9595
em++ -o libzim-asm.dev.js --bind libzim_bindings.cpp -I/src/build/include -L/src/build/lib -lzim -llzma -lzstd -lxapian -lz -licui18n -licuuc -licudata -lm -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -Werror -std=c++11 -O0 -g --pre-js prejs_file_api.js --post-js postjs_file_api.js -s WASM=0 --memory-init-file 0 -s DISABLE_EXCEPTION_CATCHING=0 -s DYNAMIC_EXECUTION=0 -s "EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','err','ALLOC_STACK','out']" -s DEMANGLE_SUPPORT=1 -s INITIAL_MEMORY=83886080 -s ALLOW_MEMORY_GROWTH=1 -lworkerfs.js -lnodefs.js
96+
cp libzim-asm.dev.* tests/prototype/
9697

9798
# Production WASM version with WORKERFS and NODEFS, optimized and packed
9899
libzim-wasm.js: libzim_bindings.cpp prejs_file_api.js postjs_file_api.js
99100
em++ -o libzim-wasm.js --bind libzim_bindings.cpp -I/src/build/include -L/src/build/lib -lzim -llzma -lzstd -lxapian -lz -licui18n -lpthread -licuuc -licudata -O3 --pre-js prejs_file_api.js --post-js postjs_file_api.js -s WASM=1 -s "EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','err','ALLOC_STACK','out']" -s INITIAL_MEMORY=83886080 -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1 -s DYNAMIC_EXECUTION=0 -lworkerfs.js -lnodefs.js
101+
cp libzim-wasm.* tests/prototype/
100102

101103
# Production ASM version with WORKERFS and NODEFS, optimized and packed
102104
libzim-asm.js: libzim_bindings.cpp prejs_file_api.js postjs_file_api.js
103105
em++ -o libzim-asm.js --bind libzim_bindings.cpp -I/src/build/include -L/src/build/lib -lzim -llzma -lzstd -lxapian -lz -licui18n -licuuc -licudata -O3 --pre-js prejs_file_api.js --post-js postjs_file_api.js -s WASM=0 --memory-init-file 0 -s MIN_EDGE_VERSION=40 -s "EXPORTED_RUNTIME_METHODS=['ALLOC_NORMAL','err','ALLOC_STACK','out']" -s DISABLE_EXCEPTION_CATCHING=0 -s INITIAL_MEMORY=83886080 -s ALLOW_MEMORY_GROWTH=1 -s DYNAMIC_EXECUTION=0 -lworkerfs.js -lnodefs.js
106+
cp libzim-asm.* tests/prototype/
104107

105108
# Test case: for testing large files
106109
large_file_access.js: test_file_bindings.cpp prejs_test_file_access.js postjs_test_file_access.js

tests/prototype/libzim-asm.js

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/prototype/libzim-wasm.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/prototype/libzim-wasm.wasm

1.98 MB
Binary file not shown.

tests/prototype/ray_charles.e2e.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ function runTests (driver) {
4040
this.timeout(20000);
4141

4242
before(async function () {
43-
const APP_URL = APP_HOST.href + 'tests/prototype/index.html?worker=' + encodeURI(APP_HOST.href + file);
43+
const APP_URL =
44+
APP_HOST.href +
45+
"tests/prototype/index.html?worker=" +
46+
encodeURI(file);
4447

4548
await driver.get(APP_URL);
4649
await driver.wait(until.elementLocated(By.id('iframeResult')));

tests/prototype/stackexchange.e2e.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ function runTests (driver) {
4040
this.timeout(20000);
4141

4242
before(async function () {
43-
const APP_URL = APP_HOST.href + 'tests/prototype/index.html?worker=' + encodeURI(APP_HOST.href + file);
43+
const APP_URL =
44+
APP_HOST.href +
45+
"tests/prototype/index.html?worker=" +
46+
encodeURI(file);
4447

4548
await driver.get(APP_URL);
4649
await driver.wait(until.elementLocated(By.id('iframeResult')));

0 commit comments

Comments
 (0)