From: Damir Tomic Date: Wed, 27 May 2015 08:38:25 +0000 (+0000) Subject: modified makefile to work with multiple tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19b893454f2fe8410e21245c8f3e85d888c931ee;p=thirdparty%2Fntp.git modified makefile to work with multiple tests bk: 55658281XTSvJEXlJ-6LXZvH1hvTFg --- diff --git a/tests/libntp/Makefile.am b/tests/libntp/Makefile.am index 2c9bd6fe9..97b9b9fb4 100644 --- a/tests/libntp/Makefile.am +++ b/tests/libntp/Makefile.am @@ -4,7 +4,8 @@ CLEANFILES = run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb -check_PROGRAMS = test-libntp +#removed test-libntp +check_PROGRAMS = test-modetoa test-uglydate if GTEST_AVAILABLE check_PROGRAMS += tests else @@ -83,18 +84,38 @@ noinst_HEADERS = \ timestructs.h \ $(NULL) -$(srcdir)/run-test-libntp.c: $(srcdir)/test-libntp.c $(std_unity_list) - $(run_unity) test-libntp.c run-test-libntp.c +#$(srcdir)/run-test-libntp.c: $(srcdir)/test-libntp.c $(std_unity_list) +# $(run_unity) test-libntp.c run-test-libntp.c -test_libntp_CFLAGS = \ +#test_libntp_CFLAGS = \ +# -I$(top_srcdir)/sntp/unity \ +# $(NULL) + +#test_libntp_LDADD = \ +# $(LDADD) \ +# $(top_builddir)/sntp/unity/libunity.a \ +# $(NULL) + +test_modetoa_CFLAGS = \ + -I$(top_srcdir)/sntp/unity \ + $(NULL) + + +test_modetoa_LDADD = \ + $(LDADD) \ + $(top_builddir)/sntp/unity/libunity.a \ + $(NULL) + +test_uglydate_CFLAGS = \ -I$(top_srcdir)/sntp/unity \ $(NULL) -test_libntp_LDADD = \ +test_uglydate_LDADD = \ $(LDADD) \ $(top_builddir)/sntp/unity/libunity.a \ $(NULL) +#removed one combined test, because unity devs suggested we use one program per test test_libntp_SOURCES = \ modetoa.c \ uglydate.c \ @@ -103,6 +124,24 @@ test_libntp_SOURCES = \ run-test-libntp.c \ $(NULL) +test_modetoa_SOURCES = \ + modetoa.c \ + run-test-modetoa.c \ + $(NULL) + +test_uglydate_SOURCES = \ + uglydate.c \ + run-test-uglydate.c \ + $(NULL) + +$(srcdir)/run-test-modetoa.c: $(srcdir)/modetoa.c $(std_unity_list) + $(run_unity) modetoa.c run-test-modetoa.c + +$(srcdir)/run-test-uglydate.c: $(srcdir)/uglydate.c $(std_unity_list) + $(run_unity) uglydate.c run-test-uglydate.c + + + TESTS = if !NTP_CROSSCOMPILE