make debug
make d # equivalent to make debug
make debug CC=clang
make d CC=clang # equivalent to make debug CC=clang
make
make CC=clang
# cmake
cmake build -S ./ -B bin/
cd bin
make
gdb -tui ./bin/ncsh
# c - continue
# s - step
# n - step over
valgrind --leak-check=yes ./bin/ncsh
valgrind --leak-check=full ./bin/ncsh
valgrind --track-fds=yes ./bin/ncsh
valgrind --leak-check=yes --track-fds=yes ./bin/ncsh
- compile with -pg, -O3 and -DNDEBUG
- run program
- generate report: gprof gmon.out > analysis.txt
- review analysis.txt
There are shorthands for all of the commands in the makefile.
# run CI tests (not all tests)
make check
# run all tests
make check_local
# run tests individually
make test_autocompletions
make test_history
make test_parser
make test_fzf
make test_z
make integration_tests
make fuzz_autocompletions
make fuzz_history
make fuzz_parser
./src/z/z_fuzz.sh
./src/z/z_add_fuzz.sh