]> hydra-www.ietfng.org Git - dyna2/commitdiff
added Dyna/Test/Main2.hs - temporary test runner which skips K3Backend tests.
authortimv <tim.f.vieira@gmail.com>
Mon, 10 Dec 2012 22:22:50 +0000 (17:22 -0500)
committertimv <tim.f.vieira@gmail.com>
Mon, 10 Dec 2012 22:22:50 +0000 (17:22 -0500)
bin/prototype.py
bin/utils.py
src/Dyna/Test/Main2.hs [new file with mode: 0644]

index 28c7fd248bbe735105f2938c6a45ef04f1b1014a..0cb721c447f410850737dbb7889c1c56a109455b 100644 (file)
@@ -398,12 +398,17 @@ def main(dynafile):
                 #print >> html, '<h3>Update %s</h3>' % (u,)
                 #print >> html, '<div class="box">%s</div>' % svg
 
+
         print
         print red % '#________________'
         print red % '# storage'
         for label, M, o in modes_needed:
             print label, display_mode_nocolor(M, o)
 
+        cmd = """ghc -isrc Dyna.Backend.Python -e 'processFile "%s"' """ % dynafile
+        assert 0 == os.system(cmd), 'command failed:\n\t' + cmd
+
+
     print
     print 'wrote', html.name
 
index d7269c75c4ca5e30a8b1f0005ea277263c9209c8..779766498ef761a2901a11dc1b23a0dd51db8419 100644 (file)
@@ -22,6 +22,8 @@ def parse_sexpr(e):
     based on implementation by George Sakkis
     http://mail.python.org/pipermail/python-list/2005-March/312004.html
     """
+    e = re.compile('^\s*;.*?\n', re.M).sub('', e)  # remove comments
+
     es, stack = [], []
     for token in re.split(r'([()])|\s+', e):
         if token == '(':
diff --git a/src/Dyna/Test/Main2.hs b/src/Dyna/Test/Main2.hs
new file mode 100644 (file)
index 0000000..acaeb6e
--- /dev/null
@@ -0,0 +1,15 @@
+-- Bring together all of our test suites
+
+-- XXX temporary, use Dyna.Test.Main as soons as timv has upgrades ghc.
+
+module Dyna.Test.Main2 where
+
+import           Test.Framework
+import qualified Dyna.ParserHS.Selftest  as DPHS
+import qualified Dyna.XXX.TrifectaTests  as DXT
+
+main :: IO ()
+main = defaultMain
+           [ DPHS.selftest
+           , DXT.selftest
+           ]