blob: ad359aec0aa25189307087eb9b804df71bfee33e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
include $(top_srcdir)/xbuild.include
MONO=mono$(SGEN_SUFFIX)
RUN_TEST=$(MDTOOL_RUN) run-md-tests
TEST_DIR=$(top_builddir)/build/tests
TEST_SRC_DIR=$(top_srcdir)/tests
EXTERNAL=$(top_builddir)/external
MACOS_10_10=$(shell (test `sw_vers -productVersion | cut -f1 -d.` = 10 && test `sw_vers -productVersion | cut -f2 -d.` -ge 10) && echo yes)
TEST_DEPLOY_DIR=$(top_builddir)/build/test-deploy
TEST_PROJECTS_MAC = \
MacPlatform.Tests/MacPlatform.Tests.csproj
TEST_PROJECTS_COMMON = \
IdeUnitTests/IdeUnitTests.csproj \
UnitTests/UnitTests.csproj \
$(top_srcdir)/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/MonoDevelop.Debugger.Tests.csproj
TEST_ASSEMBLIES_MAC = \
$(TEST_DIR)/MonoDevelop.VersionControl.Subversion.Tests.dll \
$(TEST_DIR)/MacPlatform.Tests.dll
TEST_ASSEMBLIES_WINDOWS = \
$(TEST_DIR)/VersionControl.Subversion.Win32.Tests.dll
TEST_ASSEMBLIES_COMMON = \
$(TEST_DIR)/MonoDevelop.Core.Tests.dll \
$(TEST_DIR)/MonoDevelop.Ide.Tests.dll \
$(TEST_DIR)/MonoDevelop.VersionControl.Git.Tests.dll \
$(TEST_DIR)/MonoDevelop.Debugger.Tests.dll \
$(TEST_DIR)/Mono.TextTemplating.Tests.dll \
$(TEST_DIR)/MonoDevelop.PackageManagement.Tests.dll \
$(TEST_DIR)/MonoDevelop.Packaging.Tests.dll \
$(TEST_DIR)/MonoDevelop.TextEditor.Tests.dll \
$(TEST_DIR)/MonoDevelop.Xml.Tests.dll \
$(TEST_DIR)/MonoDevelop.AspNet.Tests.dll \
$(TEST_DIR)/MonoDevelop.CSharpBinding.Tests.dll \
$(TEST_DIR)/MonoDevelop.DotNetCore.Tests.dll \
$(TEST_DIR)/MonoDevelop.AspNetCore.Tests.dll \
$(TEST_DIR)/MonoDevelop.UnitTesting.Tests.dll \
$(TEST_DIR)/MonoDevelop.Refactoring.Tests.dll \
$(TEST_DIR)/MonoDevelop.Ide.PerfTests.dll \
$(TEST_DIR)/PerfTool.exe
if RELEASE_BUILDS
TEST_ASSEMBLIES_COMMON += $(EXTERNAL)/nrefactory/bin/Release/ICSharpCode.NRefactory.Tests.dll
TEST_ASSEMBLIES_COMMON += $(EXTERNAL)/fsharpbinding/MonoDevelop.FSharp.Tests/bin/Release/MonoDevelop.FSharp.Tests.dll
else
TEST_ASSEMBLIES_COMMON += $(EXTERNAL)/nrefactory/bin/Debug/ICSharpCode.NRefactory.Tests.dll
TEST_ASSEMBLIES_COMMON += $(EXTERNAL)/fsharpbinding/MonoDevelop.FSharp.Tests/bin/Debug/MonoDevelop.FSharp.Tests.dll
endif
TEST_ASSEMBLIES = $(TEST_ASSEMBLIES_COMMON)
if ENABLE_MACPLATFORM
TEST_ASSEMBLIES += $(TEST_ASSEMBLIES_MAC)
endif
if ENABLE_WINDOWSPLATFORM
TEST_ASSEMBLIES += $(TEST_ASSEMBLIES_WINDOWS)
endif
test:
@if test -n "$(assembly)"; then \
for asm in $(TEST_ASSEMBLIES); do \
if test `basename $$asm` = $(assembly); then \
($(RUN_TEST) -xml=TestResult_`basename $$asm`.xml -labels $$asm) || exit $?; \
fi; \
done; \
fi
@if ! test -n "$(assembly)"; then \
fail=0; \
for asm in $(TEST_ASSEMBLIES); do \
echo Testing `basename $$asm`...; \
($(RUN_TEST) -xml=TestResult_`basename $$asm`.xml -labels $$asm); \
if [ $$? != 0 ]; then \
fail=1; \
fi; \
done; \
if [ $${fail} = 1 ]; then \
exit 1; \
fi; \
fi
uitest:
rm -rf $(TEST_DIR)/TestResults
@if test -n "$(assembly)"; then \
for asm in $(wildcard $(TEST_DIR)/MonoDevelop.UITests*.dll); do \
if test `basename $$asm` = $(assembly); then \
if test -n "$(categories)"; then \
($(RUN_TEST) -xml=TestResult_`basename $$asm`.xml -labels -include=$(categories) $$asm) || exit $?; \
fi; \
if test -n "$(tests)"; then \
($(RUN_TEST) -xml=TestResult_`basename $$asm`.xml -labels -run=$(tests) $$asm) || exit $?; \
fi; \
if ! test -n "$(categories)" && ! test -n "$(tests)"; then \
($(RUN_TEST) -xml=TestResult_`basename $$asm`.xml -labels $$asm) || exit $?; \
fi; \
fi; \
done; \
fi
@if ! test -n "$(assembly)"; then \
echo "You must pass 'assembly' argument"; \
exit 1; \
fi
profile:
@if test -n "$(assembly)"; then \
for asm in $(TEST_ASSEMBLIES); do \
if test `basename $$asm` = $(assembly); then \
echo Generating profiling for `basename $$asm`...; \
($(MD_LAUNCH_SETUP) exec -a "mdtool" $(RUNTIME) --debug --profile=log:heapshot,alloc,calls,calldepth=100,zip,sample=cycles/1000,counters,output=ProfileResult_`basename $$asm`.mlpd "$(MD_BIN_PATH)/mdtool.exe" run-md-tests $$asm); \
mprof-report ProfileResult_`basename $$asm`.mlpd > ProfileAnalysis_`basename $$asm`.txt ; \
fi; \
done; \
fi
coverage:
if ! test -n "$(assembly)"; then \
for asm in $(TEST_ASSEMBLIES); do \
echo Generating coverage for `basename $$asm`...; \
($(MD_LAUNCH_SETUP) exec -a "mdtool" $(RUNTIME) --debug --profile=log:coverage,onlycoverage,output=CoverageResult_`basename $$asm`.mlpd,covfilter-file=`basename $$asm`.filter "$(MD_BIN_PATH)/mdtool.exe" run-md-tests $$asm); \
mprof-report --coverage-out=CoverageResult_`basename $$asm`.xml CoverageResult_`basename $$asm`.mlpd > /dev/null; \
done; \
fi
deploy-tests:
mkdir -p "$(TEST_DEPLOY_DIR)/tests/test-projects"
cp -r $(TEST_DIR)/ "$(TEST_DEPLOY_DIR)/tests"; \
cp -r $(top_srcdir)/tests/test-projects "$(TEST_DEPLOY_DIR)/tests"; \
for asm in $(TEST_ASSEMBLIES); do \
if ! [ -e $(TEST_DIR)/`basename $$asm` ]; then \
cp -r `dirname $$asm`/* "$(TEST_DEPLOY_DIR)/tests"; \
fi \
done;
performance-tests:
rm -rf $(TEST_DIR)/TestSolutions/ExampleFormsSolution
cd $(TEST_DIR)/TestSolutions; unzip ExampleFormsSolution.zip
$(RUN_TEST) -xml=TestResult_PerfTest.xml -labels $(TEST_DIR)/MonoDevelop.Ide.PerfTests.dll || exit $?;
mono $(TEST_DIR)/PerfTool.exe generate-results $(TEST_DIR)/Baseline_MonoDevelop.Ide.PerfTests.xml $(TEST_SRC_DIR)/TestResult_PerfTest.xml $(TEST_DIR)/PerformanceTestReport.xml
include $(top_srcdir)/Makefile.include
|