Merge pull request #409 from Alkarex/patch-1
[mono.git] / mcs / class / System.Web / Makefile
index e99dd9c5046024c4bd2a230a01740073a743ded5..e40d43187ad277c5da6b902e3c1339b9f3861207 100644 (file)
@@ -68,12 +68,33 @@ RESOURCE_FILES_2 = \
        resources/transparent.gif \
        resources/webform.js \
        resources/WebUIValidation_2.0.js \
+       resources/ErrorTemplateCommon_Top.html \
+       resources/DefaultErrorTemplate_CustomErrorDefault.html \
+       resources/ErrorTemplateCommon_Bottom.html \
+       resources/DefaultErrorTemplate_StandardPage.html \
+       resources/HtmlizedExceptionPage_Top.html \
+       resources/HtmlizedExceptionPage_FileLongSource.html \
+       resources/HtmlizedExceptionPage_FileShortSource.html \
+       resources/HtmlizedExceptionPage_CompilerOutput.html \
        System.Web.UI.WebControls/GridView.js \
        System.Web.UI.WebControls/DetailsView.js \
        System.Web.UI.WebControls/TreeView.js \
        System.Web.UI.WebControls/Menu.js
 
+RESOURCE_FILES_4 = \
+       System.Web.UI.WebControls/MenuModern.js
+
 OTHER_RES = $(RESOURCE_FILES_1)
+TEST_APP_CODE_FILES = \
+       Test/mainsoft/NunitWebResources/App_Code/EnumConverterControl.cs \
+       Test/mainsoft/NunitWebResources/App_Code/MyContainer.cs \
+       Test/mainsoft/NunitWebResources/App_Code/CustomCheckBoxColumn.cs
+
+TEST_APP_GLOBALRESOURCES_FILES = \
+       Test/mainsoft/NunitWebResources/App_GlobalResources/Common.resx \
+       Test/mainsoft/NunitWebResources/App_GlobalResources/Common.fr-FR.resx \
+       Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx
+
 TEST_RESOURCE_FILES = \
        Test/mainsoft/NunitWeb/NunitWeb/Resources/Global.asax \
        Test/mainsoft/NunitWeb/NunitWeb/Resources/My.ashx \
@@ -82,7 +103,7 @@ TEST_RESOURCE_FILES = \
        Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs \
        Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPageWithMaster.aspx \
        Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config \
-       Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.1.1 \
+       Test/mainsoft/NunitWeb/NunitWeb/Resources/Web.mono.config.4.0 \
        Test/mainsoft/NunitWeb/NunitWeb/Resources/sub_map_01.sitemap \
        Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_01.sitemap \
        Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_02.sitemap \
@@ -113,10 +134,15 @@ TEST_RESOURCE_FILES = \
        Test/mainsoft/NunitWebResources/FooterTemplateTest.aspx \
        Test/mainsoft/NunitWebResources/DataGrid.aspx \
        Test/mainsoft/NunitWebResources/DetailsViewTemplates.aspx \
+       Test/mainsoft/NunitWebResources/DetailsViewTemplates_2.aspx \
+       Test/mainsoft/NunitWebResources/DetailsViewTemplates_3.aspx \
        Test/mainsoft/NunitWebResources/DetailsViewDataActions.aspx \
        Test/mainsoft/NunitWebResources/DetailsViewProperties1.aspx \
        Test/mainsoft/NunitWebResources/Bluehills.jpg \
        Test/mainsoft/NunitWebResources/FormViewTest1.aspx \
+       Test/mainsoft/NunitWebResources/FormViewTest1_2.aspx \
+       Test/mainsoft/NunitWebResources/FormViewTest1_3.aspx \
+       Test/mainsoft/NunitWebResources/FormViewTest1_4.aspx \
        Test/mainsoft/NunitWebResources/FormViewInsertEditDelete.aspx \
        Test/mainsoft/NunitWebResources/GridViewUpdate.aspx \
        Test/mainsoft/NunitWebResources/XMLDataSourceTest.xml \
@@ -188,7 +214,36 @@ TEST_RESOURCE_FILES = \
        Test/mainsoft/NunitWebResources/DuplicateControlsInClientComment.aspx \
        Test/mainsoft/NunitWebResources/TagsNestedInClientTag.aspx \
        Test/mainsoft/NunitWebResources/ConditionalClientComments.aspx \
-       Test/mainsoft/NunitWebResources/OneLetterIdentifierInCodeRender.aspx
+       Test/mainsoft/NunitWebResources/OneLetterIdentifierInCodeRender.aspx \
+       Test/mainsoft/NunitWebResources/GlobalResourcesLocalization.aspx \
+       Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx \
+       Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx.cs \
+       Test/mainsoft/NunitWebResources/NestedParserFileText.aspx \
+       Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx \
+       Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx \
+       Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs \
+       Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx \
+       Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_1.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxList_Bug377703_2.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxList_Bug578770.aspx \
+       Test/mainsoft/NunitWebResources/EnumConverter_Bug578586.aspx \
+       Test/mainsoft/NunitWebResources/ButtonColor_Bug325489.aspx \
+       Test/mainsoft/NunitWebResources/SqlDataSource_OnInit_Bug572781.aspx \
+       Test/mainsoft/NunitWebResources/FormViewPagerVisibility.aspx \
+       Test/mainsoft/NunitWebResources/OverridenControlsPropertyAndPostBack_Bug594238.aspx \
+       Test/mainsoft/NunitWebResources/GlobalizationEncodingName.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_0.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_1.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_2.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_5.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_6.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxField_Bug595568_7.aspx \
+       Test/mainsoft/NunitWebResources/GridView_Bug595567.aspx \
+       Test/mainsoft/NunitWebResources/CheckBoxList_Bug600415.aspx \
+       Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx \
+       Test/mainsoft/NunitWebResources/BoundField_Bug646505.aspx.cs \
+       Test/mainsoft/NunitWebResources/HtmlTitleCodeRender_Bug662918.aspx
 
 RESX_DIST =  resources/TranslationResources.resx
 ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
@@ -196,11 +251,19 @@ RESX_RES = $(RESX_DIST:.resx=.resources)
 endif
 
 NUNIT_RESOURCE_FILES = $(TEST_RESOURCE_FILES)
+NUNIT_APP_CODE_FILES = $(TEST_APP_CODE_FILES)
+NUNIT_APP_GLOBALRESOURCES_FILES = $(TEST_APP_GLOBALRESOURCES_FILES)
+
 ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
 OTHER_RES += $(RESOURCE_FILES_2)
 OTHER_LIB_MCS_FLAGS = -d:INSIDE_SYSTEM_WEB -nowarn:618 -r:System.Configuration.dll -r:Mono.Data.Sqlite.dll
 endif
 
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+OTHER_LIB_MCS_FLAGS += -r:System.Web.ApplicationServices.dll
+OTHER_RES += $(RESOURCE_FILES_4)
+endif
+
 LIB_MCS_FLAGS = \
        -unsafe \
        -nowarn:612,618 \
@@ -210,6 +273,7 @@ LIB_MCS_FLAGS = \
        -r:System.Data.dll              \
        -r:System.Xml.dll               \
        -r:System.EnterpriseServices.dll \
+       -r:System.Runtime.Serialization.Formatters.Soap \
        $(OTHER_LIB_MCS_FLAGS) \
        $(RESX_RES:%=/resource:%) \
        $(OTHER_RES:%=/resource:%)
@@ -233,13 +297,34 @@ echo-warning-systemcore:
 endif
 endif
 
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -doc:$(test_lib:.dll=.xml) -nowarn:219,169,1591 $(NUNIT_RESOURCE_FILES:%=/resource:%) -r:SystemWebTestShim.dll
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -doc:$(test_lib:.dll=.xml) -nowarn:219,169,1591 -r:SystemWebTestShim.dll \
+       $(NUNIT_RESOURCE_FILES:%=/resource:%) \
+       $(foreach file,$(NUNIT_APP_CODE_FILES),$(shell echo $(file) | sed -e 's;\(.*\)/\(.*\);/resource:\1/\2,App_Code/\2 ;g')) \
+       $(foreach file,$(NUNIT_APP_GLOBALRESOURCES_FILES),$(shell echo $(file) | sed -e 's;\(.*\)/\(.*\);/resource:\1/\2,App_GlobalResources/\2 ;g'))
+
 ifeq (net_2_0, $(PROFILE))
-TEST_MCS_FLAGS += -r:System.Web.Extensions.dll
+TEST_MCS_FLAGS += -r:System.Web.Extensions.dll -d:TEST
 endif
 
-EXTRA_DISTFILES = $(RESOURCE_FILES_2) $(RESOURCE_FILES_1) $(TEST_RESOURCE_FILES) UplevelHelperDefinitions.xml $(RESX_DIST) \
-                 SQLiteProviders_DatabaseSchema.sql
+EXTRA_DISTFILES = \
+       $(RESOURCE_FILES_4) \
+       $(RESOURCE_FILES_2) \
+       $(RESOURCE_FILES_1) \
+       $(TEST_RESOURCE_FILES) \
+       $(TEST_APP_CODE_FILES) \
+       $(TEST_APP_GLOBALRESOURCES_FILES) \
+       UplevelHelperDefinitions.xml \
+       $(RESX_DIST) \
+       SQLiteProviders_DatabaseSchema.sql \
+       $(shell find Test/standalone-runner-support/ -name "*.cs" -type f -printf "'%p' ") \
+       $(shell find Test/standalone-tests/ -name "*.cs" -type f -printf "'%p' " -o -name "*.cs.in" -type f -printf "'%p' ") \
+       $(shell find Test/standalone/ -path '*/.svn' -prune -o -type f -printf "'%p' ") \
+       $(shell find Test/tools/ -path '*/.svn' -prune -o -type f -printf "'%p' ") \
+       System.Web_standalone_test.dll.sources \
+       standalone-runner-support.dll.sources \
+       $(shell find Test/System.Web.Caching/CacheItemPriorityQueueTestData/ -name "Sequence*.*" -type f -printf "'%p' ") \
+       ASPState.sql
+
 BUILT_SOURCES = System.Web/UplevelHelper.cs 
 
 include ../../build/library.make
@@ -279,13 +364,58 @@ ifdef DEVEL
 LIB_MCS_FLAGS += -define:DEVEL
 endif
 
+CLASSLIB_DIR = $(topdir)/class/lib/$(PROFILE)
+
+STANDALONE_RUNNER_SUPPORT_MCS_FLAGS = $(LIB_MCS_FLAGS) $(PROFILE_MCS_FLAGS) -d:STANDALONE_TEST -debug:full -r:System.Web.dll -r:nunit.framework.dll
+STANDALONE_RUNNER_SUPPORT_ASSEMBLY = $(CLASSLIB_DIR)/standalone-runner-support.dll
+STANDALONE_RUNNER_SUPPORT_MAKEFRAG = $(depsdir)/$(PROFILE)_standalone-runner-support.dll.makefrag
+
+STANDALONE_TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) $(PROFILE_MCS_FLAGS) -debug:full -r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) -r:System.Web.dll -r:nunit.framework.dll
+STANDALONE_TEST_ASSEMBLY = System.Web_standalone_test_$(PROFILE).dll
+STANDALONE_TEST_MAKEFRAG = $(depsdir)/$(STANDALONE_TEST_ASSEMBLY).makefrag
+
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+STANDALONE_TEST_COMPILABLE_TESTS = \
+       ApplicationPreStartMethods/test_01 \
+       ApplicationPreStartMethods/test_02 \
+       ApplicationPreStartMethods/test_03 \
+       ApplicationPreStartMethods/test_04 \
+       ApplicationPreStartMethods/test_05 \
+       ApplicationPreStartMethods/test_06 \
+       ApplicationPreStartMethods/test_07 \
+       ApplicationPreStartMethods/test_08 \
+       EnableFormsAuthentication/Test_01 \
+       EnableFormsAuthentication/Test_02 \
+       EnableFormsAuthentication/Test_03 \
+       EnableFormsAuthentication/Test_04 \
+       EnableFormsAuthentication/Test_05 \
+       EnableFormsAuthentication/Test_06 \
+       EnableFormsAuthentication/Test_07 \
+       EnableFormsAuthentication/Test_08 \
+       EnableFormsAuthentication/Test_09 \
+       RegisterBuildProvider \
+       PageParserDefaultTypeProperties
+endif
+
+STANDALONE_TEST_RUNNER = Test/tools/standalone-runner.exe
+ifeq (2, $(FRAMEWORK_VERSION_MAJOR))
+RUN_STANDALONE = MONO_TESTS_IN_PROGRESS=yes
+endif
+RUN_STANDALONE += $(TEST_RUNTIME) $(STANDALONE_TEST_RUNNER) --output=StandaloneTestResult-$(PROFILE).log 
+ifdef TESTNAME
+RUN_STANDALONE += --test=$(TESTNAME)
+endif
+ifdef STANDALONE_VERBOSE
+RUN_STANDALONE += --verbose
+endif
+
 $(build_lib): $(RESX_RES) $(RESOURCE_FILES_2) $(RESOURCE_FILES_1)
 
 $(RESX_RES): %.resources: %.resx
        $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
 
 System.Web/UplevelHelper.cs: UplevelHelperDefinitions.xml
-       $(TEST_RUNTIME) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/culevel.exe -o $@ $^
+       MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/culevel.exe -o $@ $^
 
 run-aaa: test
        $(TEST_RUNTIME) $(TEST_HARNESS) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) \
@@ -305,3 +435,44 @@ run-nunitweb-ondotnet: test
        (echo ''; cat TestResult-ondotnet-$(PROFILE).log) | sed '1,/^Tests run: /d'; \
        $$ok
 
+run-standalone-test: $(STANDALONE_TEST_MAKEFRAG) $(STANDALONE_RUNNER_SUPPORT_MAKEFRAG) $(STANDALONE_TEST_ASSEMBLY)
+       $(MAKE) -C Test/tools/ STANDALONE_SUPPORT_BUILT=1 standalone-runner.exe
+       $(RUN_STANDALONE) $(STANDALONE_TEST_ASSEMBLY)
+
+standalone-runner-support: $(STANDALONE_RUNNER_SUPPORT_MAKEFRAG) $(STANDALONE_RUNNER_SUPPORT_ASSEMBLY)
+
+$(STANDALONE_TEST_MAKEFRAG): System.Web_standalone_test.dll.sources
+       @echo Creating $@ ...
+       @sed 's,^,$(STANDALONE_TEST_ASSEMBLY): ,' $< > $@
+
+$(STANDALONE_RUNNER_SUPPORT_MAKEFRAG): standalone-runner-support.dll.sources
+       @echo Creating $@ ...
+       @sed 's,^,$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY): ,' $< > $@
+
+include $(STANDALONE_TEST_MAKEFRAG)
+include $(STANDALONE_RUNNER_SUPPORT_MAKEFRAG)
+
+$(STANDALONE_TEST_ASSEMBLY): $(the_assembly) $(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) Test/standalone-tests/Consts.cs standalone-compilable-tests
+       $(CSCOMPILE) $(STANDALONE_TEST_MCS_FLAGS) -out:$@ -target:library @System.Web_standalone_test.dll.sources
+
+standalone-compilable-tests:
+ifdef STANDALONE_TEST_COMPILABLE_TESTS
+       for d in $(STANDALONE_TEST_COMPILABLE_TESTS); do \
+               $(MAKE) -C Test/standalone/$$d ; \
+       done
+endif
+
+$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY): 
+       $(CSCOMPILE) $(STANDALONE_RUNNER_SUPPORT_MCS_FLAGS) -out:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) -target:library @standalone-runner-support.dll.sources
+
+Test/standalone-tests/Consts.cs: Test/standalone-tests/Consts.cs.in
+       @sed 's,@SystemWebClassDir@,$(shell pwd),' $< > $@
+
+clean-local:
+ifdef STANDALONE_TEST_COMPILABLE_TESTS
+       for d in $(STANDALONE_TEST_COMPILABLE_TESTS); do \
+               $(MAKE) -C Test/standalone/$$d clean ; \
+       done
+endif