appleseedhq / appleseed

A modern open source rendering engine for animation and visual effects
https://appleseedhq.net/
MIT License
2.19k stars 329 forks source link

Include appleseed.cli version string in test suite's HTML report #2845

Open dictoon opened 4 years ago

dictoon commented 4 years ago

Basically include the output of appleseed.cli --version in the HTML report.

scripts/rendernode.py already does that:

# -------------------------------------------------------------------------------------------------
# Launches appleseed.cli and print appleseed version information.
# -------------------------------------------------------------------------------------------------

def print_appleseed_version(args, log):
    try:
        p = subprocess.Popen([args.tool_path, "--version", "--system"], stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE)
        output = p.communicate()[1].split(os.linesep, 1)

        if p.returncode != 0:
            log.error("failed to query {0} version (return code: {1}).".format(args.tool_path, p.returncode))
            sys.exit(1)

        for line in output:
            log.info("{0}".format(line))

    except OSError:
        log.error("failed to query {0} version.".format(args.tool_path))
        sys.exit(1)