Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-1533

Provisioning scripts on Linux explicitly allow errors

    XMLWordPrintable

    Details

      Description

      In the shell scripts for provisioning in qt5, we have a pattern that is fundamentally wrong.

      set -e

      wget --tries=5 --waitretry=5 --output-document=$targetFile $url || echo "Failed to download '$url' multiple times"

      The problem is pretty obvious: set -e is good, then we actively work around it by using the or expression, so in case of errors, we print an error message and continue.

      I would recommend "set -x" in addition to "set -e" to make it clear what is going on.

      The most important part is of course to get rid of all || echo immediately.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              hehalmet Heikki Halmet
              Reporter:
              frederik Frederik Gladhorn
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes