Skip to content
Snippets Groups Projects
Commit 2affa98e authored by Chase Qi's avatar Chase Qi
Browse files

ci: migrate gcc test to scheduled-weekly/gcc on squad


Signed-off-by: default avatarChase Qi <chase.qi@linaro.org>
parent e4dcf6c9
No related branches found
No related tags found
No related merge requests found
...@@ -793,7 +793,7 @@ oe-selftest-report: ...@@ -793,7 +793,7 @@ oe-selftest-report:
script: script:
- | - |
set -x set -x
curl https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-test-definitions/-/raw/gcc-test/automated/utils/gcc-result-parser.py \ curl https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-test-definitions/-/raw/oniro/automated/utils/gcc-result-parser.py \
> gcc-result-parser.py > gcc-result-parser.py
for job_path in $(find artifacts/ -type d -name oe-selftest-gcc*); do for job_path in $(find artifacts/ -type d -name oe-selftest-gcc*); do
( (
...@@ -812,7 +812,7 @@ oe-selftest-report: ...@@ -812,7 +812,7 @@ oe-selftest-report:
job_id="$job-$component" job_id="$job-$component"
time curl \ time curl \
--header "Auth-Token: $CI_SQUAD_TOKEN" \ --header "Auth-Token: $CI_SQUAD_TOKEN" \
https://squadp.svc.ostc-eu.dev/api/submit/oniro-core/gcc-test/$CI_PIPELINE_ID/$test_env \ https://squadp.svc.ostc-eu.dev/api/submit/scheduled-weekly/gcc/$CI_PIPELINE_ID/$test_env \
--form tests=@$result_file \ --form tests=@$result_file \
--form "metadata={\"job_id\": \"$job_id\", \"gcc_version\": \"$gcc_version\"}" --form "metadata={\"job_id\": \"$job_id\", \"gcc_version\": \"$gcc_version\"}"
done done
......
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
| tee -a conf/local.conf ) | tee -a conf/local.conf )
# Variables in the form of '^CI_ONIRO_BB_BBLAYERS_CONF_plus_equals_attr' are # Variables in the form of '^CI_ONIRO_BB_BBLAYERS_CONF_plus_equals_attr' are
# converted to 'attr += "value"' and appended to bblayers.conf # converted to 'attr += "value"' and appended to bblayers.conf
# this is useful if layer has to be added but bitbake add-layer command cannot be used # this is useful if layer has to be added but bitbake add-layer command cannot be used
# (for example this layer's class is inherited via local.conf already) # (for example this layer's class is inherited via local.conf already)
- | - |
( set +o pipefail; ( set +o pipefail;
...@@ -499,16 +499,21 @@ ...@@ -499,16 +499,21 @@
# Only run tests when gcc version changed. # Only run tests when gcc version changed.
- gcc_version="$(bitbake -s | grep '^gcc-runtime' | awk -F':' '{print $NF}' | head -1 | awk '{$1=$1;print}')" - gcc_version="$(bitbake -s | grep '^gcc-runtime' | awk -F':' '{print $NF}' | head -1 | awk '{$1=$1;print}')"
- echo "Current GCC version $gcc_version" - echo "Current GCC version $gcc_version"
- last_build_id="$(curl --silent $CI_SQUAD_INSTANCE/api/projects/5/builds/ | jq -r '.results | .[] | .id' | head -1)" - last_build_id="$(curl --silent $CI_SQUAD_INSTANCE/api/projects/12/builds/ | jq -r '.results | .[] | .id' | head -1)"
- last_tested_gcc_version="$(curl --silent $CI_SQUAD_INSTANCE/api/builds/$last_build_id/metadata/ | jq -r '.gcc_version')"
- echo "The last tested GCC version $last_tested_gcc_version"
- | - |
if [ "$gcc_version" != "$last_tested_gcc_version" ]; then if [ -n "${last_build_id}" ]; then
echo "GCC verion changed, about to test the new version ..." last_tested_gcc_version="$(curl --silent $CI_SQUAD_INSTANCE/api/builds/$last_build_id/metadata/ | jq -r '.gcc_version')"
echo "The last tested GCC version $last_tested_gcc_version"
if [ "$gcc_version" != "$last_tested_gcc_version" ]; then
echo "GCC verion changed, about to test the new version ..."
else
echo "GCC verion not changed, skipping gcc tests ..."
exit 0
fi
else else
echo "GCC verion not changed, skipping gcc tests ..." echo "The last tested GCC version not found, about to run gcc tests ..."
exit 0
fi fi
- |
# oe-selftest inherits the current 'build/conf/local.conf' to create # oe-selftest inherits the current 'build/conf/local.conf' to create
# '../build-st/conf/local.conf' for qemu image building. Adding the # '../build-st/conf/local.conf' for qemu image building. Adding the
# MACHINE variable to the current local conf allows test job to customize # MACHINE variable to the current local conf allows test job to customize
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment