* Makefile (TEST_HARNESS_EXTRAS): New. List of files that need to
authorRaja R Harinath <harinath@hurrynot.org>
Tue, 7 Dec 2004 11:30:27 +0000 (11:30 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Tue, 7 Dec 2004 11:30:27 +0000 (11:30 -0000)
be copied to the test harness directory.
(test-harness-run): Use it.
* xml-025.cs, xml-025-ref.xml: Don't use ../ to refer to xml-025.inc.

svn path=/trunk/mcs/; revision=37310

mcs/tests/ChangeLog
mcs/tests/Makefile
mcs/tests/xml-025-ref.xml
mcs/tests/xml-025.cs

index 32f5944dc508c49e0789401b89a0e8f027ac4a57..0a099a50d905740084f26c7b27128245cd65e1a5 100644 (file)
@@ -1,3 +1,10 @@
+2004-12-07  Raja R Harinath  <rharinath@novell.com>
+
+       * Makefile (TEST_HARNESS_EXTRAS): New.  List of files that need to
+       be copied to the test harness directory.
+       (test-harness-run): Use it.
+       * xml-025.cs, xml-025-ref.xml: Don't use ../ to refer to xml-025.inc.
+
 2004-12-07  Raja R Harinath  <rharinath@novell.com>
 
        * Makefile (DISTFILES): Distribute *.inc files too.
index 53bbc05d4e6e384bda2ad09a3f48d64fdac0b6bf..f44676751f3ef059b5ba2fc4e9ce885d6ca0f6aa 100644 (file)
@@ -131,6 +131,11 @@ TEST_ORDERING = \
        pu-pi:pi pu-pi:pp \
        pu-ip:pi pu-ip:pp
 
+# Some tests may require additional files to be available in the current directory.
+# To promote interoperability, we prefer that those files not be referred to with ../ or ..\\
+# To that end, we will copy those files to the test-harness directory, so that we can refer to simple filenames.
+TEST_HARNESS_EXTRAS = $(wildcard *.inc)
+
 all-local install-local uninstall-local:
 
 # casts
@@ -199,6 +204,7 @@ test-harness-run:
        @sed 's,@thisdir@,$(thisdir)/dir-$(TEST_TAG),' harness.mk > dir-$(TEST_TAG)/Makefile
        @test -z '$(exe_tests)' || for i in ''$(exe_tests); do echo $$i | sed 's,\(.*\)-exe$$,\1-exe.res: \1-dll.res,' >> dir-$(TEST_TAG)/Makefile; done
        @test -z '$(TEST_ORDERING)' || for i in ''$(TEST_ORDERING); do echo $$i.res | sed 's,:,.res: ,' >> dir-$(TEST_TAG)/Makefile; done
+       @test -z '$(TEST_HARNESS_EXTRAS)' || cp -p $(TEST_HARNESS_EXTRAS) dir-$(TEST_TAG)/
        @echo 'Running $(TEST_TAG) tests with flags "$(TEST_RUNTIME)" ... '
        @if test -z '$(TEST_SOURCES)'; then :; else \
          cd dir-$(TEST_TAG) ; \
@@ -220,7 +226,7 @@ ilasm:
 TEST_SOURCES_XML = \
        xml-001 xml-002 xml-003 xml-004 xml-005 xml-006 xml-007 xml-008 xml-009 xml-010 \
        xml-011 xml-012 xml-013 xml-014 xml-015 xml-016 xml-017 xml-018 xml-019 xml-020 \
-       xml-021 xml-022 xml-023 xml-024 xml-025 xml-026 xml-028 xml-029 xml-030 \
+       xml-021 xml-022 xml-023 xml-024 xml-025 xml-026         xml-028 xml-029 xml-030 \
        xml-031 xml-032
 
 # currently no formalization on 'cref' attribute was found, so there are some
index 01a014927d214056161b0ffe43923cca5c664917..446c164e980dbb720b75a3957e742f3d100c0400 100644 (file)
@@ -5,7 +5,7 @@
     </assembly>\r
     <members>\r
         <member name="T:Testing.Test">\r
-            <!-- No matching elements were found for the following include tag --><include file="../xml-025.inc" path="/foo"/>\r
+            <!-- No matching elements were found for the following include tag --><include file="xml-025.inc" path="/foo"/>\r
         </member>\r
         <member name="F:Testing.Test.S1">\r
             <root attr="is attribute allowed?">\r
index bd3341a246499ef0f6ffaf51c6349da3a0e48694..92aadac02899d2e925a4ba6e6dd0d60442a12c7c 100644 (file)
@@ -1,23 +1,21 @@
 // Compiler options: -doc:xml-025.xml
-// Note that it could not be compiled to generate reference output as it is.
-// csc needs '\\' instead of '/' for file specification.
 
 namespace Testing
 {
-   /// <include file='../xml-025.inc' path='/foo' />
+   /// <include file='xml-025.inc' path='/foo' />
    public class Test
    {
        public static void Main ()
        {
        }
 
-       /// <include file='../xml-025.inc' path='/root'/>
+       /// <include file='xml-025.inc' path='/root'/>
        public string S1;
 
-       /// <include file='../xml-025.inc' path='/root/child'/>
+       /// <include file='xml-025.inc' path='/root/child'/>
        public string S2;
 
-       /// <include file='../xml-025.inc' path='/root/@attr'/>
+       /// <include file='xml-025.inc' path='/root/@attr'/>
        public string S3;
    }
 }