use semaphore to remove race con in tests

Signed-off-by: Aidan Hahn <aidan@aidanis.online>
This commit is contained in:
Aidan Hahn 2022-03-06 23:39:55 -08:00
parent 033f1d5173
commit 8dca2bac04
No known key found for this signature in database
GPG key ID: 327711E983899316
2 changed files with 23 additions and 7 deletions

View file

@ -3,7 +3,7 @@ ALOG_TESTS = $(ALOG_TEST_SRCS:.c=)
$(ALOG_TESTS): $(ALOG_LIB)
$(CC) $(CFLAGS) -g -o $(BUILD_DIR)/$@.o -c tests/$@.c
$(CC) -o $(TARGET_DIR)/$@ $(BUILD_DIR)/$@.o $(ALOG_LIB)
$(CC) -o $(TARGET_DIR)/$@ $(BUILD_DIR)/$@.o $(ALOG_LIB) -lpthread
chmod +x $(TARGET_DIR)/$@
alog-tests: $(ALOG_TESTS)