Skip to content

Instantly share code, notes, and snippets.

@WarrenTheRabbit
Last active January 17, 2024 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WarrenTheRabbit/0557a276093908b5da66e218071bb712 to your computer and use it in GitHub Desktop.
Save WarrenTheRabbit/0557a276093908b5da66e218071bb712 to your computer and use it in GitHub Desktop.
Automates the Unity test runner template
PATH_PROJECT = /root/holbertonschool-sorting_algorithms
PATH_TESTS = $(PATH_PROJECT)/tests
PATH_UNITY = $(PATH_PROJECT)/Unity/src
TEST_RUNNER = $(PATH_TESTS)/test_runner_template.c
TEST_RUNNER_OUT = $(PATH_TESTS)/unity_test_runner.out
.PHONY: clean run
all: build run
build: $(TEST_RUNNER)
gcc -I$(PATH_UNITY) $(PATH_UNITY)/unity.c $(TEST_RUNNER) -o $(TEST_RUNNER_OUT)
run:
$(TEST_RUNNER_OUT)
clean:
rm -f $(TEST_RUNNER_OUT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment