def make_run(name, emcc_args, settings=None, env=None):
    if (env is None):
        env = {}
    if (settings is None):
        settings = {}
    TT = type(name, (TestCoreBase,), dict(run_name=name, env=env, __module__=__name__))

    def tearDown(self):
        try:
            super(TT, self).tearDown()
        finally:
            for (k, v) in self.env.items():
                del os.environ[k]
    TT.tearDown = tearDown

    def setUp(self):
        super(TT, self).setUp()
        for (k, v) in self.env.items():
            assert (k not in os.environ), (k + ' should not be in environment')
            os.environ[k] = v
        os.chdir(self.get_dir())
        for (k, v) in settings.items():
            self.set_setting(k, v)
        self.emcc_args += emcc_args
        self.emcc_args += ['-Wno-dynamic-class-memaccess', '-Wno-format', '-Wno-format-extra-args', '-Wno-format-security', '-Wno-pointer-bool-conversion', '-Wno-unused-volatile-lvalue', '-Wno-c++11-compat-deprecated-writable-strings', '-Wno-invalid-pp-token', '-Wno-shift-negative-value']
    TT.setUp = setUp
    return TT
def make_run(name, emcc_args, settings=None, env=None):
    if (env is None):
        env = {}
    if (settings is None):
        settings = {}
    TT = type(name, (TestCoreBase,), dict(run_name=name, env=env, __module__=__name__))

    def tearDown(self):
        try:
            super(TT, self).tearDown()
        finally:
            for (k, v) in self.env.items():
                del os.environ[k]
    TT.tearDown = tearDown

    def setUp(self):
        super(TT, self).setUp()
        for (k, v) in self.env.items():
            assert (k not in os.environ), (k + ' should not be in environment')
            os.environ[k] = v
        os.chdir(self.get_dir())
        for (k, v) in settings.items():
            self.set_setting(k, v)
        self.emcc_args += emcc_args
        self.emcc_args += ['-Wno-dynamic-class-memaccess', '-Wno-format', '-Wno-format-extra-args', '-Wno-format-security', '-Wno-pointer-bool-conversion', '-Wno-unused-volatile-lvalue', '-Wno-c++11-compat-deprecated-writable-strings', '-Wno-invalid-pp-token', '-Wno-shift-negative-value']
    TT.setUp = setUp
    return TT