Skip to content

Test the real XGAP under Xvfb, with coverage - #44

Merged
fingolfin merged 1 commit into
masterfrom
mh/coverage
Sep 20, 2026
Merged

fingolfin merged 1 commit into
masterfrom
mh/coverage

Conversation

@fingolfin

@fingolfin fingolfin commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

tst/testall.g talks to a GAP in package mode without any window, so it can neither open a sheet nor reach the C code. This adds tst-gui/, whose tests run inside the XGAP binary; CI starts it under Xvfb.

  • sheet.tst: graphic objects on a plain sheet
  • lattice.tst: menu operations on a subgroup lattice, including a regression test for SelectedGroups to GAP fails #26
  • run.g: driver. XGAP shows GAP's output in its window and does not pass on its exit status, so results go to tst-gui.log and tst-gui.status; --quitonbreak and timeout keep an error from hanging the job.

Coverage

The run collects coverage for the GAP code (--cover) and the C code (gcov; build-pkg already compiles with --coverage), so the coverage upload is back. Codecov now shows 28 files, 49.78% overall: the 20 GAP files (e.g. lib/ilatgrp.gi, lib/gobject.gi) and the 8 C files (gapgraph.c 76%, xgap.c 55%, xcmds.c 43%, gaptext.c 26%, pty.c 25%, selfile.c 0%).

The C files only appeared after rebasing onto #47. With the old build, which compiled in bin/<arch>, codecov accepted the uploaded .gcov files without error but silently left all C files out of the report. An earlier version of this description said the ../../src.x11/ paths were not the cause; that was wrong, or at best incomplete. Rewriting the Source: line inside the .gcov files did not help, but compiling from the top level, which also changes the .gcov file names from ^#^#src.x11#xcmds.c.gcov to src.x11#xcmds.c.gcov, did.

codecov/project fails because codecov compares against a stored base of 93.71%, from when only the test driver was measured. It should settle once master has a report from this setup.

Assisted-by: Claude Code (Fable 5.1)

@codecov

codecov Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.78%. Comparing base (77840f6) to head (3564895).
⚠️ Report is 47 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (77840f6) and HEAD (3564895). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (77840f6) HEAD (3564895)
8 3
Additional details and impacted files
@@             Coverage Diff             @@
##           master      #44       +/-   ##
===========================================
- Coverage   93.71%   49.78%   -43.93%     
===========================================
  Files           3       28       +25     
  Lines         175    10302    +10127     
  Branches        0      558      +558     
===========================================
+ Hits          164     5129     +4965     
- Misses         11     5083     +5072     
- Partials        0       90       +90     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

tst/testall.g talks to a GAP in package mode without any window, so
it can neither open a sheet nor reach the C code. Add tests that run
inside the XGAP binary, which CI starts under Xvfb: graphic objects on
a sheet, and menu operations on a subgroup lattice, including the
"SelectedGroups to GAP" entry.

These runs yield coverage data for both the C and the GAP code, so
restore the coverage upload.

Assisted-by: Claude Code (Fable 5.1)
@fingolfin
fingolfin added this pull request to stack #49 September 20, 2026 16:41
@fingolfin
fingolfin merged commit 91fb23b into master Sep 20, 2026
5 of 6 checks passed
@fingolfin
fingolfin deleted the mh/coverage branch September 20, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant