938 Commits
Author SHA1 Message Date
Rangi e7e671b249 Update external test commits 2026-08-01 11:24:42 -04:00
Rangi 0c772ea049 Update external testing CI with libbet's new way of running Python
libbet now uses `py -3` if the `py` binary exists, instead of if
`COMSPEC` is defined. So we don't need to `unset COMSPEC`, we just
need to avoid Windows' `py` launcher from being in Cygwin's `PATH`.

It turns out that `C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 ...`
was not effectively preventing Windows' `PATH` from being inherited
by Cygwin's `PATH`, because to take effect it needs to run Cygwin's
`/etc/profile` script. The simple way to do that is using a login
shell. So we don't need the `PREFIX`/`--prefix` from the previous
commit after all.
2026-08-01 04:49:43 +02:00
Rangi ec5e6cbabb Handle -Wtruncation for link-time jr values
Fixes #2028
2026-07-21 14:51:58 -04:00
Rangi d9c0d37fd5 Explicitly allow JR offsets to wrap around in RGBLINK
This reverts commit f27a8132d9.
2026-07-20 19:23:11 -04:00
Rangi 9a15b723f2 Format CGB colors in error/verbose messages as "GB:rr,gg,bb"
These should be more debuggable than packed "$xxxx" format.
2026-07-14 10:34:27 -04:00
Rangi 19e60d9864 Fix large ds in linker script overflowing the PC 2026-07-14 00:42:42 -04:00
Rangi c0ff3d92ad Fix reverse palette offsets when base palette ID wraps around to 0 2026-07-13 23:08:20 -04:00
Rangi 5869e0dc60 Fix RGBLINK scrambling algorithm to work for SRAM
Since SRAM sections start from 0, we had been using a signed
`int8_t curScrambleSRAM` counter to allow 0 as a scrambled bank,
but this actually just placed all floating SRAM sections in bank 0.
2026-07-13 22:39:41 -04:00
Rangi 196d50c1d7 Add XXX: comment tag to working but fragile test cases 2026-07-13 22:39:41 -04:00
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