[pypy-commit] stmgc c7-refactor: Make and run "demo2" in a test.

arigo noreply at buildbot.pypy.org
Wed Feb 19 11:23:10 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: c7-refactor
Changeset: r780:dde898021541
Date: 2014-02-19 11:22 +0100
http://bitbucket.org/pypy/stmgc/changeset/dde898021541/

Log:	Make and run "demo2" in a test.

diff --git a/c7/test/test_demo.py b/c7/test/test_demo.py
new file mode 100644
--- /dev/null
+++ b/c7/test/test_demo.py
@@ -0,0 +1,18 @@
+import py
+import os
+
+
+class TestDemo:
+
+    def _do(self, cmd):
+        print cmd
+        err = os.system(cmd)
+        if err: py.test.fail("'%s' failed (result %r)" % (cmd, err))
+
+    def make_and_run(self, target):
+        self._do("make -C ../demo %s" % target)
+        self._do("../demo/%s" % target)
+
+    def test_demo2_debug(self):   self.make_and_run("debug-demo2")
+    def test_demo2_build(self):   self.make_and_run("build-demo2")
+    def test_demo2_release(self): self.make_and_run("release-demo2")


More information about the pypy-commit mailing list