diff options
author | Ben Smith <binjimin@gmail.com> | 2017-05-26 14:23:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-26 14:23:00 -0700 |
commit | bc671ce76411ca0fb91e09d41dce9be9b67b8cab (patch) | |
tree | 64acb23c6741dbe08710f82d9100efe70d146784 /test/run-tests.py | |
parent | d8c30c7d2059563019bc52f1f017d407da907bd7 (diff) | |
download | wabt-bc671ce76411ca0fb91e09d41dce9be9b67b8cab.tar.gz wabt-bc671ce76411ca0fb91e09d41dce9be9b67b8cab.tar.bz2 wabt-bc671ce76411ca0fb91e09d41dce9be9b67b8cab.zip |
Add support for folding expressions in wat-writer (#460)
Diffstat (limited to 'test/run-tests.py')
-rwxr-xr-x | test/run-tests.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/run-tests.py b/test/run-tests.py index 6359bf74..47de4fe9 100755 --- a/test/run-tests.py +++ b/test/run-tests.py @@ -228,7 +228,7 @@ class TestInfo(object): self.skip = False self.is_roundtrip = False - def CreateRoundtripInfo(self): + def CreateRoundtripInfo(self, fold_exprs): result = TestInfo() result.filename = self.filename result.header = self.header @@ -239,16 +239,22 @@ class TestInfo(object): result.tool = 'run-roundtrip' result.exe = ROUNDTRIP_PY result.flags = ['--bindir', '%(bindir)s', '-v'] + if fold_exprs: + result.flags.append('--fold-exprs') result.expected_error = 0 result.slow = self.slow result.skip = self.skip result.is_roundtrip = True + result.fold_exprs = fold_exprs return result def GetName(self): name = self.filename if self.is_roundtrip: - name += ' (roundtrip)' + if self.fold_exprs: + name += ' (roundtrip fold-exprs)' + else: + name += ' (roundtrip)' return name def GetGeneratedInputFilename(self): @@ -735,7 +741,8 @@ def main(args): infos_to_run.append(info) if options.roundtrip and info.ShouldCreateRoundtrip(): - infos_to_run.append(info.CreateRoundtripInfo()) + infos_to_run.append(info.CreateRoundtripInfo(fold_exprs=False)) + infos_to_run.append(info.CreateRoundtripInfo(fold_exprs=True)) if not os.path.exists(OUT_DIR): os.makedirs(OUT_DIR) |