Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit e07ec38

Browse files
committed
[Bug 16543][emscripten] Use "real" startup script when running tests.
1 parent 5bbd118 commit e07ec38

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

tests/_emscripten/__startup.livecodescript

Lines changed: 0 additions & 4 deletions
This file was deleted.

tools/emscripten_testgen.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ em_stack_dir=${em_test_build_dir}/standalone/boot/standalone
2121
# Get version information
2222
short_ver=$(perl ${top_src_dir}/util/decode_version.pl BUILD_SHORT_VERSION ${top_src_dir}/version)
2323

24+
# Comput boot stack hash
25+
boot_hash=$(head -c1024 ${em_test_src_dir}/__boot.livecodescript | sha1sum -b | cut -f1 -d" ")
26+
2427
# Clean up from previous run and create required directories
2528
rm -rf ${em_test_build_dir}
2629
mkdir -p ${em_test_build_dir}
@@ -47,8 +50,11 @@ find ${test_src_dir} \
4750
-print \
4851
-exec rm '{}' ';'
4952
cp ${test_src_dir}/_test*lib.livecodescript ${em_stack_dir}
50-
# Copy in startup and boot stacks
53+
# Copy in boot stack
5154
cp ${em_test_src_dir}/__boot.livecodescript ${em_test_build_dir}/standalone/boot/standalone/__boot.livecode
52-
cp ${em_test_src_dir}/__startup.livecodescript ${em_test_build_dir}/standalone/boot/__startup.livecode
55+
# Copy in startup stack and make substitutions
56+
cp ${top_src_dir}/engine/rsrc/emscripten-startup-template.livecodescript ${em_test_build_dir}/standalone/boot/__startup.livecode
57+
sed -i -e"s,@BOOT_HASH@,${boot_hash}," ${em_test_build_dir}/standalone/boot/__startup.livecode
58+
sed -i -e"s,@ENGINE_VERSION@,${short_ver}," ${em_test_build_dir}/standalone/boot/__startup.livecode
5359
# Create the standalone.zip file
5460
( cd ${em_test_build_dir}/standalone && zip -0qr ${em_test_build_dir}/standalone.zip * )

0 commit comments

Comments
 (0)