aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorKhouloud Touil <ktouil@baylibre.com>2019-01-21 12:11:43 +0100
committerKhouloud Touil <ktouil@baylibre.com>2019-01-24 11:18:46 +0100
commitb08043c2130eda85e2269777ea65c45412455976 (patch)
tree51b8e944d8552e93ce922210da4244a638d548f7 /utils
parentb214a337906e38aef96a343fae8d49b5c3eb9c4a (diff)
Add new device-tags feature
utils/create-jobs: Add the --device-tags argument Add new --device-tags arguement to create a job that contain the device tags as parameters. utils/agljobtemplate: Add the device_tags to the job Add the device_tags to the job in order to be used later in the test scripts to determine which test case should be runned or not. Change-Id: If22fb40b2ddf1a7c0496a59d4318e633028495b9 Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/agljobtemplate.py6
-rwxr-xr-xutils/create-jobs.py4
2 files changed, 7 insertions, 3 deletions
diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py
index 2307ffc..09944ff 100644
--- a/utils/agljobtemplate.py
+++ b/utils/agljobtemplate.py
@@ -45,7 +45,6 @@ def parse_callback_file(template_path, lava_callback, kci_callback):
str_err += "[releng-scripts]/templates/callback/{}.cfg".format(lava_callback)
raise IOError(err, str_err)
-
class Agljobtemplate(object):
DEFAULT_PATH = "templates"
@@ -91,7 +90,7 @@ class Agljobtemplate(object):
lava_callback=None, kci_callback=None,
rfs_image=None, kernel_image=None, dtb_image=None, modules_image=None,
build_type=None,
- build_version=None):
+ build_version=None, device_tags=""):
if machine not in self.machines:
raise RuntimeError("{} is not a available machine".format(machine))
@@ -132,6 +131,9 @@ class Agljobtemplate(object):
url = urlparse.urljoin(url_base, url_fragment)
+ device_tags = ' '.join(device_tags)
+ job['DEVICE_TAGS'] = device_tags
+
test_templates = []
# If the user doesn't specify tests, use the default ones from the build-type
if not tests:
diff --git a/utils/create-jobs.py b/utils/create-jobs.py
index 10a26b6..2a16ff3 100755
--- a/utils/create-jobs.py
+++ b/utils/create-jobs.py
@@ -49,6 +49,8 @@ def parse_cmdline(machines, tests, rfs_types):
help="The name of the modules to use (such as modules.tar.xz)")
parser.add_argument('--build-version', dest='build_version', action='store',
help="the version number of the build.")
+ parser.add_argument('--device-tags', dest='device_tags', action='store',
+ help="The device tags to be used to create the job.", nargs='*', default="")
args = parser.parse_args()
@@ -77,7 +79,7 @@ def main():
dtb_image=args.dtb_img,
modules_image=args.modules_img,
build_type=args.build_type,
- build_version=args.build_version)
+ build_version=args.build_version, device_tags=args.device_tags)
if args.job_file is None:
print job