Index: src/tests/pybin/test_run.py
===================================================================
--- src/tests/pybin/test_run.py	(revision 0ad0c55af834cd60b4644acba851192ddc6839bd)
+++ src/tests/pybin/test_run.py	(revision 0ad0c55af834cd60b4644acba851192ddc6839bd)
@@ -0,0 +1,34 @@
+import os
+
+from pybin.tools import *
+
+
+# Test class that defines what a test is
+class Test:
+	def __init__(self):
+		self.name = ''
+		self.path = ''
+		self.arch = ''
+
+	def toString(self):
+		return "{:25s} ({:5s} {:s})".format( self.name, self.arch if self.arch else "Any", self.target() )
+
+	def prepare(self, dry_run):
+		sh("mkdir -p %s" % os.path.join(self.path, '.err'), dry_run)
+		sh("mkdir -p %s" % os.path.join(self.path, '.out'), dry_run)
+		sh("mkdir -p %s" % os.path.join(self.path, '.in' ), dry_run)
+
+	def expect_file(self):
+		return ("%s/.expect/%s.txt" % (self.path, self.name))
+
+	def error_file(self):
+		return ("%s/.err/%s.log"    % (self.path, self.name))
+
+	def output_file(self):
+		return ("%s/.out/%s.log"    % (self.path, self.name))
+
+	def input_file(self):
+		return ("%s/.in/%s.txt"     % (self.path, self.name))
+
+	def target(self):
+		return os.path.join(self.path, self.name)
Index: src/tests/pybin/tools.py
===================================================================
--- src/tests/pybin/tools.py	(revision 3b4571b22f7c674a138e9e645e893e9e7298f6da)
+++ src/tests/pybin/tools.py	(revision 0ad0c55af834cd60b4644acba851192ddc6839bd)
@@ -46,5 +46,5 @@
         os.rename(out_fname, fname)
 
-# helper function to check if a files contains only a spacific string
+# helper function to check if a files contains only a specific string
 def fileContainsOnly(file, text) :
 	with open(file) as f:
@@ -95,2 +95,21 @@
 	# fetch return code and error from the diff command
 	return sh(diff_cmd % (lhs, rhs), dry_run, False)
+
+# parses the Makefile to find the machine type (32-bit / 64-bit)
+def getMachineType():
+	return 'x64'
+	sh('echo "void ?{}(int&a,int b){}int main(){return 0;}" > .dummy.c')
+	ret, out = sh("make .dummy -s", print2stdout=True)
+
+	if ret != 0:
+		print("Failed to identify architecture:")
+		print(out)
+		print("Stopping")
+		rm( (".dummy.c",".dummy") )
+		sys.exit(1)
+
+	_, out = sh("file .dummy", print2stdout=False)
+	rm( (".dummy.c",".dummy") )
+
+	return out
+	return re.search("ELF\s([0-9]+)-bit", out).group(1)
