about summary refs log tree commit diff stats
path: root/test/test_all.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_all.py')
-rwxr-xr-xtest/test_all.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/test_all.py b/test/test_all.py
index 07542f6a..17193d9f 100755
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -188,8 +188,9 @@ class SemanticTestAsm(RegressionTest):
         self.command_line = [self.shellcode_script,
                              arch,
                              input_filename,
-                             output_filename,
-                             self.container_dct.get(container, '')]
+                             output_filename]
+        if container in self.container_dct:
+            self.command_line.append(self.container_dct[container])
         self.products = [output_filename, "graph.dot"]
 
 
@@ -304,6 +305,17 @@ testset += RegressionTest(["data_flow.py"], base_dir="analysis",
             for test_nb in xrange(1, 18))
                                     for fname in fnames])
 
+for i in xrange(1, 21):
+    input_name = "cst_propag/x86_32_sc_%d" % i
+    bin_name = "samples/x86_32/%s.bin" % input_name
+    test_x86_32_cst = SemanticTestAsm("x86_32", None, [input_name])
+    testset+= test_x86_32_cst
+    testset += RegressionTest(["../example/expression/constant_propagation.py", "-s", bin_name, "0"],
+                              depends=[test_x86_32_cst],
+                              products=["%s.propag.dot" % bin_name])
+
+
+
 ## Degraph
 class TestDepgraph(RegressionTest):
     """Dependency graph test"""
@@ -565,6 +577,11 @@ testset += ExampleExpression(["access_c.py", Example.get_sample("human.bin")],
 testset += ExampleExpression(["expr_c.py"],
                              tags=[TAGS["cparser"]])
 
+
+testset += ExampleExpression(["constant_propagation.py",
+                              Example.get_sample("simple_test.bin"), "-s", "0"],
+                             products=["%s.propag.dot" % Example.get_sample("simple_test.bin")])
+
 for script in [["basic_op.py"],
                ["basic_simplification.py"],
                ["simplification_tools.py"],