Skip to content

Commit 4e1fb00

Browse files
committed
test_core.py: remove @no_wasm decorator
See: #12335
1 parent bf576fb commit 4e1fb00

File tree

3 files changed

+6
-103
lines changed

3 files changed

+6
-103
lines changed

tests/emscripten_log/emscripten_log.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,23 +105,6 @@ void __attribute__((noinline)) bar(int = 0, char * = 0, double = 0) // Arbitrary
105105
MYASSERT(!!strstr(buffer, "at bar(int,"), "Truncated callstack was %s!", buffer);
106106
MYASSERT(buffer[20] == 0x01, "");
107107
delete[] buffer;
108-
109-
/* With EM_LOG_JS_STACK, the callstack will be
110-
at __Z3bariPcd (src.cpp.o.js:5394:12)
111-
at __Z3FooIiEvv (src.cpp.o.js:5417:4)
112-
at Object._main (src.cpp.o.js:5404:2)
113-
at Object.callMain (src.cpp.o.js:71344:30)
114-
at doRun (src.cpp.o.js:71383:25)
115-
at run (src.cpp.o.js:71396:5)
116-
at Object.<anonymous> (src.cpp.o.js:71439:1)
117-
at Module._compile (module.js:456:26) */
118-
#ifdef RUN_FROM_JS_SHELL
119-
MYASSERT(!!strstr(str, "at __Z3bariPcd (src.cpp"), "Callstack was %s!", str);
120-
MYASSERT(!!strstr(str, "at __Z3FooIiEvv (src.cpp"), "Callstack was %s!", str);
121-
#else
122-
MYASSERT(!!strstr(str, "at __Z3bariPcd (page.js"), "Callstack was %s!", str);
123-
MYASSERT(!!strstr(str, "at __Z3FooIiEvv (page.js"), "Callstack was %s!", str);
124-
#endif
125108
}
126109

127110
template<typename T>

tests/test_core.py

Lines changed: 6 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from tools import shared, building
2525
from runner import RunnerCore, path_from_root, requires_native_clang
2626
from runner import skip_if, no_wasm_backend, needs_dlfcn, no_windows, is_slow_test, create_test_file, parameterized
27-
from runner import js_engines_modify, wasm_engines_modify, env_modify, with_env_modify
27+
from runner import js_engines_modify, wasm_engines_modify, env_modify, with_env_modify, disabled
2828
from runner import NON_ZERO
2929
import clang_native
3030

@@ -104,14 +104,6 @@ def metafunc(self, native_exceptions):
104104
return metafunc
105105

106106

107-
def no_wasm(note=''):
108-
assert not callable(note)
109-
110-
def decorated(f):
111-
return skip_if(f, 'is_wasm', note)
112-
return decorated
113-
114-
115107
def no_wasm2js(note=''):
116108
assert not callable(note)
117109

@@ -2721,7 +2713,7 @@ def test_dlfcn_i64(self):
27212713
self.do_run(src, '|65830|')
27222714

27232715
@needs_dlfcn
2724-
@no_wasm('EM_ASM in shared wasm modules, stored inside the wasm somehow')
2716+
@disabled('EM_ASM in not yet supported in SIDE_MODULE')
27252717
def test_dlfcn_em_asm(self):
27262718
self.prep_dlfcn_lib()
27272719
create_test_file('liblib.cpp', '''
@@ -3771,76 +3763,6 @@ def test_dylink_static_funcpointers(self):
37713763
expected='hello 0\nhello 1\nhello 2\n',
37723764
header='typedef void (*voidfunc)(); void sidey(voidfunc f);', force_c=True)
37733765

3774-
@no_wasm('uses function tables in an asm.js specific way')
3775-
@needs_dlfcn
3776-
def test_dylink_asmjs_funcpointers(self):
3777-
self.dylink_test(
3778-
main=r'''
3779-
#include "header.h"
3780-
#include <emscripten.h>
3781-
void left1() { printf("left1\n"); }
3782-
void left2() { printf("left2\n"); }
3783-
voidfunc getleft1() { return left1; }
3784-
voidfunc getleft2() { return left2; }
3785-
int main(int argc, char **argv) {
3786-
printf("main\n");
3787-
EM_ASM({
3788-
// make the function table sizes a non-power-of-two
3789-
var newSize = alignFunctionTables();
3790-
//out('old size of function tables: ' + newSize);
3791-
while ((newSize & 3) !== 3) {
3792-
Module['FUNCTION_TABLE_v'].push(0);
3793-
newSize = alignFunctionTables();
3794-
}
3795-
//out('new size of function tables: ' + newSize);
3796-
// when masked, the two function pointers 1 and 2 should not happen to fall back to the right place
3797-
assert(((newSize+1) & 3) !== 1 || ((newSize+2) & 3) !== 2);
3798-
loadDynamicLibrary('liblib.so');
3799-
});
3800-
volatilevoidfunc f;
3801-
f = (volatilevoidfunc)left1;
3802-
f();
3803-
f = (volatilevoidfunc)left2;
3804-
f();
3805-
f = (volatilevoidfunc)getright1();
3806-
f();
3807-
f = (volatilevoidfunc)getright2();
3808-
f();
3809-
second();
3810-
return 0;
3811-
}
3812-
''',
3813-
side=r'''
3814-
#include "header.h"
3815-
void right1() { printf("right1\n"); }
3816-
void right2() { printf("right2\n"); }
3817-
voidfunc getright1() { return right1; }
3818-
voidfunc getright2() { return right2; }
3819-
void second() {
3820-
printf("second\n");
3821-
volatilevoidfunc f;
3822-
f = (volatilevoidfunc)getleft1();
3823-
f();
3824-
f = (volatilevoidfunc)getleft2();
3825-
f();
3826-
f = (volatilevoidfunc)right1;
3827-
f();
3828-
f = (volatilevoidfunc)right2;
3829-
f();
3830-
}
3831-
''',
3832-
expected='main\nleft1\nleft2\nright1\nright2\nsecond\nleft1\nleft2\nright1\nright2\n',
3833-
header='''
3834-
#include <stdio.h>
3835-
typedef void (*voidfunc)();
3836-
typedef volatile voidfunc volatilevoidfunc;
3837-
voidfunc getleft1();
3838-
voidfunc getleft2();
3839-
voidfunc getright1();
3840-
voidfunc getright2();
3841-
void second();
3842-
''', need_reverse=False, auto_load=False, force_c=True)
3843-
38443766
@needs_dlfcn
38453767
def test_dylink_funcpointers_wrapper(self):
38463768
self.dylink_test(
@@ -7272,8 +7194,7 @@ def post(filename):
72727194

72737195
self.do_run_in_out_file_test('tests', 'core', 'modularize_closure_pre.c', post_build=post)
72747196

7275-
@no_wasm('wasmifying destroys debug info and stack tracability')
7276-
@no_wasm2js('source maps support')
7197+
@no_wasm2js('symbol names look different wasm2js backtraces')
72777198
def test_emscripten_log(self):
72787199
self.banned_js_engines = [V8_ENGINE] # v8 doesn't support console.log
72797200
self.emcc_args += ['-s', 'DEMANGLE_SUPPORT=1']
@@ -7282,10 +7203,9 @@ def test_emscripten_log(self):
72827203
self.emcc_args += ['-DRUN_FROM_JS_SHELL']
72837204
self.do_run_in_out_file_test('tests', 'emscripten_log', 'emscripten_log.cpp')
72847205
# test closure compiler as well
7285-
if self.run_name == 'asm2':
7286-
print('closure')
7287-
self.emcc_args += ['--closure', '1', '-g1'] # extra testing
7288-
self.do_run_in_out_file_test('tests', 'emscripten_log', 'emscripten_log_with_closure')
7206+
print('closure')
7207+
self.emcc_args += ['--closure', '1', '-g1'] # extra testing
7208+
self.do_run_in_out_file_test('tests', 'emscripten_log', 'emscripten_log_with_closure.cpp')
72897209

72907210
def test_float_literals(self):
72917211
self.do_run_in_out_file_test('tests', 'test_float_literals.cpp')

0 commit comments

Comments
 (0)