def perform_test_build(build_object, local_build, module, version, vcs):
    """
    Test build the module and return whether it was successful

    Args:
        build_object(:class:`~dls_ade.dlsbuild.Builder`): Either a windows or
            RedHat builder instance
        local_build(bool): Specifier to perform test build only
        module(str): Specify module name
        version(str): Specify release
        vcs(:class:`~dls_ade.vcs_git.Git`): Git version control system instance

    Returns:
        str, bool: Message explaining how the test build went, True or False
            for whether it failed or not

    """
    message = ''
    test_fail = False

    if not build_object.local_test_possible():
        message += "Local test build not possible since local system not the "
        message += "same OS as build server"
    else:
        message += "Performing test build on local system"
        if build_object.test(module, version, vcs) != 0:
            test_fail = True
            message += "\nTest build failed."
        else:
            message += "\nTest build successful."
            if not local_build:
                message += " Continuing with build server submission"
    return message, test_fail