Skip to content

Commit ca4d26d

Browse files
committed
asdf
1 parent ca36ffb commit ca4d26d

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

toolchain/mfc/args.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def add_common_arguments(p, mask = None):
8181
test.add_argument("-%", "--percent", type=int, default=100, help="Percentage of tests to run.")
8282
test.add_argument("-m", "--max-attempts", type=int, default=1, help="Maximum number of attempts to run a test.")
8383
test.add_argument( "--no-build", action="store_true", default=False, help="(Testing) Do not rebuild MFC.")
84+
test.add_argument( "--no-examples", action="store_true", default=False, help="Do not test example cases." )
8485
test.add_argument("--case-optimization", action="store_true", default=False, help="(GPU Optimization) Compile MFC targets with some case parameters hard-coded.")
8586
test_meg = test.add_mutually_exclusive_group()
8687
test_meg.add_argument("--generate", action="store_true", default=False, help="(Test Generation) Generate golden files.")

toolchain/mfc/state.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def __str__(self) -> str:
5050
gCFG: MFCConfig = MFCConfig()
5151
gARG: dict = {}
5252

53-
5453
def ARG(arg: str, dflt = None) -> typing.Any:
5554
# pylint: disable=global-variable-not-assigned
5655
global gARG

toolchain/mfc/test/cases.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os, typing, itertools
22

33
from mfc import common
4+
from ..state import ARG
45
from .case import Nt, define_case_d, define_case_f, CaseGeneratorStack, TestCaseBuilder
56

67
def get_bc_mods(bc: int, dimInfo):
@@ -861,7 +862,9 @@ def chemistry_cases():
861862
))
862863

863864
foreach_dimension()
865+
864866
foreach_example()
867+
865868
chemistry_cases()
866869

867870
# Sanity Check 1

toolchain/mfc/test/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ def __filter(cases_) -> typing.List[TestCase]:
5656
cases.remove(case)
5757
skipped_cases.append(case)
5858

59+
if ARG("no_examples"):
60+
cases = [case for case in cases if not ("Example" in case.trace)]
61+
5962
if ARG("percent") == 100:
6063
return cases, skipped_cases
6164

0 commit comments

Comments
 (0)