prplfoundation / prplMesh

This repository moved to https://gitlab.com/prpl-foundation/prplmesh/prplMesh
Other
65 stars 32 forks source link

[TASK] run_easymesh_cert.sh - add option to checkout to easymesh_cert repo sha1 #1184

Closed tomereli closed 4 years ago

tomereli commented 4 years ago

Description

Currently, the run_easymesh_cert.sh relies on the easymesh_cert repository which contains the run_test_file.sh script which is used to run certification. The run_easymesh_cert.sh is simply a wrapper script which in addition to running certification tests using the run_test_file.sh script, first downloads the latest prplmesh.ipk from owncloud, and after the tests complete uploads the results to owncloud.

Since we are using two separate repositories, this can easily break, for example, if the easymesh_cert repo run_test_file.sh script is modified and we are testing an older prplmesh.

For this reason, the run_easymesh_cert.sh script should have an option to checkout the easymesh_cert repo to a specific sha1, and use a default which is defined in the script which we will change when needed.

Exit criteria

Add 2 new options to run_easymesh_cert.sh script (and change the current one used only for setting the easymesh-cert path):

--easymesh-cert-path <path> -  path to easymesh_cert repo (default ../easymesh_cert)
--easymesh-cert-fixed - when set, cleans and checkouts to a specific easymesh_cert SHA1 (default "${EASYMESH_CERT_REVISION}")
--easymesh-cert-revision <revision> - used in conjunction with --easymesh-cert-fixed to override the default revision
arnout commented 4 years ago

I don't see the point of adding extra options...

We want the hash to be set in the script itself, so both gitlab-ci and cron-triggered runs are using the same version of the easymesh-cert repo.

And for development, it's easier to modify the script than to use command-line arguments.