]> mj.ucw.cz Git - moe.git/blobdiff - t/test.py
Several changes in status.py, wrote docs
[moe.git] / t / test.py
index 2460a214f3989723817bf4507a594243cb1462fe..cc61e9986713cfa5929ababf35f6611e69158dc1 100755 (executable)
--- a/t/test.py
+++ b/t/test.py
@@ -1,23 +1,21 @@
 #!/usr/bin/env python
 
 import sys
 #!/usr/bin/env python
 
 import sys
-sys.path.append('.')
+#sys.path.append('.')
 
 
-import moe.meta
-import moe.config
+import moe.eval
+import os
 
 
-#m = moe.meta.MoeMeta()
-#m['a'] = '1'
-#m.write()
-
-c = moe.config.MoeConfig(name='/dev/stdin')
-c.dump()
-
-d = moe.config.MoeConfig(name='/dev/stdin')
-d.dump()
-
-s = moe.config.MoeConfigStack()
-s.push(c)
-s.push(d)
-
-print s['a']
+e = moe.eval.Eval()
+try:
+    e.init(['TASK = "sum"; CONTESTANT = "mj"; SOURCE = "som_sol.c"; VERBOSE = "2"'] + sys.argv[1:])
+    e.log.debug("### Evaluating task %s of contestant %s ###\n\n" % (e['TASK'], e['CONTESTANT']))
+    try:
+       e.run()
+    except moe.SolutionError, err: # Why are we catching this?
+       e.status["error"] = err
+       e.log.user.error(err)
+       e.log.exception()
+except:
+    e.log.exception("Moe fatal error")
+    sys.exit(1)