Commit c2c5cf26 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz

Merge branch 'download-only' into 'master'

Allow to download but not flash and test that in ci

See merge request !26
parents 8ab5f80a 70760ade
Pipeline #3811 passed with stages
in 3 minutes and 2 seconds
variables:
FLASHDEPS: python3
python3-coloredlogs
python3-jenkins
python3-requests
python3-tqdm
python3-yaml
.tags: &tags
tags:
......@@ -31,3 +38,17 @@ build:deb:
artifacts:
paths:
- '*.deb'
test:download:
<<: *tags
stage: test
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
- apt-get -y install $FLASHDEPS
script:
- mkdir download
- scripts/librem5-devkit-flash-image --skip-flash --skip-cleanup --dir=download/
- ls -l download/devkit.img download/flash_devkit.lst download/u-boot-devkit-recovery.imx
- rm -rf download
......@@ -234,6 +234,8 @@ def main():
help="Download an image for this distribution, default is '{}'".format(DIST))
parser.add_argument('--skip-cleanup', action='store_true', default=False,
help='Skip temporary directory cleanup')
parser.add_argument('--skip-flash', action='store_true', default=False,
help='Do all the preparations but don\'t flash')
parser.add_argument('--download-attempts', type=int, default=10,
help="Maximum number of attempts to resume "
"devkit image download. 0-unlimited")
......@@ -286,7 +288,8 @@ def main():
download_uboot(urljoin(uboot_ref['url'], 'artifact/build/{}'.format(UBOOT)),
uboot_target)
write_uuu_script(uuu_target, image_target, uboot_target)
flash_image(uuu_target, args.debug)
if not args.skip_flash:
flash_image(uuu_target, args.debug)
except VerifyImageException as e:
logging.error(e)
return 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment