This is the test suite of my programming language called grug.
- Clone this repository, and clone grug next to it.
- Run
cd grug-tests. - Run the tests using VS Code's debugger by hitting F5, or running
./tests.sh ../grug.
You can get more info in the test its generated results directory (from objdump, readelf and xxd) by running OUTPUT_DLL_INFO= ./tests.sh ../grug.
If a test failed, you can reproduce it by replacing time(NULL) in main() with the failing test's printed seed.
If you're using a Debian-based distribution like Ubuntu 22.04, you might need to run sudo sysctl vm.mmap_rnd_bits=28 to fix address sanitizer, which tests.sh uses. See this GitHub thread for context.
If the tests don't pass, try running OLD_LD= ./tests.sh ../grug.
tests.sh requires and has been tested with:
- NASM version 2.15.05 (
nasm_2.15.05-1_amd64.debin my case) - GNU ld (GNU Binutils for Ubuntu) 2.38
- valgrind (valgrind-3.18.1)
See the development.md file in this repository.