Commit Graph
929 Commits
Author SHA1 Message Date
Rangi 417b5212d4 Fix OOM for too-small overlay files in 32K mode (rgblink -t) 2026-07-13 16:17:30 -04:00
Rangi 96bc58b7f7 Add test case for local labels that superficially look like keywords 2026-07-11 13:51:53 -04:00
Rangi 4857ad1e00 Fix crash on image without any colors (all transparent) 2026-07-11 13:18:40 -04:00
Rangi 3b33c942ae Fix a crash and a limitation in RGBGFX unoptimized output
- If both banks 0 and 1 were completely filled, then
  `assume(bank == 0)` would false and potentially crash.
- If the input image had fully-background tiles, they would be
  incorrectly counted towards `nbTiles` and could cause the
  "Image contains N tiles, exceeding the limit" check to fail.
2026-07-11 12:32:31 -04:00
Rangi 5525dd902b Update external test commits 2026-07-10 23:29:19 -04:00
Rangi be4c1161bd Fix RGBGFX crash when trimming more tiles than exist after deduplication 2026-07-10 17:35:32 -04:00
Rangi 7b97d7ce15 Fix RGBGFX crash on deduplicating transparent tiles 2026-07-09 21:24:59 -04:00
Rangi 21682e8814 Consistently handle negative shifted macro args (#2014)
Negative macro arguments count from the end, i.e. `\<-1>`
is equivalent to `\<_NARG>`, even after `shift`ing them.

Negative arguments cannot be used to access shifted values.
2026-07-07 02:19:37 -04:00
Rangi f82b0838a1 Disallow minus sign before symbol name in bracketed macro arguments (#2015)
This was being silently allowed but without actually negating the symbol's value
2026-07-07 00:42:09 -04:00
Rangi fe3b238dea Do not allow defining labels outside sections (#2013)
Creating a `Symbol` with `type = SYM_LABEL` but `section = nullptr`
is inconsistent and dangerous. I was not able to cause any buggy
behavior so far, but it's safer and reasonable to not create such
a symbol in the first place.

The main consequence is that `DEF(LabelOutsideSection)` will now
evaluate as 0.
2026-07-06 16:18:42 -04:00
Rangi 46a6966b70 Fix $8000_0000 % -1 to warn with -Wdiv like $8000_0000 / -1 does (#2012) 2026-07-06 15:08:44 -04:00
Rangi be3fc61859 Fix included linker scripts with no newline at EOF (#2011) 2026-07-06 14:01:40 -04:00
Rangi 0adbb92e50 Same-line shellcheck comment explanations
These are obvious even with `git grep shellcheck`.
2026-07-06 04:43:08 +02:00
Rangi 09da4e001a Use Bash arrays instead of POSIX splitting when possible 2026-07-06 04:43:08 +02:00
Rangi 189c679e13 Parallelize build jobs according to CPU count 2026-07-05 20:58:50 -04:00
Rangi f81f5fe63c Use git clean -fdx instead of make clean in external projects 2026-07-05 20:58:50 -04:00
Rangi de36a11be7 Prevent rgblink -Wno-* disabled warnings from printing a location trace anyway
Fixes #2005
2026-07-04 23:02:16 -04:00
Rangi e3c594c250 Explain why we do not use file(GLOB ext_projects CONFIGURE_DEPENDS "external/*.cfg") 2026-07-03 18:38:07 -04:00
Rangi 9bbb2247a7 Fix rgbasm -Werror=... not adding to the final error count 2026-07-03 13:05:33 -04:00
ISSOtm 4a77c42ed7 Remove redundant labels from tests
It's possible to filter tests by name (`-R`)
2026-07-02 10:39:59 -04:00
ISSOtm b12eac356e Try to automatically determine the test OS name 2026-07-02 10:39:59 -04:00
ISSOtm 82702d8149 Point out an ordering dep isn't a success one 2026-07-02 10:39:59 -04:00
ISSOtm 1f9cc9651a Avoid fetching some repos twice
Also enables a nice bit of logic cleanup
2026-07-02 10:39:59 -04:00
ISSOtm 04b9c7fa3d Move external tests files to tests/external/ 2026-07-02 10:39:59 -04:00
ISSOtm 5e8a6cde20 Remove the need to explicitly list external tests
I like having a single source of truth!
2026-07-02 10:39:59 -04:00
ISSOtm d59081a918 Shorten external test prop names slightly
Makes the scripts a bit easier to read, I think
2026-07-02 10:39:59 -04:00
Rangi 3941a28661 Remove unused variables 2026-06-30 10:30:31 -04:00
Rangi a829e6c067 Refactor the test harness for external repo tests (#1994)
- Use CTest labels to filter tests ("internal"/"external", "free"/"nonfree",
  and individual tool+project names) instead of defining `TESTS_RUN_NONFREE`
- Allow each external test to run independently in CTest
- Remove the unused no-op `fetch-test-deps.sh --only-internal` option
2026-06-30 16:19:41 +02:00
Eldred HabertandRangi 6cba5518e9 Install Pillow together with the rest of our CI deps (#1952)
We shouldn't assume how the user wants to install things.
In particular, `--break-system-packages` is egregious.

---------

Co-authored-by: Rangi <[email protected]>
2026-06-28 13:06:40 -04:00
Rangi fc7d9ad573 Handle more numeric literal syntax errors in linker scripts 2026-06-09 18:46:51 -04:00
Rangi 6b2b6e6000 Fix off-by-one error with INCLUDEd linker script line numbers 2026-06-09 16:16:21 -04:00
Rangi42 f72a4d53e2 Add -Wlarge-constant to RGBLINK as it is for RGBASM 2026-06-09 16:16:21 -04:00
vulcandth 998f636495 Fix rgbgfx -Z palette overgeneration on merged color sets (#1912)
- Fix logic for color set comparison (which affects sorting them)
- Prune color sets which are proper subsets of newly-encountered ones
  (a comment implied we were already doing this, but we weren't)
- Add more verbose logging to debug this behavior
2026-06-07 09:55:05 -04:00
Rangi 7eaca1577d Update .gitattributes for test/asm/crlf.asm
A fresh clone showed a diff even without any bytes changed.
2026-05-25 22:57:52 -04:00
Rangi 996469ee28 Ensure CRLF line endings are preserved when necessary
Some test cases need CRLF line endings checked out even on Unix.
Also some source files had inadvertently contained CR bytes.
2026-05-25 22:00:45 -04:00
Rangi 55db252a8f Simplify the lexer by removing BufferedContent and inlining ViewedContent (#1981)
Instead of reading 64 characters at a time into a rolling buffer
as `shiftChar()` is called, we read 8192 characters at a time into
a complete buffer before any `peek()`/`shiftChar()` operations.
2026-05-25 21:05:59 -04:00
Rangi d56dbbb4bf Refactor section creation errors, and simplify output for single errors (#1964) 2026-05-21 13:01:08 -04:00
Rangi 358e8fe636 Add more tests of lexer's skipToLeadingKeyword behavior (#1971)
The character after the ending keyword gets blue-painted.
2026-05-09 15:56:17 -04:00
ISSOtm fa22b78e7d Use type instead of which in shell scripts
The latter is not a Bash built-in,
and some environments turn out to produce non-conforming
return codes.

`type` is provided by Bash itself,
so we can rely on it better.
2026-05-05 16:03:33 +02:00
Rangi42 9fd0c0297f Fix invalid character in bracketed macro argument
The invalid character should not be consumed by `shiftChar()`.
2026-04-27 17:11:20 +02:00
Rangi42 a18b2f1049 Consistently lex local labels after keywords, even when skipping/capturing 2026-04-27 15:28:30 +02:00
Rangi42 3f144b7713 Add test case for local labels after block-ending keywords 2026-04-27 15:04:12 +02:00
Rangi cfec017fed Consolidate, refactor, and bugfix the lexer's handling of captures and skips (#1957)
- Do not error about local labels following keywords in skips or captures (fixes #1955)
- Do not incompletely attempt to handle line continuations in skips (fixes #1956)
- Rename `skipToLeadingIdentifier` to `skipToLeadingKeyword`, refactor to merge
  `skipToEOL` into it, and use it for both skips and captures
2026-04-20 13:04:20 +02:00
ISSOtm 81edc27b6e Fix two warnings on MinGW 2026-04-16 00:57:33 +02:00
ISSOtm d48d6fe5d9 Bump our macOS CI runners 2026-04-16 00:25:58 +02:00
Eldred Habert 78281a4aaa Break down CTest cases into each test suite (#1931)
This allows parallelising the individual programs'
test suites, which can save a few minutes!
2026-04-12 21:29:12 -04:00
Eldred Habert 0e6e91d048 Avoid copying RGBFIX binary when testing it (#1933)
This is just cleaner in general,
and also avoids separating it from any DLLs it may be needing.
2026-04-12 13:23:51 -04:00
Rangi df0b557638 Don't allow invalid interpolations to occur (#1925)
Fixes #1921
2026-04-11 18:16:07 +02:00
ISSOtmandvulcandth a5be1d886e Copy DLLs to appropriate dir for install-less Windows testing
Co-authored-by: vulcandth <[email protected]>
2026-04-10 18:01:16 +02:00
Rangi 9b4b4a581b Check for overflow in fixed-point precision suffix (#1918)
Fixes #1917
2026-04-07 17:06:54 -04:00