apps_* tests run against whatever is in /opt/ecce, and a stale install fails as if the code were at fault

Ouverte
#1,317 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
c, python

Piste de recherche

Start with tests/apps/apps.py and the listed apps_* tests, then inspect how the install is produced and how CTest reports skipped tests. The issue proposes recording and comparing build IDs, logging install details, and making an all-skipped group visible; the acceptance criteria and behavior for that summary still need design decisions.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug

The apps_* ctest tests drive an installed ECCE tree, not the build directory:
tests/apps/apps.py:51-52 resolves

INSTALL  = os.environ.get("ECCE_TEST_HOME", "/opt/ecce")
WRAPPERS = os.environ.get("ECCE_TEST_WRAPPERS", "/usr/bin")

A plain ctest run builds but does not install, so these tests exercise whatever
happens to be in /opt/ecce -- in practice an install from an earlier commit.

What each test checks today. The non-examples tests check only that the wrapper file
exists, e.g. tests/apps/props_switch_paint_test.py:44 and
tests/apps/property_list_click_test.py:81:

print("SKIP: no ecce-builder under %s" % apps.WRAPPERS)
return SKIP        # 77, and the ctest entry sets SKIP_RETURN_CODE 77

So the "no install at all" case is handled. The case that is not handled is an install
that is present but is not the tree under test. apps.versionMismatch()
(apps.py:73-85) exists for exactly that and produces a SKIP naming both versions,
but it is called only by the examples_* tests (examples_test.py,
examples_preparsed_test.py, examples_topup_test.py, examples_upgrade_test.py,
examples_workflow_test.py, examples_workflow_steps_test.py). No other apps_*
test calls it.

Consequence. A full ctest run on main reported apps_props_switch_paint and
apps_property_list_click as failures that were caused by the installed tree being
older than the working tree, not by a fault in the code under test. The log shows the
test's own assertion text, with no line saying which tree the binary came from, so the
failure reads as a GUI regression and is investigated as one.

versionMismatch() alone would not have caught this run: it compares
data/client/config/Version, which does not change between commits within a release
cycle (here both the install and the tree read 9.6.0). So the check needs to be
stronger than the version string -- for instance recording the git describe/commit of
the tree the install was built from in the install, and comparing that.

Suggested direction:

  1. Record the build id of the tree an install was made from, and expose it beside
    Version.
  2. Have apps.py offer one guard that every apps_* test calls (as the examples_*
    tests call versionMismatch()), returning 77 with a message that names the install
    path, its build id and the tree's.
  3. Have every apps_* test print the install path and build id it used at the top of
    its log, pass or fail, so a stale-install failure is recognisable afterwards.

Tension to resolve, not to paper over. A SKIP that satisfies a completeness guard is
itself a silent-success hazard, the same shape as #1309 and #1301: a run in which
every apps_* test skips must not look like a run in which they passed. Whatever
guard is added, the skip has to be visible in the summary (count of skipped
apps_* tests, and a non-zero exit or an explicit statement when the whole group
skipped), not swallowed into a green run.

Langage dominant
C
Étoiles
10
Forks
8
Merge moyen
6 h 32 min
PR mergées (30 j)
1

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de FriendsofECCE/ECCE

Toutes les issues de FriendsofECCE/ECCE

Issues similaires

Plus d'issues C

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.