Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfonba committed Dec 10, 2024
1 parent ca36ffb commit ca4d26d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions toolchain/mfc/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def add_common_arguments(p, mask = None):
test.add_argument("-%", "--percent", type=int, default=100, help="Percentage of tests to run.")
test.add_argument("-m", "--max-attempts", type=int, default=1, help="Maximum number of attempts to run a test.")
test.add_argument( "--no-build", action="store_true", default=False, help="(Testing) Do not rebuild MFC.")
test.add_argument( "--no-examples", action="store_true", default=False, help="Do not test example cases." )
test.add_argument("--case-optimization", action="store_true", default=False, help="(GPU Optimization) Compile MFC targets with some case parameters hard-coded.")
test_meg = test.add_mutually_exclusive_group()
test_meg.add_argument("--generate", action="store_true", default=False, help="(Test Generation) Generate golden files.")
Expand Down
1 change: 0 additions & 1 deletion toolchain/mfc/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def __str__(self) -> str:
gCFG: MFCConfig = MFCConfig()
gARG: dict = {}


def ARG(arg: str, dflt = None) -> typing.Any:
# pylint: disable=global-variable-not-assigned
global gARG
Expand Down
3 changes: 3 additions & 0 deletions toolchain/mfc/test/cases.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os, typing, itertools

from mfc import common
from ..state import ARG
from .case import Nt, define_case_d, define_case_f, CaseGeneratorStack, TestCaseBuilder

def get_bc_mods(bc: int, dimInfo):
Expand Down Expand Up @@ -861,7 +862,9 @@ def chemistry_cases():
))

foreach_dimension()

foreach_example()

chemistry_cases()

# Sanity Check 1
Expand Down
3 changes: 3 additions & 0 deletions toolchain/mfc/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def __filter(cases_) -> typing.List[TestCase]:
cases.remove(case)
skipped_cases.append(case)

if ARG("no_examples"):
cases = [case for case in cases if not ("Example" in case.trace)]

if ARG("percent") == 100:
return cases, skipped_cases

Expand Down

0 comments on commit ca4d26d

Please sign in to comment.