diff --git a/configure.ac b/configure.ac index b3f97ba2..a9400a45 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,16 @@ AM_MAINTAINER_MODE([enable]) AM_SILENT_RULES([yes]) +dnl By default, the tar command used by 'make dist and make distcheck' +dnl is "tar --format=ustar -chf" where the "-h" option actually +dnl follows symbolic links. So it copies the targets of the symlinks +dnl that are present in the tarball. Unfortunately, there are +dnl tests that need to keep the symlinks intact in the tarball. +dnl +dnl So let's define a tar command without the -h option. + +am__tar='tar --format=ustar -cf - "$$tardir"' + VERSION_MAJOR=version_major VERSION_MINOR=version_minor VERSION_REVISION=0 @@ -518,6 +528,13 @@ fi AM_CONDITIONAL(ENABLE_RPM, test x$ENABLE_RPM = xyes) +dnl There is a test that needs symlinks support in the distribution tarball. If symlinks are +dnl removed from the tarball, then the test should be disabled. +m4_define([symlink_file], [tests/data/test-diff-pkg/symlink-dir-test1/dir1/symlinks/foo.o]) +if test -L "$srcdir"/symlink_file; then + AC_DEFINE([WITH_SYMLINKS_KEPT_IN_DIST], 1, [symbolic links are kept in the distribution tarball]) +fi + dnl enable the debugging of self comparison when doing abidw --debug-abidiff if test x$ENABLE_DEBUG_SELF_COMPARISON = xyes; then AC_DEFINE([WITH_DEBUG_SELF_COMPARISON], 1, [compile support of debugging abidw --abidiff]) diff --git a/tests/test-diff-pkg.cc b/tests/test-diff-pkg.cc index fbfa50d3..020a1f30 100644 --- a/tests/test-diff-pkg.cc +++ b/tests/test-diff-pkg.cc @@ -150,8 +150,8 @@ static InOutSpec in_out_specs[] = "output/test-diff-pkg/dirpkg-3-report-2.txt" }, { - "data/test-diff-pkg/symlink-dir-test1/dir1", - "data/test-diff-pkg/symlink-dir-test1/dir2", + "data/test-diff-pkg/symlink-dir-test1/dir1/targets", + "data/test-diff-pkg/symlink-dir-test1/dir2/targets", "--no-default-suppression ", "", "", @@ -161,6 +161,7 @@ static InOutSpec in_out_specs[] = "data/test-diff-pkg/symlink-dir-test1-report0.txt", "output/test-diff-pkg/symlink-dir-test1-report0.txt" }, +#ifdef WITH_SYMLINKS_KEPT_IN_DIST { "data/test-diff-pkg/symlink-dir-test1/dir1/symlinks", "data/test-diff-pkg/symlink-dir-test1/dir2/symlinks", @@ -173,6 +174,7 @@ static InOutSpec in_out_specs[] = "data/test-diff-pkg/symlink-dir-test1-report1.txt", "output/test-diff-pkg/symlink-dir-test1-report1.txt" }, +#endif #if WITH_TAR { "data/test-diff-pkg/tarpkg-0-dir1.tar", @@ -877,8 +879,8 @@ static InOutSpec in_out_specs[] = "output/test-diff-pkg-ctf/dirpkg-3-report-2.txt" }, { - "data/test-diff-pkg-ctf/symlink-dir-test1/dir1", - "data/test-diff-pkg-ctf/symlink-dir-test1/dir2", + "data/test-diff-pkg-ctf/symlink-dir-test1/dir1/targets", + "data/test-diff-pkg-ctf/symlink-dir-test1/dir2/targets", "--ctf --no-default-suppression ", "", "", @@ -888,6 +890,7 @@ static InOutSpec in_out_specs[] = "data/test-diff-pkg-ctf/symlink-dir-test1-report0.txt", "output/test-diff-pkg-ctf/symlink-dir-test1-report0.txt" }, +#ifdef WITH_SYMLINKS_KEPT_IN_DIST { "data/test-diff-pkg-ctf/symlink-dir-test1/dir1/symlinks", "data/test-diff-pkg-ctf/symlink-dir-test1/dir2/symlinks", @@ -900,6 +903,7 @@ static InOutSpec in_out_specs[] = "data/test-diff-pkg-ctf/symlink-dir-test1-report1.txt", "output/test-diff-pkg-ctf/symlink-dir-test1-report1.txt" }, +#endif #if WITH_TAR { "data/test-diff-pkg-ctf/tarpkg-0-dir1.tar",