def METHOD_NAME(args, directory):
    if len(args) != 1:
        print "Usage: output-deps.py quickbook-command"
        exit(1)
    quickbook_command = args[0]
    failures = 0
    # Dependency tests
    failures += run_quickbook(quickbook_command, 'svg_missing.qbk',
            deps_gold = 'svg_missing_deps.txt')
    failures += run_quickbook(quickbook_command, 'svg_missing.qbk',
            locations_gold = 'svg_missing_locs.txt')
    failures += run_quickbook(quickbook_command, 'missing_relative.qbk',
            deps_gold = 'missing_relative_deps.txt',
            locations_gold = 'missing_relative_locs.txt')
    failures += run_quickbook(quickbook_command, 'include_path.qbk',
            deps_gold = 'include_path_deps.txt',
            locations_gold = 'include_path_locs.txt',
            input_path = ['sub1', 'sub2'])
    failures += run_quickbook(quickbook_command, 'include_glob.qbk',
            deps_gold = 'include_glob_deps.txt',
            locations_gold = 'include_glob_locs.txt',
            input_path = ['sub1', 'sub2'])
    # Try building a simple document with various flags.
    failures += run_quickbook(quickbook_command, 'simple.qbk',
        output_gold = 'simple.xml')
    failures += run_quickbook(quickbook_command, 'simple.qbk',
        extra_flags = ['--no-self-linked-headers'],
        output_gold = 'simple_no_self_linked.xml')
    failures += run_quickbook(quickbook_command, 'simple.qbk',
        extra_flags = ['--no-pretty-print'],
        output_gold = 'simple_no_pretty_print.xml')
    failures += run_quickbook(quickbook_command, 'simple.qbk',
        extra_flags = ['--indent','4','--linewidth','60'],
        output_gold = 'simple_custom_pretty_print.xml')
    if failures == 0:
        print "Success"
    else:
        print "Failures:",failures
        exit(failures)