Add tests and fix bugs

This commit is contained in:
gbaconni
2022-04-17 09:59:41 +02:00
parent 5aa3e848e9
commit ba482a0104
8 changed files with 94 additions and 39 deletions

31
tests/Makefile Normal file
View File

@@ -0,0 +1,31 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/04/16 20:12:38 by gbaconni #+# #+# #
# Updated: 2022/04/16 20:22:22 by gbaconni ### lausanne.ch #
# #
# **************************************************************************** #
UNAME_S = $(shell uname -s)
all: test
libftprintf.a:
@ln -snf ../libftprintf/libftprintf.a libftprintf.a
test: test-pft
test-pft: libftprintf.a
@test -d pft || git clone https://github.com/gavinfielder/pft.git pft
ifeq ($(UNAME_S),Linux)
@which php >/dev/null 2>&1 || sudo apt-get install -qq -y php-cli
@sed -i -r 's/^(INCLUDE_LIBPTHREAD)=.*/\1=1/' pft/options-config.ini
endif
@make -C pft
@cd pft && ./test