@no_wasm_backend("uses bitcode compiled with asmjs, and we don't have unified triples")
@is_slow_test
def test_zzz_cases(self):
    self.set_setting('EXIT_RUNTIME', 1)
    self.set_setting('ERROR_ON_UNDEFINED_SYMBOLS', 0)
    self.set_setting('WARN_ON_UNDEFINED_SYMBOLS', 0)
    self.emcc_args.remove('-Werror')
    emcc_args = self.emcc_args
    needs_stdlib = ['muli33_ta2', 'philoop_ta2', 'uadd_overflow_64_ta2', 'i64toi8star', 'legalizer_ta2', 'quotedlabel', 'alignedunaligned', 'sillybitcast', 'invokeundef', 'loadbitcastgep', 'sillybitcast2', 'legalizer_b_ta2', 'emptystruct', 'entry3', 'atomicrmw_i64', 'atomicrmw_b_i64', 'invoke_byval', 'i24_ce_fastcomp']
    need_no_error_on_undefined_symbols = ['unsanitized_declare']
    skip_tests = ['aliasbitcast', 'structparam', 'issue_39', 'phinonexist', 'oob_ta2', 'phiself', 'invokebitcast', 'structphiparam', 'callwithstructural_ta2', 'callwithstructural64_ta2', 'structinparam', '2xi40', 'quoted', 'llvm_assume', 'longjmp_tiny', 'longjmp_tiny_invoke', 'longjmp_tiny_invoke_phi', 'longjmp_tiny_keepem', 'longjmp_tiny_keepem_cond', 'longjmp_tiny_phi', 'longjmp_tiny_phi2']
    skip_wasm = ['call_inttoptr_i64']
    names = glob.glob(path_from_root('tests', 'cases', '*.ll'))
    names.sort()
    for name in names:
        shortname = os.path.splitext(name)[0]
        basename = os.path.basename(shortname)
        if (basename in skip_tests):
            continue
        if (self.is_wasm() and (basename in skip_wasm)):
            continue
        if (('_noasm' in shortname) and self.get_setting('ASM_JS')):
            print(('case "%s" not relevant for asm.js' % shortname))
            continue
        if (basename in need_no_error_on_undefined_symbols):
            self.set_setting('ERROR_ON_UNDEFINED_SYMBOLS', 0)
        print(("Testing case '%s'..." % basename))
        output_file = path_from_root('tests', 'cases', (shortname + '.txt'))
        if os.path.exists(output_file):
            output = open(output_file).read()
        else:
            output = 'hello, world!'
        if (output.rstrip() != 'skip'):
            self.emcc_args = list(emcc_args)
            if (basename in needs_stdlib):
                self.set_setting('FILESYSTEM', 1)
            else:
                self.emcc_args.append('-nostdlib')
                self.set_setting('FILESYSTEM', 0)
            if os.path.exists((shortname + '.emcc')):
                self.emcc_args += json.loads(open((shortname + '.emcc')).read())
            self.do_ll_run(path_from_root('tests', 'cases', name), output, assert_returncode=None)
        src_checker = path_from_root('tests', 'cases', (shortname + '.py'))
        if os.path.exists(src_checker):
            generated = open('src.cpp.o.js').read()
            exec(open(src_checker).read())
@no_wasm_backend("uses bitcode compiled with asmjs, and we don't have unified triples")
@is_slow_test
def test_zzz_cases(self):
    self.set_setting('EXIT_RUNTIME', 1)
    self.set_setting('ERROR_ON_UNDEFINED_SYMBOLS', 0)
    self.set_setting('WARN_ON_UNDEFINED_SYMBOLS', 0)
    self.emcc_args.remove('-Werror')
    emcc_args = self.emcc_args
    needs_stdlib = ['muli33_ta2', 'philoop_ta2', 'uadd_overflow_64_ta2', 'i64toi8star', 'legalizer_ta2', 'quotedlabel', 'alignedunaligned', 'sillybitcast', 'invokeundef', 'loadbitcastgep', 'sillybitcast2', 'legalizer_b_ta2', 'emptystruct', 'entry3', 'atomicrmw_i64', 'atomicrmw_b_i64', 'invoke_byval', 'i24_ce_fastcomp']
    need_no_error_on_undefined_symbols = ['unsanitized_declare']
    skip_tests = ['aliasbitcast', 'structparam', 'issue_39', 'phinonexist', 'oob_ta2', 'phiself', 'invokebitcast', 'structphiparam', 'callwithstructural_ta2', 'callwithstructural64_ta2', 'structinparam', '2xi40', 'quoted', 'llvm_assume', 'longjmp_tiny', 'longjmp_tiny_invoke', 'longjmp_tiny_invoke_phi', 'longjmp_tiny_keepem', 'longjmp_tiny_keepem_cond', 'longjmp_tiny_phi', 'longjmp_tiny_phi2']
    skip_wasm = ['call_inttoptr_i64']
    names = glob.glob(path_from_root('tests', 'cases', '*.ll'))
    names.sort()
    for name in names:
        shortname = os.path.splitext(name)[0]
        basename = os.path.basename(shortname)
        if (basename in skip_tests):
            continue
        if (self.is_wasm() and (basename in skip_wasm)):
            continue
        if (('_noasm' in shortname) and self.get_setting('ASM_JS')):
            print(('case "%s" not relevant for asm.js' % shortname))
            continue
        if (basename in need_no_error_on_undefined_symbols):
            self.set_setting('ERROR_ON_UNDEFINED_SYMBOLS', 0)
        print(("Testing case '%s'..." % basename))
        output_file = path_from_root('tests', 'cases', (shortname + '.txt'))
        if os.path.exists(output_file):
            output = open(output_file).read()
        else:
            output = 'hello, world!'
        if (output.rstrip() != 'skip'):
            self.emcc_args = list(emcc_args)
            if (basename in needs_stdlib):
                self.set_setting('FILESYSTEM', 1)
            else:
                self.emcc_args.append('-nostdlib')
                self.set_setting('FILESYSTEM', 0)
            if os.path.exists((shortname + '.emcc')):
                self.emcc_args += json.loads(open((shortname + '.emcc')).read())
            self.do_ll_run(path_from_root('tests', 'cases', name), output, assert_returncode=None)
        src_checker = path_from_root('tests', 'cases', (shortname + '.py'))
        if os.path.exists(src_checker):
            generated = open('src.cpp.o.js').read()
            exec(open(src_checker).read())