Skip to content

Commit

Permalink
add xl option to run.py
Browse files Browse the repository at this point in the history
  • Loading branch information
spennihana committed May 13, 2015
1 parent f608b75 commit 9bce0cd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions R/tests/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def read_test_list_file(self, test_list_file):
print("")
sys.exit(1)

def build_test_list(self, test_group, run_small, run_medium, run_large):
def build_test_list(self, test_group, run_small, run_medium, run_large, run_xlarge):
"""
Recursively find the list of tests to run and store them in the object.
Fills in self.tests and self.tests_not_started.
Expand All @@ -746,11 +746,14 @@ def build_test_list(self, test_group, run_small, run_medium, run_large):
is_small = False
is_medium = False
is_large = False
is_xlarge= False

if (re.match(".*large.*", f)):
is_large = True
elif (re.match(".*medium.*", f)):
is_large = True
elif "xlarge" in f:
is_xlarge = True
else:
is_small = True

Expand All @@ -760,6 +763,8 @@ def build_test_list(self, test_group, run_small, run_medium, run_large):
continue
if (is_large and not run_large):
continue
if is_xlarge and not run_xlarge:
continue

if (test_group is not None):
test_short_dir = self._calc_test_short_dir(os.path.join(root, f))
Expand Down Expand Up @@ -1139,6 +1144,7 @@ def __str__(self):
g_run_small = True
g_run_medium = True
g_run_large = True
g_run_xlarge = True
g_use_cloud = False
g_use_cloud2 = False
g_config = None
Expand Down Expand Up @@ -1301,6 +1307,7 @@ def parse_args(argv):
global g_run_small
global g_run_medium
global g_run_large
global g_run_xlarge
global g_use_cloud
global g_use_cloud2
global g_config
Expand Down Expand Up @@ -1360,6 +1367,8 @@ def parse_args(argv):
g_run_medium = False
if (not 'l' in v):
g_run_large = False
if not "xl" in v:
g_run_xlarge = False
else:
bad_arg(s)
elif (s == "--usecloud"):
Expand Down Expand Up @@ -1496,7 +1505,7 @@ def main(argv):
g_runner.read_test_list_file(g_test_list_file)
else:
# Test group can be None or not.
g_runner.build_test_list(g_test_group, g_run_small, g_run_medium, g_run_large)
g_runner.build_test_list(g_test_group, g_run_small, g_run_medium, g_run_large, g_run_xlarge)

# If no run is specified, then do an early exit here.
if (g_no_run):
Expand Down

0 comments on commit 9bce0cd

Please sign in to comment.