Project

General

Profile

Bug #24793

Wrong exit status from the CI scripts

Added by Marco Mambelli 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
08/14/2020
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

From Vito via slack

il problema dell'exit code che non viene propagato penso sia in questa funzione
https://cdcvs.fnal.gov/redmine/projects/glideinwms/repository/revisions/master/entry/build/jenkins/runtest.sh#L404
435 # ?? Global Variables Used: $mail_file $fail $TEST_COMPLETE - and HTML Constants
    do_process_branch "${git_branch}" "${outfile}" "${CMD_OPTIONS[@]}" 
    exit_code=$?
    # Check if Dry-run, end here
    [[ "${TEST_COMPLETE}" = branch ]] && return 0
    [[ "${TEST_COMPLETE}" = all ]] && exit 0
    log_branch "${outfile}" 
    local branch_result=$(do_get_status "${outfile}")
    local branch_exit_code=$?
    loginfo "Tested branch ${git_branch}: $branch_result" 
    loglog "RESULT_${COMMAND}_${branch_no_slash}=$branch_result" 
    return ${branch_exit_code}
viene catturato l'exit code exit_code=$? correttamente, ma poi in la funzione esce con
return ${branch_exit_code} in cui local branch_exit_code=$? dovrebbe catturare lo status di
local branch_result=$(do_get_status "${outfile}")
ma ho l'impressione che questo sia sempre 0 in quanto hai il risultato definito come local
comunque guardando come e' definita do_get_status ha sempre un return 2 , il che significherebbe che tutti i test sarebbero dichiarati con status 2

History

#1 Updated by Marco Mambelli about 1 month ago

  • Assignee set to Marco Mambelli
  • Status changed from New to Resolved

Fixed

#2 Updated by Marco Mambelli about 1 month ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF