lava_create_jobs: get_artifact_url: use custom url for Musca
The new build system stores Musca artifact (tfm.hex) under /build/bin.
Keep the current behavior for the other platforms (/install/outputs/...)
and use the new build system path for Musca.
It's a temporary workaround and it's expected all the platforms to use
/build/bin in the future.
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Change-Id: I162b95e81203c4d9325a856c178bbe1345a1c9b7
diff --git a/lava_helper/lava_create_jobs.py b/lava_helper/lava_create_jobs.py
index c99e427..a22f7c9 100755
--- a/lava_helper/lava_create_jobs.py
+++ b/lava_helper/lava_create_jobs.py
@@ -50,12 +50,18 @@
def get_artifact_url(artifact_store_url, params, filename):
- platform = params['platform']
- if params['device_type'] == 'fvp':
- platform = 'fvp'
- return "{}/artifact/trusted-firmware-m/build/install/outputs/{}/{}".format(
- artifact_store_url.rstrip('/'), platform, filename,
- )
+ platform = params["platform"]
+ if params["device_type"] == "fvp":
+ platform = "fvp"
+
+ # FIXME: temporary workaround until we switch all platforms artifacts
+ # to use the same location (new build system)
+ url = "{}/artifact/trusted-firmware-m/build".format(artifact_store_url.rstrip("/"))
+ if platform.lower().startswith("musca"):
+ url = "{}/bin/{}".format(url, filename)
+ else:
+ url = "{}/install/outputs/{}/{}".format(url, platform, filename)
+ return url
def get_recovery_url(recovery_store_url, recovery):