Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #
  2. # "make" prepares automated download and build for both existing xslttest
  3. # and MainSoft tests.
  4. #
  5. # "make run-test" executes both existing xslttest and MainSoft's new test
  6. # and reports the total diff numbers:
  7. #
  8. # - For xslttest, it is "TestResult.xml" and
  9. # - For MainSoft test, it is "diffreport.txt"
  10. #
  11. RUNTIME = mono
  12. CSCOMPILE = mcs
  13. TESTS = testsuite/TESTS/Xalan_Conformance_Tests/whitespace/whitespace35.xsl
  14. TARGET_RESULTS = Results
  15. MSTEST_RESULTS = testsuite/TESTS/ExpectedResults
  16. TEST_ARCHIVE = xslt-testsuite-03.ZIP
  17. XSLTTEST_RESULTS_ARCHIVE = xslttest-reference-output.zip
  18. MSTEST_RESULTS_ARCHIVE = mono-xslttest-ExpectedResults-20050214.zip
  19. test : xslttest.exe alltest.exe prepare
  20. prepare : $(TESTS) prepare-xslt prepare-mstest
  21. prepare-xslt : xslttest.exe $(XSLTTEST_RESULTS)
  22. prepare-mstest : alltest.exe $(MSTEST_RESULTS)
  23. xslttest.exe : xslttest.cs
  24. $(CSCOMPILE) xslttest.cs
  25. xmlnorm.exe : XmlNormalizer.cs
  26. $(CSCOMPILE) XmlNormalizer.cs -out:xmlnorm.exe
  27. alltest.exe : alltest.cs
  28. $(CSCOMPILE) alltest.cs
  29. # WARNING: It removes catalog.xml. If you want to keep catalog.xml, comment
  30. # "rm" and "patch" lines out.
  31. $(TESTS) : $(TEST_ARCHIVE) simplify.xsl
  32. rm -f testsuite/TESTS/catalog.xml
  33. unzip -n $(TEST_ARCHIVE)
  34. patch testsuite/TESTS/catalog.xml catalog.diff
  35. xsltproc simplify.xsl testsuite/TESTS/catalog.xml > testsuite/TESTS/catalog-out.xml
  36. $(XSLTTEST_RESULTS) : $(XSLTTEST_RESULTS_ARCHIVE)
  37. unzip -n -d $(XSLTTEST_RESULTS_ARCHIVE)
  38. $(MSTEST_RESULTS) : $(MSTEST_RESULTS_ARCHIVE)
  39. unzip -n -d testsuite/TESTS $(MSTEST_RESULTS_ARCHIVE)
  40. $(TEST_ARCHIVE) :
  41. wget http://www.oasis-open.org/committees/download.php/9584/$(TEST_ARCHIVE)
  42. $(XSLTTEST_RESULTS_ARCHIVE) :
  43. wget http://monkey.workarea.jp/mono/xml/$(XSLTTEST_RESULTS_ARCHIVE)
  44. $(MSTEST_RESULTS_ARCHIVE) :
  45. wget http://monkey.workarea.jp/mono/xml/$(MSTEST_RESULTS_ARCHIVE)
  46. run-test : run-test-xslt run-test-ms
  47. run-test-xslt : xslttest.exe
  48. $(RUNTIME) xslttest.exe --report:TestResult.xml --xml --details --outall
  49. run-test-ms : alltest.exe xmlnorm.exe
  50. $(RUNTIME) ./alltest.exe $(TARGET_RESULTS)
  51. $(RUNTIME) ./xmlnorm.exe -s testsuite/TESTS/$(TARGET_RESULTS) testsuite/TESTS/norm-tmp
  52. rm -rf testsuite/TESTS/$(TARGET_RESULTS)
  53. mv testsuite/TESTS/norm-tmp testsuite/TESTS/$(TARGET_RESULTS)
  54. diff -r -q testsuite/TESTS/ExpectedResults testsuite/TESTS/$(TARGET_RESULTS) > diffreport.txt
  55. clean : clean-xslttest clean-mstest
  56. clean-xslttest :
  57. if (test -e testsuite) then \
  58. find testsuite/TESTS -name *.out > output.lst; \
  59. perl cleanup-output.pl; \
  60. fi
  61. rm -f xslttest.exe TestResult.xml output.lst
  62. clean-mstest :
  63. rm -rf testsuite/TESTS/Reports
  64. rm -f diffreport.txt alltest.exe xmlnorm.exe
  65. # Be careful to use it!
  66. distclean :
  67. make clean
  68. rm -rf testsuite
  69. rm -f $(TEST_ARCHIVE) $(XSLTTEST_RESULTS_ARCHIVE) $(MSTEST_RESULTS_ARCHIVE)
  70. create-reference-output : clean-xslttest xslttest.exe
  71. ./xslttest.exe --generate
  72. find testsuite/TESTS -name *.out > output.lst
  73. zip xslttest-reference-output.zip -@ < output.lst