about summary refs log tree commit diff stats
path: root/test/test_all.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2018-07-28 13:27:01 +0200
committerGitHub <noreply@github.com>2018-07-28 13:27:01 +0200
commit7acc9f00489f0f9444b8fa2e5068317c0de90f38 (patch)
treefb69aea0d7dcd0438701b0b71be3833997ecabef /test/test_all.py
parentbb1cc452ca771ea6800ccfebd4c45237ba9a7554 (diff)
parentab0cf7308e9fb0c5ddeb2e49da75193cd7d50304 (diff)
downloadmiasm-7acc9f00489f0f9444b8fa2e5068317c0de90f38.tar.gz
miasm-7acc9f00489f0f9444b8fa2e5068317c0de90f38.zip
Merge pull request #803 from commial/feature/linux-env
Feature/linux env
Diffstat (limited to 'test/test_all.py')
-rwxr-xr-xtest/test_all.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_all.py b/test/test_all.py
index 3fb0a5b7..9bf54608 100755
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -1,6 +1,7 @@
 #! /usr/bin/env python2
 
 import argparse
+from distutils.spawn import find_executable
 import time
 import os
 import tempfile
@@ -686,6 +687,18 @@ for jitter in ExampleJitter.jitter_engines:
                              ["--jitter", jitter],
                              products=[Example.get_sample("box_upx_exe_unupx.bin")],
                              tags=tags.get(jitter, []))
+    if jitter != "python":
+        tags = tags.get(jitter, []) + [TAGS["long"]]
+        ls_path = find_executable("ls")
+        file_path = find_executable("file")
+        # Launch simulation of "file /bin/ls", with access to libs and ld info
+        testset += ExampleJitter(["run_with_linuxenv.py", "-v", "-p",
+                                  '/(.*lib.*\.so(\.\d+)?)|(/etc/ld.so.*)|(.*magic.*)|(%s)' % ls_path,
+                                  ] + ["--jitter", jitter] + [
+                                      file_path, ls_path,
+                                  ],
+                                 tags=tags)
+
 
 for script, dep in [(["x86_32.py", Example.get_sample("x86_32_sc.bin")], []),
                     (["arm.py", Example.get_sample("md5_arm"), "--mimic-env"],