X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=tests%2FMakefile.am;h=94e34f328f4be4c12d81b668a54bb88c66c8a1d1;hb=06862e2b6a78db8418000e4324d1bb732515057e;hp=7c5ed8d9f676c396d57dabbf6732f4110b19176b;hpb=a5142d1a1fdb1480daa8ffc334170611329bb597;p=psensor.git diff --git a/tests/Makefile.am b/tests/Makefile.am index 7c5ed8d..94e34f3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,24 +1,45 @@ check-local: checkpatch.pl - find $(top_srcdir)/src -name \*.c -exec $(srcdir)/checkpatch.pl -q --no-tree -emacs -f {} \; - find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl -q --no-tree -emacs -f {} \; + find $(top_srcdir)/src -name \*.c -exec $(srcdir)/checkpatch.pl --ignore SPLIT_STRING --show-types -q --no-tree -emacs -f {} \; + find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl --ignore SPLIT_STRING --show-types -q --no-tree -emacs -f {} \; -EXTRA_DIST = checkpatch.pl data test-io-dir-list.sh +DEFS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@ + +EXTRA_DIST = checkpatch.pl \ + data \ + test-cppcheck.sh \ + test-io-dir-list.sh check_PROGRAMS = test-io-dir-list \ + test-psensor-type-to-unit-str \ + test-psensor-value-to-str \ test-url-encode \ test-url-normalize -AM_CPPFLAGS = -pedantic -Werror +AM_CPPFLAGS = -Wall -Werror -test_url_encode_SOURCES = test_url_encode.c -test_url_encode_LDADD = ../src/lib/libpsensor.a +LIBS += ../src/lib/libpsensor.a \ + $(SENSORS_LIBS) -test_url_normalize_SOURCES = test_url_normalize.c -test_url_normalize_LDADD = ../src/lib/libpsensor.a +if ATASMART +LIBS += $(ATASMART_LIBS) +endif + +if GTOP +LIBS += $(GTOP_LIBS) +endif test_io_dir_list_SOURCES = test_io_dir_list.c -test_io_dir_list_LDADD = ../src/lib/libpsensor.a +test_psensor_type_to_unit_str_SOURCES = test_psensor_type_to_unit_str.c +test_psensor_value_to_str_SOURCES = test_psensor_value_to_str.c +test_url_encode_SOURCES = test_url_encode.c +test_url_normalize_SOURCES = test_url_normalize.c + +TESTS = test-io-dir-list.sh \ + test-psensor-type-to-unit-str \ + test-psensor-value-to-str \ + test-url-encode \ + test-url-normalize -TESTS = test-url-encode \ - test-url-normalize \ - test-io-dir-list.sh \ No newline at end of file +if CPPCHECK +TESTS += test-cppcheck.sh +endif \ No newline at end of file