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

Aperta
#1,317 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C
Stelle
10
Fork
8
Merge medio
6h 32m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FriendsofECCE/ECCE

Tutte le issue di FriendsofECCE/ECCE

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.