]> granicus.if.org Git - json-c/commitdiff
Issue #113: add "new" files to appropriate variables in Makefile, and note the need...
authorEric Haszlakiewicz <erh+git@nimenees.com>
Mon, 27 Jun 2016 03:46:38 +0000 (03:46 +0000)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Mon, 27 Jun 2016 04:15:30 +0000 (04:15 +0000)
Fix issues with the test script so it works under distcheck too.

Makefile.am
RELEASE_CHECKLIST.txt
tests/Makefile.am
tests/test-defs.sh

index 3f19f42ad3c6664ecb95fb06c6d2d71cf4122359..9f6328f15cc361587ef5bb0c879f1a98a5bd2104 100644 (file)
@@ -13,8 +13,8 @@ libjson_cinclude_HEADERS = \
        bits.h \
        debug.h \
        json.h \
-       json_config.h \
        json_c_version.h \
+       json_config.h \
        json_inttypes.h \
        json_object.h \
        json_object_iterator.h \
@@ -22,14 +22,10 @@ libjson_cinclude_HEADERS = \
        json_tokener.h \
        json_util.h \
        linkhash.h \
+       math_compat.h \
        printbuf.h \
        random_seed.h
 
-#libjsonx_includedir = $(libdir)/json-c-@VERSION@
-#
-#libjsonx_include_HEADERS = \
-#      json_config.h
-
 libjson_c_la_LDFLAGS = -version-info 3:0:0 -no-undefined @JSON_BSYMBOLIC_LDFLAGS@
 
 libjson_c_la_SOURCES = \
index d71e40136369b62468aeada316d8acd1aca44774..307b95c8cb34d40c1b20fa7963f9afb0d686a03b 100644 (file)
@@ -8,6 +8,8 @@ cd json-c-${release}
 Check that the compile works on Linux
 Check that the compile works on NetBSD
 Check that the compile works on Windows
+Run "make distcheck" and fix any problems
+        (e.g. adding new files to SOURCES variables in Makefile.am)
 Check ChangeLog to see if anything should be added.
 Make any fixes/changes *before* branching.
 
index eb1364bf94b205fc69c0c012d723b35683c0a477..d33e22c06512bdf4028347d414c6521ea6fc891d 100644 (file)
@@ -1,4 +1,6 @@
 
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests
+
 LDADD= $(LIBJSON_LA)
 
 LIBJSON_LA=$(top_builddir)/libjson-c.la
@@ -23,21 +25,31 @@ TESTS+= test_compare.test
 check_PROGRAMS=
 check_PROGRAMS += $(TESTS:.test=)
 
+EXTRA_DIST=
+EXTRA_DIST += $(TESTS)
+EXTRA_DIST += $(TESTS:.test=.expected)
+EXTRA_DIST += test-defs.sh
+EXTRA_DIST += valid.json
+
+
 # Note: handled by test1.test
 check_PROGRAMS += test1Formatted
-test1Formatted_SOURCES = test1.c parse_flags.c
-test1Formatted_CPPFLAGS = -DTEST_FORMATTED
+test1Formatted_SOURCES = test1.c parse_flags.c parse_flags.h
+test1Formatted_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_FORMATTED
+EXTRA_DIST+= test1Formatted_plain.expected
+EXTRA_DIST+= test1Formatted_pretty.expected
+EXTRA_DIST+= test1Formatted_spaced.expected
 
 # Note: handled by test2.test
 check_PROGRAMS += test2Formatted
-test2Formatted_SOURCES = test2.c parse_flags.c
-test2Formatted_CPPFLAGS = -DTEST_FORMATTED
+test2Formatted_SOURCES = test2.c parse_flags.c parse_flags.h
+test2Formatted_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_FORMATTED
+EXTRA_DIST+= test2Formatted_plain.expected
+EXTRA_DIST+= test2Formatted_pretty.expected
+EXTRA_DIST+= test2Formatted_spaced.expected
 
 test_util_file_SOURCES = test_util_file.c strerror_override.c
 
-EXTRA_DIST=
-EXTRA_DIST += $(TESTS)
-
 testsubdir=testSubDir
 TESTS_ENVIRONMENT       = top_builddir=$(top_builddir)
 
index 658a75d9e489d6c5c82985987fbde4f968f3c979..028d99b1bc18a8d9bcd2a4266a372bc69ad4b8d2 100755 (executable)
@@ -114,10 +114,10 @@ run_output_test()
                fi
        fi
 
-       if ! "$CMP" -s "${top_builddir}/${TEST_OUTPUT}.expected" "${TEST_OUTPUT}.out" ; then
+       if ! "$CMP" -s "${srcdir}/${TEST_OUTPUT}.expected" "${TEST_OUTPUT}.out" ; then
                echo "ERROR: \"${TEST_COMMAND} $@\" (${TEST_OUTPUT}) failed (set VERBOSE=1 to see full output):" 1>&2
-               (cd "${CURDIR}" ; set -x ; diff "${top_builddir}/${TEST_OUTPUT}.expected" "$testsubdir/${TEST_OUTPUT}.out")
-               echo "cp \"$testsubdir/${TEST_OUTPUT}.out\" \"${top_builddir}/${TEST_OUTPUT}.expected\"" 1>&2
+               (cd "${CURDIR}" ; set -x ; diff "${srcdir}/${TEST_OUTPUT}.expected" "$testsubdir/${TEST_OUTPUT}.out")
+               echo "cp \"$testsubdir/${TEST_OUTPUT}.out\" \"${srcdir}/${TEST_OUTPUT}.expected\"" 1>&2
 
                err=1
        fi