summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/tests/application-lifecycle.jinja211
-rw-r--r--templates/tests/ci.jinja24
-rw-r--r--templates/tests/release.jinja24
-rw-r--r--utils/agljobtemplate.py17
-rwxr-xr-xutils/create-jobs.py10
5 files changed, 44 insertions, 2 deletions
diff --git a/templates/tests/application-lifecycle.jinja2 b/templates/tests/application-lifecycle.jinja2
new file mode 100644
index 0000000..24cd26b
--- /dev/null
+++ b/templates/tests/application-lifecycle.jinja2
@@ -0,0 +1,11 @@
+
+- test:
+ timeout:
+ minutes: 10
+ definitions:
+ - repository: https://git.automotivelinux.org/src/qa-testdefinitions
+ from: git
+ path: test-suites/short-smoke/application-lifecycle.yaml
+ name: application-lifecycle
+ parameters:
+ APPURL: "{{ APPURL }}"
diff --git a/templates/tests/ci.jinja2 b/templates/tests/ci.jinja2
index feca60e..9309366 100644
--- a/templates/tests/ci.jinja2
+++ b/templates/tests/ci.jinja2
@@ -24,6 +24,10 @@
{% include 'tests/can.jinja2' %}
{% endif %}
+{% if APPURL is defined %}
+{% include 'tests/application-lifecycle.jinja2' %}
+{% endif %}
+
- test:
timeout:
minutes: 60
diff --git a/templates/tests/release.jinja2 b/templates/tests/release.jinja2
index 965af1a..c5eac77 100644
--- a/templates/tests/release.jinja2
+++ b/templates/tests/release.jinja2
@@ -21,6 +21,10 @@
parameters:
DEVICE_TAGS: "{{ DEVICE_TAGS }}"
+{% if APPURL is defined %}
+{% include 'tests/application-lifecycle.jinja2' %}
+{% endif %}
+
- test:
timeout:
minutes: 60
diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py
index 2e2ad95..e79db41 100644
--- a/utils/agljobtemplate.py
+++ b/utils/agljobtemplate.py
@@ -90,7 +90,8 @@ class Agljobtemplate(object):
lava_callback=None, kci_callback=None, build_id=None,
rfs_image=None, kernel_image=None, dtb_image=None, modules_image=None,
build_type=None, vcs_commit=None, vcs_branch=None,
- build_version=None, device_tags=""):
+ build_version=None, device_tags="",
+ applications_url=None, app_changeid=None, app_patchset=None):
if machine not in self.machines:
raise RuntimeError("{} is not a available machine".format(machine))
@@ -130,8 +131,22 @@ class Agljobtemplate(object):
url = urlparse.urljoin(url_base, url_fragment)
+ if applications_url is None:
+ app_url_base = ''
+ for section in defaults:
+ if section[0] == "urlbase":
+ app_url_base = section[1]
+
+ app_url_fragment = ''
+
+ if app_changeid is not None:
+ app_url_fragment += app_changeid + '/' + app_patchset
+ applications_url = urlparse.urljoin(app_url_base, app_url_fragment)
+
device_tags = ' '.join(device_tags)
job['DEVICE_TAGS'] = device_tags
+ if applications_url is not None:
+ job['APPURL'] = applications_url
test_templates = []
# If the user doesn't specify tests, use the default ones from the build-type
diff --git a/utils/create-jobs.py b/utils/create-jobs.py
index c2e9b57..463d706 100755
--- a/utils/create-jobs.py
+++ b/utils/create-jobs.py
@@ -59,6 +59,12 @@ def parse_cmdline(machines, tests, rfs_types):
help="The build hash.")
parser.add_argument('--build-id', dest='build_id', action='store',
help="The uniq build information, the build id.")
+ parser.add_argument('--applications-url', dest='applications_url', action='store',
+ help="An URL pointing to applications.", default=None)
+ parser.add_argument('--app-changeid', dest='app_changeid', action='store',
+ help="An application changeid.", default=None)
+ parser.add_argument('--app-patchset', dest='app_patchset', action='store',
+ help="An application patchset.", default=None)
args = parser.parse_args()
@@ -91,7 +97,9 @@ def main():
dtb_image=args.dtb_img, build_id=args.build_id,
modules_image=args.modules_img, vcs_branch=args.vcs_branch,
build_type=args.build_type, vcs_commit=args.vcs_commit,
- build_version=args.build_version, device_tags=args.device_tags)
+ build_version=args.build_version, device_tags=args.device_tags,
+ applications_url=args.applications_url,
+ app_changeid=args.app_changeid, app_patchset=args.app_patchset)
if args.job_file is None:
print job