diff --git a/t/rose-task-run/45-app-fcm-make-compat_mode.t b/t/rose-task-run/45-app-fcm-make-compat_mode.t new file mode 100755 index 0000000000..357c54be0d --- /dev/null +++ b/t/rose-task-run/45-app-fcm-make-compat_mode.t @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +#------------------------------------------------------------------------------- +# Copyright (C) British Crown (Met Office) & Contributors. +# +# This file is part of Rose, a framework for meteorological suites. +# +# Rose is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Rose is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Rose. If not, see . +#------------------------------------------------------------------------------- +# Compatibility Mode Test +# Ensure that when Cylc Rose gets workflow config that +# compatibility run mode isn't changed. +# https://github.com/cylc/cylc-rose/issues/319 +#------------------------------------------------------------------------------- +. "$(dirname "$0")/test_header" + +if ! fcm help make 1>/dev/null 2>&1; then + skip_all '"fcm make" unavailable' +fi +if ! gfortran --version 1>/dev/null 2>&1; then + skip_all '"gfortran" unavailable' +fi +JOB_HOST="$(rose config --default= 't' 'job-host')" +if [[ -n "${JOB_HOST}" ]]; then + JOB_HOST="$(rose host-select -q "${JOB_HOST}")" +fi +if [[ -z "${JOB_HOST}" ]]; then + skip_all '"[t]job-host" not defined or not available' +fi + +tests 2 +export ROSE_CONF_PATH= +get_reg + +run_pass "${TEST_KEY_BASE}-install" \ + cylc install \ + --workflow-name="${FLOW}" \ + --no-run-name \ + -S "HOST='${JOB_HOST}'" \ + "${TEST_SOURCE_DIR}/${TEST_KEY_BASE}" + +run_pass "${TEST_KEY_BASE}-play" \ + timeout 120 \ + cylc play \ + "${FLOW}" \ + --abort-if-any-task-fails \ + --host='localhost' \ + --no-detach \ + --debug + +purge +exit 0 diff --git a/t/rose-task-run/45-app-fcm-make-compat_mode/app/make/file/fcm-make.cfg b/t/rose-task-run/45-app-fcm-make-compat_mode/app/make/file/fcm-make.cfg new file mode 100644 index 0000000000..4fef0b8dd2 --- /dev/null +++ b/t/rose-task-run/45-app-fcm-make-compat_mode/app/make/file/fcm-make.cfg @@ -0,0 +1,6 @@ +steps=extract mirror +extract.ns=foo +extract.location[foo]=$HERE/src +mirror.prop{config-file.steps}=build +build.target{task}=link +build.prop{file-ext.bin}= diff --git a/t/rose-task-run/45-app-fcm-make-compat_mode/app/make/file/src/hello.f90 b/t/rose-task-run/45-app-fcm-make-compat_mode/app/make/file/src/hello.f90 new file mode 100644 index 0000000000..b43411d851 --- /dev/null +++ b/t/rose-task-run/45-app-fcm-make-compat_mode/app/make/file/src/hello.f90 @@ -0,0 +1,3 @@ +program hello +write(*, '(a)') 'Hello World!' +end program hello diff --git a/t/rose-task-run/45-app-fcm-make-compat_mode/app/make/rose-app.conf b/t/rose-task-run/45-app-fcm-make-compat_mode/app/make/rose-app.conf new file mode 100644 index 0000000000..ba8c7f27e6 --- /dev/null +++ b/t/rose-task-run/45-app-fcm-make-compat_mode/app/make/rose-app.conf @@ -0,0 +1,4 @@ +meta=fcm_make +mode=fcm_make +make-name-cont=-bin +orig-cont-map=make:make-bin diff --git a/t/rose-task-run/45-app-fcm-make-compat_mode/app/run/rose-app.conf b/t/rose-task-run/45-app-fcm-make-compat_mode/app/run/rose-app.conf new file mode 100644 index 0000000000..e9110daaf6 --- /dev/null +++ b/t/rose-task-run/45-app-fcm-make-compat_mode/app/run/rose-app.conf @@ -0,0 +1,2 @@ +[command] +default=hello >"${ROSE_SUITE_DIR}/share/hello.txt" diff --git a/t/rose-task-run/45-app-fcm-make-compat_mode/rose-suite.conf b/t/rose-task-run/45-app-fcm-make-compat_mode/rose-suite.conf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/t/rose-task-run/45-app-fcm-make-compat_mode/suite.rc b/t/rose-task-run/45-app-fcm-make-compat_mode/suite.rc new file mode 100644 index 0000000000..3a2786c64b --- /dev/null +++ b/t/rose-task-run/45-app-fcm-make-compat_mode/suite.rc @@ -0,0 +1,17 @@ +#!jinja2 +[cylc] + UTC mode = True +[scheduling] + [[dependencies]] + graph = """ + hello-make:finish & hello-make => fin + """ + +[runtime] + [[hello-make]] + script = rose task-run --app-key=make --new + [[hello-make-bin]] + script = rose task-run --app-key=make + [[[remote]]] + host = {{HOST}} + [[fin]]