def METHOD_NAME(bld):
    defines = ['_XBOX'] #NOTE: _XBOX to get static lib and avoid dllimport/dllexport stuff
    if bld.env.PLATFORM in ('arm64-ios', 'x86_64-ios'):
        defines = ['DM_NO_SYSTEM_FUNCTION'] # Needed because we wish to build the tests for all platforms, but not all platforms have the system() function
    additional_libs = []
    if bld.env['PLATFORM'] in ('armv7-android', 'arm64-android', 'x86_64-macos'):
        additional_libs += ['UNWIND']
    graphics_lib = 'GRAPHICS_NULL'
    if bld.env['PLATFORM'] in ('arm64-android','armv7-android'):
        graphics_lib = 'GRAPHICS_NULL DMGLFW' # g_AndroidApp is currently in glfw
    # Currently a bug in Remotery where the quick shutdown of the remotery instance can cause problems
    #profile_lib = ['PROFILE', 'PROFILEREXT']
    profile_lib = ['PROFILE_NULL', 'PROFILEREXT_NULL']
    resource_type_symbols = ['ResourceTypeGameObject', 'ResourceTypeCollection', 'ResourceTypeScript', 'ResourceTypeLua',
                             'ResourceTypeAnim', 'ResourceTypeAnimationSet', 'ResourceTypeGui', 'ResourceTypeGuiScript',
                             'ResourceProviderFile', 'ResourceProviderArchive', 'ResourceProviderArchiveMutable']
    component_type_symbols = ['ComponentTypeAnim', 'ComponentTypeScript', 'ComponentTypeGui', 'ComponentTypeMesh']
    exported_symbols = ['ProfilerExt', 'GraphicsAdapterNull']
    bld.add_group()
    obj = bld(
        features = 'c cxx cprogram test',
        use = 'TESTMAIN APP RECORD CRASH VPX GAMEOBJECT DDF LIVEUPDATE GAMESYS RESOURCE DMGLFW GRAPHICS_NULL GRAPHICS_UTIL PHYSICS RENDER SOCKET SCRIPT LUA EXTENSION HID_NULL INPUT PARTICLE RIG GUI SOUND_NULL DLIB APP engine engine_service'.split() + additional_libs + profile_lib,
        exported_symbols = exported_symbols + resource_type_symbols + component_type_symbols,
        web_libs = ['library_sys.js', 'library_script.js'],
        includes = '../../proto .',
        defines = defines,
        source = bld.path.ant_glob('**/*.cpp'),
        target = 'test_engine')
    # Psapi.lib is needed by ProfilerExt
    if 'win32' in bld.env.PLATFORM:
        obj.env.append_value('LINKFLAGS', ['Psapi.lib'])
    platform = bld.env.PLATFORM
    if platform == 'win32':
        platform = 'x86-win32'
    bob_flags = []
    bob_flags.append("--platform=%s" % platform)
    if Options.options.use_vanilla_lua:
        bob_flags.append("--use-vanilla-lua")
    bob_flags = ' '.join(bob_flags)
    # Build engine test content using bob
    # We always run distclean. Hook into waf clean/distclean in some way?
    bob_command = 'java -jar ./build/content/bob-engine.jar -root ./src/test -k clean build %s' % bob_flags
    bld(rule = run_bob,
        run_args = bob_command,
        source = 'wscript',
        always = True)