Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • opensrc/libehp
1 result
Show changes
Commits on Source (1)
...@@ -33,14 +33,12 @@ function main() ...@@ -33,14 +33,12 @@ function main()
echo "The report is: " echo "The report is: "
echo "$report" | tee fail_report.yaml echo "$report" | tee fail_report.yaml
local declare crash_count=$(echo "$report"|shyaml get-value failing-input-count) local declare crash_count=$(echo "$report"|shyaml get-value failing-input-count)
if [[ $crash_count == 0 ]]; then if [[ $crash_count == 0 ]]; then
echo "No crashes found" echo "No crashes found"
exit 0 exit 0
else else
set -x
# upload the report. # upload the report.
local proj_id=114 local proj_id=114
local upload_report=$(curl --request POST --header "PRIVATE-TOKEN: PXLgVFpgjmmugAiHTJzx " --form "file=@fail_report.yaml" https://git.zephyr-software.com/api/v4/projects/$proj_id/uploads) local upload_report=$(curl --request POST --header "PRIVATE-TOKEN: PXLgVFpgjmmugAiHTJzx " --form "file=@fail_report.yaml" https://git.zephyr-software.com/api/v4/projects/$proj_id/uploads)
...@@ -49,8 +47,7 @@ function main() ...@@ -49,8 +47,7 @@ function main()
local host=$(hostname) local host=$(hostname)
local md=$(echo $upload_report | shyaml get-value markdown) local md=$(echo $upload_report | shyaml get-value markdown)
local desc="" local desc=""
set +e # allow read to return non-zero as read does that on EOF read -r -d '' desc || true << EOM
read -r -d '' desc << EOM
Turbo automatically found $crash_count crashes! Turbo automatically found $crash_count crashes!
Host: $host Host: $host
...@@ -65,12 +62,11 @@ See [job details](https://git.zephyr-software.com/opensrc/libehp/-/jobs/$CI_JOB_ ...@@ -65,12 +62,11 @@ See [job details](https://git.zephyr-software.com/opensrc/libehp/-/jobs/$CI_JOB_
and [pipeline details](https://git.zephyr-software.com/opensrc/libehp/pipelines/$CI_PIPELINE_ID). and [pipeline details](https://git.zephyr-software.com/opensrc/libehp/pipelines/$CI_PIPELINE_ID).
EOM EOM
set -e
local title="Turbo found $crash_count bugs in libEHP on $date" local title="Turbo found $crash_count bugs in libEHP on $date"
local assignee_id="$GITLAB_USER_ID"
# finally post an issue # finally post an issue
curl --request POST --data-urlencode "description=$desc" --data-urlencode "title=$title" --header "PRIVATE-TOKEN: PXLgVFpgjmmugAiHTJzx " "https://git.zephyr-software.com//api/v4/projects/$proj_id/issues?&labels=bug,turbo&assignee_ids[]=3" curl --request POST --data-urlencode "description=$desc" --data-urlencode "title=$title" --header "PRIVATE-TOKEN: PXLgVFpgjmmugAiHTJzx " "https://git.zephyr-software.com//api/v4/projects/$proj_id/issues?&labels=bug,turbo&assignee_ids[]=$assignee_id"
echo "$crash_count count crashes found!" echo "$crash_count count crashes found!"
exit 1 exit 1
......