Probando a lanzar la ejecución de tests y comparación de salidas desde Makefile
This commit is contained in:
parent
a8bcf5201d
commit
3c8918372e
1 changed files with 10 additions and 47 deletions
57
Makefile
57
Makefile
|
|
@ -18,54 +18,17 @@ TESTS:= isalpha_test isdigit_test isalnum_test isascii_test
|
||||||
|
|
||||||
all: $(TESTS)
|
all: $(TESTS)
|
||||||
|
|
||||||
run:
|
run: all
|
||||||
for i in $(TESTS); do \
|
|
||||||
echo ./$$i; \
|
|
||||||
done
|
|
||||||
|
|
||||||
foo:
|
|
||||||
$(foreach E, $(TESTS), \
|
$(foreach E, $(TESTS), \
|
||||||
$(eval X = $(subst _test,_expected.output,$(E))) \
|
$(eval X = $(subst _test,_expected.output,$(E))) \
|
||||||
$(eval A = $(subst _test,_actual.output,$(E))) \
|
$(eval A = $(subst _test,_actual.output,$(E))) \
|
||||||
echo ./$(E) redir $(A); \
|
echo "SALIDA $(E)" > $(A); ./$(E) >> $(A); \
|
||||||
echo less diff -a $(X) $(A); \
|
diff -a $(X) $(A) | less; \
|
||||||
)
|
)
|
||||||
#
|
|
||||||
#
|
fclean:
|
||||||
#OBJECTS = $(SOURCES:.c=.o)
|
$(foreach E, $(TESTS), \
|
||||||
#
|
$(eval A = $(subst _test,_actual.output,$(E))) \
|
||||||
#build: $(OBJECTS)
|
rm -f $(E) $(A); \
|
||||||
# ar rcs $(NAME) $(OBJECTS)
|
)
|
||||||
#
|
|
||||||
#clean:
|
|
||||||
##removes objects (.o)#
|
|
||||||
# @echo "Deleting '.o' files..."
|
|
||||||
# @rm -f $(OBJECTS)
|
|
||||||
# @echo "Files '.o' deleted"
|
|
||||||
#
|
|
||||||
#fclean: clean
|
|
||||||
##removes objects (.o) and library#
|
|
||||||
# @echo "Deleting lib..."
|
|
||||||
# @rm -f $(NAME)
|
|
||||||
# @echo "Lib deleted"
|
|
||||||
#
|
|
||||||
#all: $(NAME)
|
|
||||||
## builds all
|
|
||||||
#
|
|
||||||
#re: clean all
|
|
||||||
## cleans and rebuild all
|
|
||||||
#
|
|
||||||
#isalpha_test: isalpha_test.c $(NAME)
|
|
||||||
# $(CC) -o isalpha_test.out isalpha_test.c $(CFLAGS) -L. -lft
|
|
||||||
#
|
|
||||||
#isdigit_test: isdigit_test.c $(NAME)
|
|
||||||
# $(CC) -o isdigit_test.out isdigit_test.c $(CFLAGS) -L. -lft
|
|
||||||
#
|
|
||||||
#isalnum_test: isalnum_test.c $(NAME)
|
|
||||||
# $(CC) -o isalnum_test.out isalnum_test.c $(CFLAGS) -L. -lft
|
|
||||||
#
|
|
||||||
#isascii_test: isascii_test.c $(NAME)
|
|
||||||
# $(CC) -o isascii_test.out isascii_test.c $(CFLAGS) -L. -lft
|
|
||||||
#
|
|
||||||
#clean_tests:
|
|
||||||
# @rm -f *_test.out *_test.o
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue