[Bug] Make CTest self-contained from a clean checkout

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c, cmake

Direzione di ricerca

Start in CMakeLists.txt around lines 61-73, where the elf_loader, disasm and decompiler tests point at the untracked ${CMAKE_CURRENT_SOURCE_DIR}/hello binary, and at the fixture target near lines 83-89, which does not build hello.c. Check .gitignore:15 to see why hello is ignored. Done when a fresh archive of HEAD configures, builds and passes ctest --test-dir build without any pre-existing hello binary, with the fixture shared by all three tests.

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

Descrizione

bug good first issue

Summary

ctest fails from a clean checkout because three tests require an ignored hello executable that no CMake target creates.

Evidence

CMakeLists.txt:61-73 registers elf_loader, disasm, and decompiler with:

"${CMAKE_CURRENT_SOURCE_DIR}/hello"

However, hello is ignored by .gitignore:15, only hello.c is tracked, and the build fixture target at CMakeLists.txt:83-89 does not compile hello.c.

I reproduced this by archiving HEAD into a fresh directory and running the documented workflow:

50% tests passed, 3 tests failed out of 6
elf_loader: could not open file: .../hello
disasm: could not open file: .../hello
decompiler: could not open file: .../hello

The roundtrip test passes because it compiles its own temporary fixture, which makes the inconsistency easy to miss when an old ignored hello binary happens to exist locally.

Impact

The README promises that make -C build test works after a fresh configure/build, but a new clone or CI workspace fails three tests before exercising the loader, disassembler, and project decompiler tests.

Expected behavior

The test suite should provision its ELF fixture as part of the build/test graph, or compile a temporary fixture from hello.c for every test that needs a binary. A clean checkout should pass the documented test command without relying on ignored files left by a previous local build.

Acceptance criteria

  • Remove the dependency on an untracked hello executable.
  • Verify cmake -S . -B build && cmake --build build && ctest --test-dir build in a clean checkout.
  • Keep the fixture setup deterministic and shared by the loader, disassembly, and decompiler tests.
Lingua principale
C++
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 TiElixir/caraxes

Tutte le issue di TiElixir/caraxes

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.