RE: [Mono-devel-list] xslttest patch

2005-06-06 Thread RafaelMizrahi
I cannot find 'should', either ;)
http://www.mono-project.com/Special:Search?search=shouldfulltext=Search

rafi
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew Skiba
Sent: Monday, June 06, 2005 9:37 AM
To: Atsushi Eno
Cc: mono-devel mailing list
Subject: Re: [Mono-devel-list] xslttest patch

Atsushi Eno wrote:
   The purpose of the patch is to make this suite as similar as
   possible to w3c suite.
 
 Please explain what it exactly means.

It accepts now the same files, like knownFailures, fixme, etc., as the 
W3C testsuite. The output is also unified with w3c. It's easier to use 
testsuites with similar input-output conventions. In addition, it fixes 
the bug with too many open files, and provides much more information 
about which testcases were fixed, which regressed, which tests took more 
time to perform, and the summary at the end, with number of testcases 
that passed, failed, regressed, etc. Again, all those things already 
present in W3C, now I added them to this testsuite, too. Just run the 
testcase before and after the patch, the difference is obvious. BTW, 
please use the patch I attached now, it fixes a typo.

 At least I will fix those messages (unless you fix by yourself)

The messages I just copied from w3c testsuite, as they are. So if you 
want to fix them, let's fix in both places.

 To understand why, I hope the link below would help you.
 
 http://www.mono-project.com/Special:Search?search=mustfulltext=Search

Do you mean that mono project never uses word must? Please, tell me 
how would you write those messages.

Regards,
Andrew.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-devel-list] xslttest patch

2005-06-06 Thread Atsushi Eno

To understand why, I hope the link below would help you.

http://www.mono-project.com/Special:Search?search=mustfulltext=Search


Do you mean that mono project never uses word must? Please, tell me 
how would you write those messages.



+ATTENTION!
+You must delete the fixed tests (those listed in fixed.lst) from
+knownFailures.lst or fixme.lst. If you don't do it, you can miss
+regressions in the future.);


We don't prefer must and I have no idea why anyone sticks to
must while it obviously sucks bugfixors.

Delete the fixed tests (those listed in fixed.lst) from
knownFailures.lst or fixme.lst, or we might miss regressions
in the future.
You can see similar messages in mcs (compiler) tests.

Atsushi Eno
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-devel-list] xslttest patch

2005-06-05 Thread Andrew Skiba

Hi.

Please review the attached patch for xslt standalone testsuite. The 
purpose of the patch is to make this suite as similar as possible to w3c 
suite.
Index: Makefile
===
--- Makefile(revision 45299)
+++ Makefile(working copy)
@@ -18,7 +18,7 @@
 FIXED_CATALOG = testsuite/TESTS/catalog-fixed.xml
 
 TEST_EXE = xslttest.exe
-TEST_FLAGS = --report:TestResult.xml --xml --details --outall $(TEST_DOM) 
+TEST_FLAGS = --report:TestResult.xml --xml --details $(TEST_DOM) 
 
 ifdef TEST_DOM
 REFERENCE_RESULTS_NAME = domresults
Index: xslttest.cs
===
--- xslttest.cs (revision 45299)
+++ xslttest.cs (working copy)
@@ -8,29 +8,87 @@
 
 namespace XsltTest
 {
-   public class XsltTest
+   public class XsltTest: IDisposable
{
-   #region static Vars
-   static bool noExclude;
-   static bool reportDetails;
-   static bool reportAsXml;
-   static bool useDomStyle;
-   static bool useDomInstance;
-   static bool generateOutput;
-   static string outputDir;
-   static bool whitespaceStyle;
-   static bool whitespaceInstance;
-   static bool stopImmediately;
-   static bool outputAll;
-   static readonly ArrayList skipTargets;
-   static readonly ArrayList knownFailures = new ArrayList (new 
string [] { });
-   static string explicitTarget;
-   static TextWriter reportOutput = Console.Out;
-   static XmlTextWriter reportXmlWriter;
-   static StreamWriter missingFiles = new StreamWriter 
(missing.lst);
-   static StreamWriter failedTests = new StreamWriter 
(failed.lst);
+   #region Options Vars
+   bool noExclude;
+   bool reportDetails;
+   bool reportAsXml;
+   bool useDomStyle;
+   bool useDomInstance;
+   bool generateOutput;
+   string outputDir;
+   bool whitespaceStyle;
+   bool whitespaceInstance;
+   bool stopImmediately;
+   bool outputOnlyErrors;
+   bool runSlow = false;
#endregion
 
+   #region statistics fields
+   int totalCount = 0;
+   int performedCount = 0;
+   int passedCount = 0;
+   int failedCount = 0;
+   int differentCount = 0;
+   int exceptionCount = 0;
+   int regressionsCount = 0; //failures not listed in 
knownFailures.lst
+   int fixedCount = 0; //tested known to fail that passed
+   #endregion
+
+   #region test list fields
+   ArrayList netExceptions = new ArrayList ();
+   ArrayList skipTargets = new ArrayList ();
+   ArrayList slowTests = new ArrayList ();
+   ArrayList knownFailures = new ArrayList ();
+   ArrayList fixmeList = new ArrayList ();
+   StreamWriter slowNewList;
+   StreamWriter missingFiles;
+   StreamWriter failedTests;
+   StreamWriter fixedTests;
+   StreamWriter netExceptionsWriter;
+   #endregion
+
+   #region IDisposable Members
+   public void Dispose() {
+   if (slowNewList != null)
+   slowNewList.Close();
+   if (missingFiles != null)
+   missingFiles.Close ();
+   if (failedTests != null)
+   failedTests.Close ();
+   if (fixedTests != null)
+   fixedTests.Close ();
+   if (netExceptionsWriter != null)
+   netExceptionsWriter.Close ();
+   slowNewList = null;
+   missingFiles = null;
+   failedTests = null;
+   fixedTests = null;
+   netExceptionsWriter = null;
+   }
+
+   #endregion
+
+   string explicitTarget;
+   TextWriter reportOutput = Console.Out;
+   XmlTextWriter reportXmlWriter;
+
+   #region ReadStrings ()
+   static void ReadStrings (ArrayList array, string filename) {
+   if (!File.Exists (filename))
+   return;
+
+   using (StreamReader reader = new StreamReader 
(filename)) {
+   foreach (string s_ in reader.ReadToEnd ().Split 
(\n.ToCharArray ())) {
+   string s = s_.Trim ();
+   if (s.Length  0)
+  

[Mono-devel-list] xslttest patch

2005-05-18 Thread Andrew Skiba
Fix Makefile a little bit: clean-xslttest had dependency on 
catalog-fixed.xml, then on catalog.xml which make did not know to build. 
Another fix is when generating reference results, check that we are 
running on windows, otherwise we can get to comparing mono results with 
mono results.
Index: Makefile
===
--- Makefile	(revision 44628)
+++ Makefile	(working copy)
@@ -11,7 +11,8 @@
 
 RUNTIME = mono --debug
 CSCOMPILE = mcs
-TESTS = testsuite/TESTS/Xalan_Conformance_Tests/whitespace/whitespace35.xsl
+CATALOG = testsuite/TESTS/catalog.xml
+FIXED_CATALOG = testsuite/TESTS/catalog-fixed.xml
 TARGET_RESULTS = Results
 MSTEST_RESULTS = testsuite/TESTS/ExpectedResults
 TEST_ARCHIVE = xslt-testsuite-03.ZIP
@@ -20,11 +21,11 @@
 
 test : xslttest.exe alltest.exe prepare
 
-prepare : $(TESTS) prepare-xslt prepare-mstest
+prepare : $(FIXED_CATALOG) prepare-xslt prepare-mstest
 
-prepare-xslt : xslttest.exe $(XSLTTEST_RESULTS) testsuite/TESTS/catalog-fixed.xml
+prepare-xslt : xslttest.exe $(XSLTTEST_RESULTS)
 
-prepare-mstest : alltest.exe $(MSTEST_RESULTS) testsuite/TESTS/catalog-fixed.xml
+prepare-mstest : alltest.exe $(MSTEST_RESULTS)
 
 xslttest.exe : xslttest.cs
 	$(CSCOMPILE) xslttest.cs
@@ -35,12 +36,12 @@
 alltest.exe : alltest.cs
 	$(CSCOMPILE) alltest.cs
 
-testsuite/TESTS/catalog-fixed.xml : testsuite/TESTS/catalog.xml catalog.sed
-	sed -f catalog.sed testsuite/TESTS/catalog.xml  testsuite/TESTS/catalog-fixed.xml
+$(FIXED_CATALOG) : $(CATALOG) catalog.sed
+	sed -f catalog.sed $(CATALOG)  $(FIXED_CATALOG)
 
-$(TESTS) : $(TEST_ARCHIVE)
+$(CATALOG) : $(TEST_ARCHIVE)
 	unzip -un $(TEST_ARCHIVE)
-	touch $(TESTS)
+	touch $(CATALOG)
 
 $(XSLTTEST_RESULTS) : $(XSLTTEST_RESULTS_ARCHIVE)
 	unzip -n -d $(XSLTTEST_RESULTS_ARCHIVE)
@@ -61,11 +62,11 @@
 
 run-test : run-test-xslt run-test-ms
 
-run-test-xslt : xslttest.exe testsuite/TESTS/catalog-fixed.xml
+run-test-xslt : xslttest.exe $(FIXED_CATALOG)
 	# Redirect stdout to /dev/null because it has only xsl:message garbage
 	$(RUNTIME) $(RUNTIME_FLAGS) xslttest.exe --report:TestResult.xml --xml --details --outall /dev/null
 
-run-test-ms : alltest.exe xmlnorm.exe testsuite/TESTS/catalog-fixed.xml
+run-test-ms : alltest.exe xmlnorm.exe $(FIXED_CATALOG)
 	$(RUNTIME) $(RUNTIME_FLAGS) ./alltest.exe $(TARGET_RESULTS)
 	mono ./xmlnorm.exe -s testsuite/TESTS/$(TARGET_RESULTS) testsuite/TESTS/norm-tmp
 	rm -rf testsuite/TESTS/$(TARGET_RESULTS)
@@ -75,7 +76,7 @@
 clean : clean-xslttest clean-mstest
 	rm -f xslttest.exe
 
-clean-xslttest : xslttest.exe
+clean-xslttest : xslttest.exe $(FIXED_CATALOG)
 	if (test -e testsuite) then \
 		$(RUNTIME) ./xslttest.exe --list  output.lst; \
 		perl cleanup-output.pl; \
@@ -92,7 +93,12 @@
 	rm -rf testsuite
 	rm -f $(TEST_ARCHIVE) $(XSLTTEST_RESULTS_ARCHIVE) $(MSTEST_RESULTS_ARCHIVE)
 
-create-reference-output : clean-xslttest xslttest.exe
+# Check that we are running on MS.NET - otherwise the reference output can be
+# created on mono - and we will compare mono with mono
+must-be-dotnet:
+	uname | grep CYGWIN
+	
+create-reference-output : must-be-dotnet clean-xslttest xslttest.exe
 	./xslttest.exe --generate
 	./xslttest.exe --list  output.lst
 	zip xslttest-reference-output.zip -@  output.lst
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-devel-list] xslttest patch

2005-05-18 Thread Andrew Skiba
Hi, Atsushi.
This is what I've got so far. I think I made all the changes we 
discussed, but have no time to run it today. It compiles, but I don't 
know more than that. So please see this patch as a draft, tomorrow I'll 
continue from this place. If you have any comments - let me know.

Thanks,
Andrew.
Index: Makefile
===
--- Makefile	(revision 44628)
+++ Makefile	(working copy)
@@ -1,99 +1,76 @@
 #
-# make prepares automated download and build for both existing xslttest
-# and MainSoft tests.
+# make prepares automated download and build for all tests.
 #
 # make run-test executes both existing xslttest and MainSoft's new test
 # and reports the total diff numbers:
 #
-#	- For xslttest, it is TestResult.xml and
-#	- For MainSoft test, it is diffreport.txt
+#	- For xslttest, it is TestResult.xml and the list of the failed tests
+#	is in failed.lst
 #
 
-RUNTIME = mono --debug
+.SUFFIXES: .cs .exe
+
+RUNTIME = mono
 CSCOMPILE = mcs
-TESTS = testsuite/TESTS/Xalan_Conformance_Tests/whitespace/whitespace35.xsl
-TARGET_RESULTS = Results
-MSTEST_RESULTS = testsuite/TESTS/ExpectedResults
+
 TEST_ARCHIVE = xslt-testsuite-03.ZIP
-XSLTTEST_RESULTS_ARCHIVE = xslttest-reference-output.zip
-MSTEST_RESULTS_ARCHIVE = mono-xslttest-ExpectedResults-20050214.zip
+CATALOG = testsuite/TESTS/catalog.xml
+FIXED_CATALOG = testsuite/TESTS/catalog-fixed.xml
 
-test : xslttest.exe alltest.exe prepare
+TEST_EXE = xslttest.exe
+TEST_FLAGS = --report:TestResult.xml --xml --details --outall $(TEST_DOM) 
 
-prepare : $(TESTS) prepare-xslt prepare-mstest
+ifdef TEST_DOM
+REFERENCE_RESULTS_NAME = domresults
+else
+REFERENCE_RESULTS_NAME = results
+endif
+REFERENCE_RESULTS_ARCHIVE = xslt-reference-$(REFERENCE_RESULTS_NAME).tar.gz
+REFERENCE_RESULTS_URL = http://svn.myrealbox.com/source/trunk/release/$(REFERENCE_RESULTS_ARCHIVE)
+REFERENCE_RESULTS = $(REFERENCE_RESULTS_NAME)/timestamp
 
-prepare-xslt : xslttest.exe $(XSLTTEST_RESULTS) testsuite/TESTS/catalog-fixed.xml
+test : $(TEST_EXE) $(FIXED_CATALOG) $(REFERENCE_RESULTS)
 
-prepare-mstest : alltest.exe $(MSTEST_RESULTS) testsuite/TESTS/catalog-fixed.xml
+run-test : $(TEST_EXE) $(FIXED_CATALOG)
+	# Redirect stdout to /dev/null because it has only xsl:message garbage
+	$(RUNTIME) $(RUNTIME_FLAGS) $(TEST_EXE) $(TEST_FLAGS) /dev/null
 
-xslttest.exe : xslttest.cs
-	$(CSCOMPILE) xslttest.cs
+clean :
+	rm -f TestResult.xml failed.lst missing.lst
+	rm -f $(TEST_EXE)
 
-xmlnorm.exe : XmlNormalizer.cs
-	$(CSCOMPILE) XmlNormalizer.cs -out:xmlnorm.exe
+# Be careful to use it!
+distclean : clean
+	rm -rf testsuite
+	rm -f $(TEST_ARCHIVE) $(REFERENCE_RESULTS_ARCHIVE) $(REFERENCE_LIST)
 
-alltest.exe : alltest.cs
-	$(CSCOMPILE) alltest.cs
+# Check that we are running on MS.NET - otherwise the reference output can be
+# created on mono - and we will compare mono with mono
+must-be-dotnet:
+	uname | grep CYGWIN
+	
+create-reference-output : must-be-dotnet $(TEST_EXE)
+	./$(TEST_EXE) $(TEST_DOM) --generate=$(REFERENCE_RESULTS_NAME)
+	tar -czf $(REFERENCE_RESULTS_ARCHIVE) $(REFERENCE_RESULTS_NAME)
+	echo Now you can upload $(REFERENCE_RESULTS_ARCHIVE) to $(REFERENCE_RESULTS_URL)
 
-testsuite/TESTS/catalog-fixed.xml : testsuite/TESTS/catalog.xml catalog.sed
-	sed -f catalog.sed testsuite/TESTS/catalog.xml  testsuite/TESTS/catalog-fixed.xml
+.cs.exe :
+	$(CSCOMPILE) $
 
-$(TESTS) : $(TEST_ARCHIVE)
+$(FIXED_CATALOG) : $(CATALOG) catalog.sed
+	sed -f catalog.sed $(CATALOG)  $(FIXED_CATALOG)
+
+$(CATALOG) : $(TEST_ARCHIVE)
 	unzip -un $(TEST_ARCHIVE)
-	touch $(TESTS)
+	touch $(CATALOG)
 
-$(XSLTTEST_RESULTS) : $(XSLTTEST_RESULTS_ARCHIVE)
-	unzip -n -d $(XSLTTEST_RESULTS_ARCHIVE)
-	touch $(XSLTTEST_RESULTS)
-
-$(MSTEST_RESULTS) : $(MSTEST_RESULTS_ARCHIVE)
-	unzip -n -d testsuite/TESTS $(MSTEST_RESULTS_ARCHIVE)
-	touch $(MSTEST_RESULTS)
-
 $(TEST_ARCHIVE) :
 	wget http://www.oasis-open.org/committees/download.php/9584/$(TEST_ARCHIVE)
 
-$(XSLTTEST_RESULTS_ARCHIVE) :
-	wget http://monkey.workarea.jp/mono/xml/$(XSLTTEST_RESULTS_ARCHIVE)
+$(REFERENCE_RESULTS) : $(REFERENCE_RESULTS_ARCHIVE)
+	tar -xzf $
+	touch $@
 
-$(MSTEST_RESULTS_ARCHIVE) :
-	wget http://monkey.workarea.jp/mono/xml/$(MSTEST_RESULTS_ARCHIVE)
+$(REFERENCE_RESULTS_ARCHIVE) :
+	wget $(REFERENCE_RESULTS_URL)
 
-run-test : run-test-xslt run-test-ms
-
-run-test-xslt : xslttest.exe testsuite/TESTS/catalog-fixed.xml
-	# Redirect stdout to /dev/null because it has only xsl:message garbage
-	$(RUNTIME) $(RUNTIME_FLAGS) xslttest.exe --report:TestResult.xml --xml --details --outall /dev/null
-
-run-test-ms : alltest.exe xmlnorm.exe testsuite/TESTS/catalog-fixed.xml
-	$(RUNTIME) $(RUNTIME_FLAGS) ./alltest.exe $(TARGET_RESULTS)
-	mono ./xmlnorm.exe -s testsuite/TESTS/$(TARGET_RESULTS) testsuite/TESTS/norm-tmp
-	rm -rf testsuite/TESTS/$(TARGET_RESULTS)
-	mv testsuite/TESTS/norm-tmp testsuite/TESTS/$(TARGET_RESULTS)
-	diff -r -q testsuite/TESTS/ExpectedResults testsuite/TESTS/$(TARGET_RESULTS)