Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests refactoring #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/input_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
if (line == "") or (line[0] == "#"): continue
jsprog = line.split(";")
jsprogs.append(jsprog[0])
attr[jsprog[0]] = jsprog[1:]

ex_fast = [x for x in tests if FAST in attr[x]]
examples = [x for x in tests if INVALID not in attr[x]]
invalids = [x for x in tests if INVALID in attr[x]]

jstests = jsprogs
jstests_fast = [x for x in jsprogs if PARAM not in attr[x]]

10 changes: 5 additions & 5 deletions tests/test_correctness.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import os

from litmus import Config, litmus
from tests.input_tests import jsprogs
from tests.input_tests import jstests, jstests_fast

def run(example):
config = Config()
Expand All @@ -25,16 +25,16 @@ def run(example):
config.command = "bash %s/ext_tools/run_v8.sh"%path
config.input_file = "%s/tests/%s"%(path, example)
config.threads = 1
config.number = "1"
config.number = "10"
config.silent = True

assert litmus(config) == 0

def test_correctness():
for example in jsprogs:
for example in jstests_fast:
yield run, example

if __name__ == "__main__":
for example in jsprogs:
for example in jstests:
run(example)