-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test] Use modern list format for
-s
setting. NFC
- Loading branch information
Showing
4 changed files
with
12 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
# found in the LICENSE file. | ||
|
||
import argparse | ||
import json | ||
import multiprocessing | ||
import os | ||
import random | ||
|
@@ -1712,7 +1711,7 @@ def test_chunked_synchronous_xhr(self): | |
<body> | ||
Chunked XHR Web Worker Test | ||
<script> | ||
var worker = new Worker(""" + json.dumps(worker_filename) + r"""); | ||
var worker = new Worker("%s"); | ||
var buffer = []; | ||
worker.onmessage = (event) => { | ||
if (event.data.channel === "stdout") { | ||
|
@@ -1738,7 +1737,7 @@ def test_chunked_synchronous_xhr(self): | |
</script> | ||
</body> | ||
</html> | ||
""" % self.port) | ||
""" % (worker_filename, self.port)) | ||
|
||
create_file('worker_prejs.js', r""" | ||
Module.arguments = ["/bigfile"]; | ||
|
@@ -3020,12 +3019,12 @@ def test_sdl2_image_formats(self): | |
self.btest_exit('test_sdl2_image.c', 512, args=[ | ||
'--preload-file', 'screenshot.png', | ||
'-DSCREENSHOT_DIRNAME="/"', '-DSCREENSHOT_BASENAME="screenshot.png"', '-DNO_PRELOADED', | ||
'-sUSE_SDL=2', '-sUSE_SDL_IMAGE=2', '-sSDL2_IMAGE_FORMATS=["png"]' | ||
'-sUSE_SDL=2', '-sUSE_SDL_IMAGE=2', '-sSDL2_IMAGE_FORMATS=png' | ||
]) | ||
self.btest_exit('test_sdl2_image.c', 600, args=[ | ||
'--preload-file', 'screenshot.jpg', | ||
'-DSCREENSHOT_DIRNAME="/"', '-DSCREENSHOT_BASENAME="screenshot.jpg"', '-DBITSPERPIXEL=24', '-DNO_PRELOADED', | ||
'-sUSE_SDL=2', '-sUSE_SDL_IMAGE=2', '-sSDL2_IMAGE_FORMATS=["jpg"]' | ||
'-sUSE_SDL=2', '-sUSE_SDL_IMAGE=2', '-sSDL2_IMAGE_FORMATS=jpg' | ||
]) | ||
|
||
@no_wasm64('SDL2 + wasm64') | ||
|
@@ -3423,11 +3422,11 @@ def test_sdl2_mixer_music(self, formats, flags, music_name): | |
shutil.copyfile(test_file('sounds', music_name), music_name) | ||
self.btest_exit('test_sdl2_mixer_music.c', args=[ | ||
'--preload-file', music_name, | ||
'-DSOUND_PATH=' + json.dumps(music_name), | ||
'-DSOUND_PATH="%s"' % music_name, | ||
'-DFLAGS=' + flags, | ||
'-sUSE_SDL=2', | ||
'-sUSE_SDL_MIXER=2', | ||
'-sSDL2_MIXER_FORMATS=' + json.dumps(formats), | ||
'-sSDL2_MIXER_FORMATS=' + ','.join(formats), | ||
'-sINITIAL_MEMORY=33554432' | ||
]) | ||
|
||
|
@@ -3510,7 +3509,7 @@ def test_async_iostream(self): | |
# ASYNCIFY_IMPORTS. | ||
# To make the test more precise we also use ASYNCIFY_IGNORE_INDIRECT here. | ||
@parameterized({ | ||
'normal': (['-sASYNCIFY_IMPORTS=[sync_tunnel, sync_tunnel_bool]'],), # noqa | ||
'normal': (['-sASYNCIFY_IMPORTS=sync_tunnel,sync_tunnel_bool'],), # noqa | ||
'pattern_imports': (['-sASYNCIFY_IMPORTS=[sync_tun*]'],), # noqa | ||
'response': (['[email protected]'],), # noqa | ||
'nothing': (['-DBAD'],), # noqa | ||
|
@@ -3523,7 +3522,7 @@ def test_async_returnvalue(self, args): | |
self.btest('async_returnvalue.cpp', '0', args=['-sASYNCIFY', '-sASYNCIFY_IGNORE_INDIRECT', '--js-library', test_file('browser/async_returnvalue.js')] + args + ['-sASSERTIONS']) | ||
|
||
def test_async_bad_list(self): | ||
self.btest('async_bad_list.cpp', '0', args=['-sASYNCIFY', '-sASYNCIFY_ONLY=[waka]', '--profiling']) | ||
self.btest('async_bad_list.cpp', '0', args=['-sASYNCIFY', '-sASYNCIFY_ONLY=waka', '--profiling']) | ||
|
||
# Tests that when building with -sMINIMAL_RUNTIME, the build can use -sMODULARIZE as well. | ||
def test_minimal_runtime_modularize(self): | ||
|
@@ -4538,7 +4537,7 @@ def test_utf8_textdecoder(self): | |
|
||
@also_with_threads | ||
def test_utf16_textdecoder(self): | ||
self.btest_exit('benchmark/benchmark_utf16.cpp', 0, args=['--embed-file', test_file('utf16_corpus.txt') + '@/utf16_corpus.txt', '-sEXPORTED_RUNTIME_METHODS=[UTF16ToString,stringToUTF16,lengthBytesUTF16]']) | ||
self.btest_exit('benchmark/benchmark_utf16.cpp', 0, args=['--embed-file', test_file('utf16_corpus.txt') + '@/utf16_corpus.txt', '-sEXPORTED_RUNTIME_METHODS=UTF16ToString,stringToUTF16,lengthBytesUTF16']) | ||
|
||
@parameterized({ | ||
'': ([],), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters