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

jenkins_generic_job add better support for changing scratch root #1445

Merged
merged 1 commit into from
Apr 24, 2017
Merged
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
26 changes: 17 additions & 9 deletions cime/scripts/lib/jenkins_generic_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,27 @@ def jenkins_generic_job(generate_baselines, submit_to_cdash, no_batch,
# Set up create_test command and run it
#

baseline_args = ""
test_id = "%s_%s" % (test_id_root, CIME.utils.get_timestamp())
create_test_args = [test_suite, "--test-root %s" % test_root, "-t %s" % test_id, "--machine %s" % machine.get_machine_name(), "--compiler %s" % compiler]
if (generate_baselines):
baseline_args = "-g -b %s" % baseline_name
create_test_args.append("-g -b %s" % baseline_name)
elif (baseline_compare):
baseline_args = "-c -b %s" % baseline_name
create_test_args.append("-c -b %s" % baseline_name)

batch_args = "--no-batch" if no_batch else ""
pjob_arg = "" if parallel_jobs is None else "-j %d" % parallel_jobs
walltime_arg = "" if walltime is None else " --walltime %s" % walltime
if scratch_root != machine.get_value("CIME_OUTPUT_ROOT"):
create_test_args.append("--output-root=%s" % scratch_root)

test_id = "%s_%s" % (test_id_root, CIME.utils.get_timestamp())
create_test_cmd = "./create_test %s --test-root %s -t %s --machine %s --compiler %s %s %s %s %s" % \
(test_suite, test_root, test_id, machine.get_machine_name(), compiler, baseline_args, batch_args, pjob_arg, walltime_arg)
if no_batch:
create_test_args.append("--no-batch")

if parallel_jobs is not None:
create_test_args.append("-j %d" % parallel_jobs)

if walltime is not None:
create_test_args.append(" --walltime %s" % walltime)


create_test_cmd = "./create_test %s" % " ".join(create_test_args)

if (not CIME.wait_for_tests.SIGNAL_RECEIVED):
create_test_stat = CIME.utils.run_cmd(create_test_cmd, from_dir=CIME.utils.get_scripts_root(),
Expand Down