From: Eric Haszlakiewicz Date: Sun, 22 Apr 2012 15:33:41 +0000 (-0500) Subject: Move the rest of the tests into the tests subdirectory. X-Git-Tag: json-c-0.10-20120530~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1b8891a133c64bd46dfee382a47045171e5cdcd;p=thirdparty%2Fjson-c.git Move the rest of the tests into the tests subdirectory. --- diff --git a/Makefile.am b/Makefile.am index cec14fd0..d4a7bbbe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,30 +39,6 @@ libjson_la_SOURCES = \ linkhash.c \ printbuf.c -check_PROGRAMS = test2 test4 test_parse_int64 test_null test_cast test_parse - -test2_SOURCES = test2.c -test2_LDADD = $(lib_LTLIBRARIES) - -test4_SOURCES = test4.c -test4_LDADD = $(lib_LTLIBRARIES) - -test_parse_int64_SOURCES = test_parse_int64.c -test_parse_int64_LDADD = $(lib_LTLIBRARIES) - -test_null_SOURCES = test_null.c -test_null_LDADD = $(lib_LTLIBRARIES) - -test_cast_SOURCES = test_cast.c -test_cast_LDADD = $(lib_LTLIBRARIES) - -test_parse_SOURCES = test_parse.c -test_parse_LDADD = $(lib_LTLIBRARIES) - -TESTS = test2.test test4.test parse_int64.test test_null.test test_cast.test test_parse.test -EXTRA_DIST += $(TESTS) -testsubdir=testSubDir -TESTS_ENVIRONMENT = top_builddir=$(top_builddir) distclean-local: -rm -rf $(testsubdir) diff --git a/tests/Makefile.am b/tests/Makefile.am index ed5d2a5d..d899c541 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,17 +1,25 @@ include ../Makefile.am.inc -#lib_LTLIBRARIES = ../libjson.la +lib_LTLIBRARIES = $(top_builddir)/libjson.la -#check_PROGRAMS = test1 test2 test4 test_parse_int64 test_null test_cast test_parse -check_PROGRAMS = test1 +check_PROGRAMS = test1 test2 test4 test_parse_int64 test_null test_cast test_parse -#test1_SOURCES = test1.c -#test1_LDADD = $(lib_LTLIBRARIES) -test1_LDADD = $(top_builddir)/libjson.la +test1_LDADD = $(lib_LTLIBRARIES) -#TESTS = test1.test test2.test test4.test parse_int64.test test_null.test test_cast.test test_parse.test -TESTS = test1.test +test2_LDADD = $(lib_LTLIBRARIES) + +test4_LDADD = $(lib_LTLIBRARIES) + +test_parse_int64_LDADD = $(lib_LTLIBRARIES) + +test_null_LDADD = $(lib_LTLIBRARIES) + +test_cast_LDADD = $(lib_LTLIBRARIES) + +test_parse_LDADD = $(lib_LTLIBRARIES) + +TESTS = test1.test test2.test test4.test parse_int64.test test_null.test test_cast.test test_parse.test EXTRA_DIST= EXTRA_DIST += $(TESTS) diff --git a/parse_int64.test b/tests/parse_int64.test similarity index 100% rename from parse_int64.test rename to tests/parse_int64.test diff --git a/test-defs.sh b/tests/test-defs.sh similarity index 98% rename from test-defs.sh rename to tests/test-defs.sh index 2014b37a..b9b0f60d 100755 --- a/test-defs.sh +++ b/tests/test-defs.sh @@ -1,5 +1,4 @@ - -#! /bin/sh +#!/bin/sh # Make sure srcdir is an absolute path. Supply the variable # if it does not exist. We want to be able to run the tests @@ -22,6 +21,8 @@ case "$top_builddir" in *) top_builddir=`\cd ${top_builddir-..} && pwd` ;; esac +top_builddir=${top_builddir}/tests + progname=`echo "$0" | sed 's,^.*/,,'` testname=`echo "$progname" | sed 's,-.*$,,'` testsubdir=${testsubdir-testSubDir} diff --git a/test2.c b/tests/test2.c similarity index 100% rename from test2.c rename to tests/test2.c diff --git a/test2.expected b/tests/test2.expected similarity index 100% rename from test2.expected rename to tests/test2.expected diff --git a/test2.test b/tests/test2.test similarity index 100% rename from test2.test rename to tests/test2.test diff --git a/test4.c b/tests/test4.c similarity index 100% rename from test4.c rename to tests/test4.c diff --git a/test4.expected b/tests/test4.expected similarity index 100% rename from test4.expected rename to tests/test4.expected diff --git a/test4.test b/tests/test4.test similarity index 100% rename from test4.test rename to tests/test4.test diff --git a/test_cast.c b/tests/test_cast.c similarity index 100% rename from test_cast.c rename to tests/test_cast.c diff --git a/test_cast.expected b/tests/test_cast.expected similarity index 100% rename from test_cast.expected rename to tests/test_cast.expected diff --git a/test_cast.test b/tests/test_cast.test similarity index 100% rename from test_cast.test rename to tests/test_cast.test diff --git a/test_null.c b/tests/test_null.c similarity index 100% rename from test_null.c rename to tests/test_null.c diff --git a/test_null.expected b/tests/test_null.expected similarity index 100% rename from test_null.expected rename to tests/test_null.expected diff --git a/test_null.test b/tests/test_null.test similarity index 100% rename from test_null.test rename to tests/test_null.test diff --git a/test_parse.c b/tests/test_parse.c similarity index 100% rename from test_parse.c rename to tests/test_parse.c diff --git a/test_parse.expected b/tests/test_parse.expected similarity index 100% rename from test_parse.expected rename to tests/test_parse.expected diff --git a/test_parse.test b/tests/test_parse.test similarity index 100% rename from test_parse.test rename to tests/test_parse.test diff --git a/test_parse_int64.c b/tests/test_parse_int64.c similarity index 100% rename from test_parse_int64.c rename to tests/test_parse_int64.c diff --git a/test_parse_int64.expected b/tests/test_parse_int64.expected similarity index 100% rename from test_parse_int64.expected rename to tests/test_parse_int64.expected