@@ -386,52 +386,6 @@ def run_validator_tests():
386386 support .run_command (cmd , expected_status = 1 )
387387
388388
389- def run_vanilla_tests ():
390- if not (shared .has_vanilla_emcc and shared .has_vanilla_llvm and 0 ):
391- print ('\n [ skipping emcc WASM_BACKEND testcases...]\n ' )
392- return
393-
394- print ('\n [ checking emcc WASM_BACKEND testcases...]\n ' )
395-
396- try :
397- if shared .has_vanilla_llvm :
398- os .environ ['LLVM' ] = shared .BIN_DIR # use the vanilla LLVM
399- else :
400- # if we did not set vanilla llvm, then we must set this env var to make emcc use the wasm backend.
401- # (if we are using vanilla llvm, things should just work)
402- print ('(not using vanilla llvm, so setting env var to tell emcc to use wasm backend)' )
403- os .environ ['EMCC_WASM_BACKEND' ] = '1'
404- VANILLA_EMCC = os .path .join (shared .options .binaryen_test , 'emscripten' , 'emcc' )
405- # run emcc to make sure it sets itself up properly, if it was never run before
406- command = [VANILLA_EMCC , '-v' ]
407- print ('____' + ' ' .join (command ))
408- subprocess .check_call (command )
409-
410- for c in shared .get_tests (shared .get_test_dir ('wasm_backend' ), '.cpp' ):
411- print ('..' , os .path .basename (c ))
412- base = c .replace ('.cpp' , '' ).replace ('.c' , '' )
413- expected = open (os .path .join (base + '.txt' )).read ()
414- for opts in [[], ['-O1' ], ['-O2' ]]:
415- # only my code is a hack we used early in wasm backend dev, which somehow worked, but only with -O1
416- only = [] if opts != ['-O1' ] or '_only' not in base else ['-s' , 'ONLY_MY_CODE=1' ]
417- command = [VANILLA_EMCC , '-o' , 'a.wasm.js' , c ] + opts + only
418- print ('....' + ' ' .join (command ))
419- if os .path .exists ('a.wasm.js' ):
420- os .unlink ('a.wasm.js' )
421- subprocess .check_call (command )
422- if shared .NODEJS :
423- print (' (check in node)' )
424- cmd = [shared .NODEJS , 'a.wasm.js' ]
425- out = support .run_command (cmd )
426- if out .strip () != expected .strip ():
427- shared .fail (out , expected )
428- finally :
429- if shared .has_vanilla_llvm :
430- del os .environ ['LLVM' ]
431- else :
432- del os .environ ['EMCC_WASM_BACKEND' ]
433-
434-
435389def run_gcc_tests ():
436390 print ('\n [ checking native gcc testcases...]\n ' )
437391 if not shared .NATIVECC or not shared .NATIVEXX :
@@ -515,7 +469,6 @@ def run_unittest():
515469 ('lld' , lld .test_wasm_emscripten_finalize ),
516470 ('wasm2js' , wasm2js .test_wasm2js ),
517471 ('validator' , run_validator_tests ),
518- ('vanilla' , run_vanilla_tests ),
519472 ('gcc' , run_gcc_tests ),
520473 ('unit' , run_unittest ),
521474])
0 commit comments