More comprehensive test framework.
authorDariusz Murakowski <murakdar@mit.edu>
Mon, 17 Feb 2014 22:37:46 +0000 (17:37 -0500)
committerDariusz Murakowski <murakdar@mit.edu>
Mon, 17 Feb 2014 22:37:46 +0000 (17:37 -0500)
test/make_tests.py [new file with mode: 0755]
test/test1_template [new file with mode: 0755]

diff --git a/test/make_tests.py b/test/make_tests.py
new file mode 100755 (executable)
index 0000000..db2d36a
--- /dev/null
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+import os
+import glob
+from string import Template
+
+
+def main():
+
+    t = Template(open('test1_template').read())
+
+    param = dict(
+        PARAM='param',
+        STATE='state1',
+        EPITOPE='',
+        OUTPUT='',
+    )
+
+    for ep in glob.glob('ep_*.ep'):
+        ep = ep.rstrip('.ep')
+        epID = ep.lstrip('ep_')
+        out = 'test1_'+epID+'.test'
+        param.update(EPITOPE=ep,OUTPUT=out)
+
+        f = open(out,'w')
+        f.write(t.safe_substitute(param))
+        f.close()
+        print f.name
+
+
+if __name__ == '__main__':
+    main()
+
diff --git a/test/test1_template b/test/test1_template
new file mode 100755 (executable)
index 0000000..243364d
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+WF=../wf
+${WF} -seed 66314 -r -n 100000 -g 3 -numruns 2 -i ${PARAM} -s ${STATE} -e ${EPITOPE} -o ${OUTPUT}