@needs_make('mingw32-make')
@is_slow_test
@parameterized({'cmake': (True,), 'configure': (False,)})
def test_zlib(self, use_cmake):
    if (WINDOWS and (not use_cmake)):
        self.skipTest('Windows cannot run configure sh scripts')
    self.maybe_closure()
    if (self.run_name == 'asm2g'):
        self.emcc_args += ['-g4']
    if (self.run_name == 'asm2f'):
        return self.skipTest('asm2f affects cflags in a way that changes zlib compile flag reporting, so the stdout is different')
    if use_cmake:
        make_args = []
        configure = [path_from_root('emcmake'), 'cmake', '.']
    else:
        make_args = ['libz.a']
        configure = ['sh', './configure']
    self.do_run(open(path_from_root('tests', 'third_party', 'zlib', 'example.c')).read(), open(path_from_root('tests', 'core', 'test_zlib.out')).read(), libraries=self.get_library(os.path.join('third_party', 'zlib'), 'libz.a', make_args=make_args, configure=configure), includes=[path_from_root('tests', 'third_party', 'zlib'), 'building', 'zlib'], force_c=True)
@needs_make('mingw32-make')
@is_slow_test
@parameterized({'cmake': (True,), 'configure': (False,)})
def test_zlib(self, use_cmake):
    if (WINDOWS and (not use_cmake)):
        self.skipTest('Windows cannot run configure sh scripts')
    self.maybe_closure()
    if (self.run_name == 'asm2g'):
        self.emcc_args += ['-g4']
    if (self.run_name == 'asm2f'):
        return self.skipTest('asm2f affects cflags in a way that changes zlib compile flag reporting, so the stdout is different')
    if use_cmake:
        make_args = []
        configure = [path_from_root('emcmake'), 'cmake', '.']
    else:
        make_args = ['libz.a']
        configure = ['sh', './configure']
    self.do_run(open(path_from_root('tests', 'third_party', 'zlib', 'example.c')).read(), open(path_from_root('tests', 'core', 'test_zlib.out')).read(), libraries=self.get_library(os.path.join('third_party', 'zlib'), 'libz.a', make_args=make_args, configure=configure), includes=[path_from_root('tests', 'third_party', 'zlib'), 'building', 'zlib'], force_c=True)