[Fuego] [PATCH 02/11] testsuite version: record the testsuite version
Tim.Bird at sony.com
Tim.Bird at sony.com
Thu Sep 27 19:55:07 UTC 2018
Looks good. applied.
-- Tim
> -----Original Message-----
> From: fuego-bounces at lists.linuxfoundation.org [mailto:fuego-
> bounces at lists.linuxfoundation.org] On Behalf Of Daniel Sangorrin
> Sent: Monday, September 24, 2018 11:59 PM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH 02/11] testsuite version: record the testsuite
> version
>
> For tarballs we use an md5sum hash value, and for git
> we use the current commit ID.
>
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
> ---
> engine/scripts/functions.sh | 11 ++++++++++-
> engine/scripts/parser/common.py | 4 ++--
> 2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/engine/scripts/functions.sh b/engine/scripts/functions.sh
> index 05bdbc1..21a4b00 100755
> --- a/engine/scripts/functions.sh
> +++ b/engine/scripts/functions.sh
> @@ -379,6 +379,15 @@ function pre_build {
> else
> abort_job "Rebuild flag $Rebuild is not recognized."
> fi
> +
> + # Record the version of the test source
> + if [ -e fuego_tarball_src_md5sum ]; then
> + TESTSUITE_VERSION=$(cat fuego_tarball_src_md5sum | awk '{ print $1
> }')
> + elif [ -d ".git" ]; then
> + TESTSUITE_VERSION=$(git log -1 --format="%H")
> + fi
> + export TESTSUITE_VERSION
> + echo "Testsuite version: $TESTSUITE_VERSION"
> }
>
> function build {
> @@ -710,7 +719,7 @@ function make_pre_run_file {
> "test_plan": "$TESTPLAN",
> "test_spec": "$TESTSPEC",
> "timestamp": "$BUILD_TIMESTAMP",
> - "testsuite_version": "unknown",
> + "testsuite_version": "$TESTSUITE_VERSION",
> "toolchain:": "$TOOLCHAIN",
> "workspace": "$WORKSPACE"
> },
> diff --git a/engine/scripts/parser/common.py
> b/engine/scripts/parser/common.py
> index c218190..b93a874 100644
> --- a/engine/scripts/parser/common.py
> +++ b/engine/scripts/parser/common.py
> @@ -59,7 +59,7 @@ env_list = ['FUEGO_RW', 'FUEGO_RO', 'FUEGO_CORE',
> 'NODE_NAME', 'TESTDIR',
> 'TESTSPEC', 'BUILD_NUMBER', 'BUILD_ID', 'BUILD_TIMESTAMP',
> 'TOOLCHAIN', 'FWVER', 'LOGDIR', 'FUEGO_START_TIME', 'Reboot',
> 'Rebuild', 'Target_PreCleanup', 'WORKSPACE', 'JOB_NAME',
> - 'FUEGO_VERSION', 'FUEGO_CORE_VERSION'
> + 'FUEGO_VERSION', 'FUEGO_CORE_VERSION', 'TESTSUITE_VERSION'
> ]
>
> # add certain environment variables to this module
> @@ -456,7 +456,7 @@ def prepare_run_data(results, criteria_data):
> "metadata":{
> "fuego_version":FUEGO_VERSION,
> "fuego_core_version":FUEGO_CORE_VERSION,
> - "testsuite_version":"v1.1-805adb0", #FIXTHIS
> + "testsuite_version":TESTSUITE_VERSION,
> "host_name":FUEGO_HOST,
> "board":NODE_NAME,
> "compiled_on":"docker", #FIXTHIS
> --
> 2.7.4
>
> _______________________________________________
> Fuego mailing list
> Fuego at lists.linuxfoundation.org
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__lists.linuxfoundation.org_mailman_listinfo_fuego&d=DwICAg&c=fP4tf-
> -1dS0biCFlB0saz0I0kjO5v7-
> GLPtvShAo4cc&r=jjTc71ylyJg68rRxrFQuDFMMybIqPCnrHF85A-
> GzCRg&m=xORNxB2czj6nk50V4iI20FjcfmxKIxk-rxhU5Zk288g&s=v-
> 3LXQeIQyxl2CZBZblqEGHFRRPsDTlKKL6sJhEQMFw&e=
More information about the Fuego
mailing list