]> granicus.if.org Git - graphviz/commitdiff
Use xdot core for having same output on different systems
authorJohn Ellson <john.ellson@gmail.com>
Sun, 7 Apr 2019 13:14:01 +0000 (09:14 -0400)
committerJohn Ellson <john.ellson@gmail.com>
Sun, 7 Apr 2019 13:14:01 +0000 (09:14 -0400)
tests/regression_tests/vuln/vuln.py

index f6fd399008baaa849bdf6150d4d02a8bcee49cab..a76020e317c22632f392c997fa446c7d422d5020 100644 (file)
@@ -10,16 +10,16 @@ vulnfiles = [
 ]
 
 output_types = [
-    'xdot'
+    ('xdot', 'xdot:xdot:core')
 ]
 
 def generate_vuln_graph(vulnfile, output_type):
     if not os.path.exists('output'):
         os.makedirs('output')
 
-    output_file = 'output/' + vulnfile + '.' + output_type
+    output_file = 'output/' + vulnfile + '.' + output_type[0]
     input_file = 'input/' + vulnfile + '.dot'
-    process = Popen(['dot', '-T' + output_type, '-o', output_file, input_file], stdin=PIPE)
+    process = Popen(['dot', '-T' + output_type[1], '-o', output_file, input_file], stdin=PIPE)
 
     if process.wait() < 0:
         print('An error occurred while generating: ' + output_file)
@@ -29,7 +29,7 @@ failures = 0
 for vulnfile in vulnfiles:
     for output_type in output_types:
         generate_vuln_graph(vulnfile, output_type)
-        if not compare_graphs(vulnfile, output_type):
+        if not compare_graphs(vulnfile, output_type[0]):
             failures += 1
 
 print('')