components/libxslt/patches/srcdir-tests.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Wed, 19 Dec 2012 02:21:27 -0800
branchs11-update
changeset 2451 f54396da08ea
permissions -rw-r--r--
15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27 15807903 problem in LIBRARY/LIBXSLT
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2451
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     1
Allows to produce clean test run even when XSLT is configured outside of
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     2
source directory.
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     3
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     4
--- libxslt-1.1.27/tests/plugins/Makefile.am	Tue Sep  4 07:26:23 2012
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     5
+++ libxslt-1.1.27/tests/plugins/Makefile.am	Thu Oct 11 06:25:06 2012
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     6
@@ -29,8 +29,8 @@
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     7
 test tests: $(top_builddir)/xsltproc/xsltproc test-logall $(noinst_LTLIBRARIES)
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     8
 	@LD_LIBRARY_PATH=$(plugindir):$(top_builddir)/libxslt/.libs:$(LD_LIBRARY_PATH) \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     9
 	 LIBXSLT_PLUGINS_PATH=$(plugindir) \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    10
-	 $(top_builddir)/xsltproc/xsltproc plugin.xsl plugin.xml > plugin.res
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    11
-	@diff plugin.out plugin.res
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    12
+	 $(top_builddir)/xsltproc/xsltproc $(srcdir)/plugin.xsl $(srcdir)/plugin.xml > plugin.res
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    13
+	@diff $(srcdir)/plugin.out plugin.res
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    14
 	@rm plugin.res
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    15
 
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    16
 else
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    17
--- libxslt-1.1.27/tests/documents/Makefile.am	Tue Sep  4 07:26:23 2012
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    18
+++ libxslt-1.1.27/tests/documents/Makefile.am	Thu Oct 11 06:54:44 2012
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    19
@@ -27,6 +27,7 @@
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    20
 	grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" || true;\
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    21
 	rm -f result)
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    22
 	@($(CHECKER) $(top_builddir)/xsltproc/xsltproc $(srcdir)/test.xsl $(srcdir)/test_bad.xml > result 2>err ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    23
+	sed 's|$(srcdir)/||' err > err.tmp; mv err.tmp err; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    24
 	diff $(srcdir)/test_bad.result result; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    25
 	diff $(srcdir)/test_bad.err err; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    26
 	grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" || true;\
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    27
--- libxslt-1.1.27/tests/general/Makefile.am	Fri Sep  7 00:49:41 2012
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    28
+++ libxslt-1.1.27/tests/general/Makefile.am	Mon Oct 15 02:41:07 2012
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    29
@@ -207,10 +207,11 @@
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    30
 	  if [ ! -f $$j ] ; then continue ; fi ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    31
 	  if [ -d $$j ] ; then continue ; fi ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    32
 	  name=`basename $$j .xsl`; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    33
+	  real_docs_path=`cd $(srcdir)/../docs && pwd`; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    34
 	  out=$(srcdir)/"$$name".out; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    35
 	  err=$(srcdir)/"$$name".err; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    36
 	  log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc $$j $$i \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    37
-	  	> result.$$name 2>err.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    38
+	  	2>&1 > result.$$name | sed 's|$(srcdir)|.|' >err.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    39
 	  if [ ! -f $$out ] ; then \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    40
 	  	cp result.$$name $$out ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    41
 		if [ -s err.$$name ] ; then \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    42
@@ -217,6 +218,9 @@
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    43
 			cp err.$$name $$err ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    44
 		fi ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    45
 	  else \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    46
+		grep '../docs/' $$out >/dev/null && \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    47
+		  sed "s|$$real_docs_path|../docs|" result.$$name > \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    48
+		  result.$$name.tmp && mv result.$$name.tmp result.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    49
 	  	diff $$out result.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    50
 		if [ -s $$err ] ; then \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    51
 	  		diff $$err err.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    52
@@ -239,10 +243,11 @@
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    53
 	  if [ ! -f $$j ] ; then continue ; fi ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    54
 	  if [ -d $$j ] ; then continue ; fi ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    55
 	  name=`basename $$j .xsl`; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    56
+	  real_docs_path=`cd $(srcdir)/../docs && pwd`; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    57
 	  out=$(srcdir)/"$$name".out; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    58
 	  err=$(srcdir)/"$$name".err; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    59
 	  log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc --nodict $$j $$i \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    60
-	  	> result.$$name 2>err.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    61
+	  	2>&1 > result.$$name | sed 's|$(srcdir)|.|' >err.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    62
 	  if [ ! -f $$out ] ; then \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    63
 	  	cp result.$$name $$out ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    64
 		if [ -s err.$$name ] ; then \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    65
@@ -249,6 +254,9 @@
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    66
 			cp err.$$name $$err ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    67
 		fi ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    68
 	  else \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    69
+		grep '../docs/' $$out >/dev/null && \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    70
+		  sed "s|$$real_docs_path|../docs|" result.$$name > \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    71
+		  result.$$name.tmp && mv result.$$name.tmp result.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    72
 	  	diff $$out result.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    73
 		if [ -s $$err ] ; then \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    74
 	  		diff $$err err.$$name; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    75
--- libxslt-1.1.27/tests/REC/Makefile.am	Fri Sep  7 00:49:41 2012
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    76
+++ libxslt-1.1.27/tests/REC/Makefile.am	Thu Oct 11 08:04:48 2012
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    77
@@ -96,7 +96,7 @@
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    78
 	  fi ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    79
 	  log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    80
 	  	$(srcdir)/$$name.xsl $(srcdir)/$$name.xml \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    81
-	  	> $$name.res 2>$$name.bad ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    82
+	  	2>&1 > $$name.res | sed 's|$(srcdir)|.|' >$$name.bad ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    83
 	  if [ ! -f $(srcdir)/$$name.out ] ; then \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    84
 	  	cp $$name.res $(srcdir)/$$name.out ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    85
 		if [ -s $$name.bad ] ; then \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    86
@@ -158,7 +158,7 @@
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    87
 	  fi ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    88
 	  log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc --nodict \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    89
 	  	$(srcdir)/$$name.xsl $(srcdir)/$$name.xml \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    90
-	  	> $$name.res 2>$$name.bad ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    91
+	  	2>&1 > $$name.res | sed 's|$(srcdir)|.|' >$$name.bad ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    92
 	  if [ ! -f $(srcdir)/$$name.out ] ; then \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    93
 	  	cp $$name.res $(srcdir)/$$name.out ; \
f54396da08ea 15822371 SUNBT7204409 Upgrade libxslt to version 1.1.27
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    94
 		if [ -s $$name.bad ] ; then \