def METHOD_NAME(sht):
    if not TestContext.is_valid(test_context) or Options.options.skip_build_tests or Options.options.skip_tests:
        return
    # TODO: Fix support for win32
    from waflib.Logs import warn, error
    import urllib, urllib.request, time, atexit
    server_sockets = None
    bash_prefix = ''
    if os.environ.get('MSYSTEM', '') in ('MINGW32','MINGW64'):
        bash_prefix = 'sh '
    os.system(bash_prefix + './scripts/start_http_server.sh')
    atexit.register(os.system, bash_prefix + './scripts/stop_http_server.sh')
    server_config_path = "test_http_server.cfg"
    if os.path.exists(server_config_path):
        os.unlink(server_config_path)
        print('File ' + server_config_path + ' already exist. Removing.')
    start = time.time()
    timeout = 15
    while True:
        if time.time() - start > timeout:
            error('HTTP server failed to start within ' + str(timeout) + ' seconds')
            sys.exit(1)
        try:
            if not os.path.exists(server_config_path):
                raise IOError("Waiting for server to write config file")
            server_sockets = configparser.RawConfigParser()
            server_sockets.read(server_config_path)
            server_socket = server_sockets.getint("server", "socket")
            url = 'http://localhost:%d' % server_socket
            print('Starting http server at %s' % url)
            urllib.request.urlopen(url)
            break
        except IOError:
            print('Waiting for HTTP testserver to start')
        except urllib.URLError:
            print('Waiting for HTTP testserver to start on port %d...' % server_socket)
        sys.stdout.flush()
        time.sleep(0.5)
    # write a config file for the tests to use
    config = configparser.RawConfigParser()
    hostname = socket.gethostname()
    local_ip = socket.gethostbyname(hostname)
    print ("SERVER IP: %s" % local_ip)
    config.add_section("server")
    config.set("server", "ip", local_ip)
    config.set("server", "socket", server_sockets.getint("server", "socket"))
    config.set("server", "socket_ssl", server_sockets.getint("server", "socket_ssl"))
    config.set("server", "socket_ssl_test", server_sockets.getint("server", "socket_ssl_test"))
    configfilepath = os.path.basename(tempfile.mktemp(".cfg", "unittest_"))
    with open(configfilepath, 'w') as f:
        config.write(f)
        print("Wrote test config file: %s" % configfilepath)
    try:
        waf_dynamo.run_tests(test_context, valgrind = True, configfile = configfilepath)
    finally:
        os.remove(configfilepath)
    # The test should work on OSX, but the CI (Catalina) just crashed with no callstack (even in lldb)
    # Postponing a fix until I've updated to Catalina on my machine as well
    # if not sys.platform in ('win32', 'darwin'):
    #     import subprocess
    #     proc = subprocess.Popen('./scripts/run_test_memprofile.sh', shell = True)
    #     ret = proc.wait()
    #     if ret != 0:
    #         print("test failed test_memprofile")
    #         sys.exit(ret)