about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/analysis/depgraph.py7
-rw-r--r--test/test_all.py10
2 files changed, 13 insertions, 4 deletions
diff --git a/test/analysis/depgraph.py b/test/analysis/depgraph.py
index a661d785..c5e41f64 100644
--- a/test/analysis/depgraph.py
+++ b/test/analysis/depgraph.py
@@ -615,15 +615,16 @@ for i, test in enumerate([(g1_ira, g1_input, [g1_output1]),
             g_list = list(g_list)
             ### Dump outputs graphs for debug means
             for j, result in enumerate(g_list):
-                open("graph_test_%02d_%02d.dot" % (i+1, j), "w").write(result.graph.dot())
+                open("graph_test_%02d_%02d.dot" % (i + 1, j),
+                     "w").write(result.graph.dot())
 
             ### The number of results should be the same
             print " - - - number of results"
             assert(len(g_list) == len(g_test_list))
 
             ### Match the right result (unordered)
-            for i, result in enumerate(g_list):
-                print " - - - result %d" % i
+            for j, result in enumerate(g_list):
+                print " - - - result %d" % j
                 found = False
                 for expected in g_test_list:
                     if expected["graph"].__eq__(result.graph):
diff --git a/test/test_all.py b/test/test_all.py
index aefd0196..07e1c509 100644
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -128,7 +128,6 @@ for script in ["win_api_x86_32.py",
 testset += RegressionTest(["depgraph.py"], base_dir="analysis",
                           products=["graph_test_01_00.dot",
                                     "graph_test_02_00.dot",
-                                    "graph_test_02_01.dot",
                                     "graph_test_03_00.dot",
                                     "graph_test_03_01.dot",
                                     "graph_test_04_00.dot",
@@ -322,6 +321,15 @@ class ExampleSymbolExec(Example):
 
 
 testset += ExampleSymbolExec(["single_instr.py"])
+for options, nb_sol in [([], 8),
+                        (["-i"], 12)]:
+    testset += ExampleSymbolExec(["depgraph.py",
+                                  Example.get_sample("simple_test.bin"),
+                                  "-m", "x86_32", "0x0", "0x8b",
+                                  "eax"] + options,
+                                 products=["sol_%d.dot" % nb
+                                           for nb in xrange(nb_sol)])
+
 
 ## Jitter
 class ExampleJitter(Example):