X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=resize%2FMakefile.am;h=c5d68e786bf7e86347f85b545068079e7e1049fa;hb=3f54bd02fcf540f9b4b6edc93f3b6b9c7ba136bd;hp=93a2600fe787147b7b43b5b42f3f5dd1ace4b5dd;hpb=028944cc1a7987cfaca1e30d1b93bdee2828a478;p=libguestfs.git diff --git a/resize/Makefile.am b/resize/Makefile.am index 93a2600..c5d68e7 100644 --- a/resize/Makefile.am +++ b/resize/Makefile.am @@ -31,7 +31,8 @@ if HAVE_OCAML_PCRE SOURCES = \ progress.ml \ resize.ml \ - utils.ml + utils.ml \ + utils_tests.ml # Note this list must be in dependency order. OBJECTS = \ @@ -78,6 +79,12 @@ CLEANFILES += stamp-virt-resize.pod # Tests. +check_SCRIPTS = utils_tests + +utils_tests: utils.cmx utils_tests.cmx + $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \ + mlguestfs.cmxa -linkpkg $^ -cclib -lncurses -o $@ + random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) TESTS_ENVIRONMENT = \ @@ -86,14 +93,15 @@ TESTS_ENVIRONMENT = \ LIBGUESTFS_PATH=$(top_builddir)/appliance \ TMPDIR=$(top_builddir) -TESTS = test-virt-resize.sh +TESTS = test-virt-resize.sh utils_tests # Dependencies. depend: .depend .depend: $(wildcard *.mli) $(wildcard *.ml) rm -f $@ $@-t - $(OCAMLFIND) ocamldep $(OCAMLPACKAGES) $^ | \ + $(OCAMLFIND) ocamldep -I ../ocaml $^ | \ + $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ sort > $@-t mv $@-t $@