You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.142
Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
parent
e52655b4dc
commit
0abdbe5a7d
@@ -8,20 +8,35 @@ LIB_REFS = System System.Core System.Xml Mono.Cecil
|
||||
|
||||
TEST_CASES := \
|
||||
mscorlib/test-array.cs \
|
||||
mscorlib/test-remoting.cs \
|
||||
mscorlib/test-exception-01.cs \
|
||||
mscorlib/test-locale-01.cs \
|
||||
mscorlib/test-reflection-01.cs \
|
||||
mscorlib/test-string-01.cs \
|
||||
mscorlib/test-string-02.cs \
|
||||
mscorlib/test-string-03.cs \
|
||||
mscorlib/test-task-01.cs \
|
||||
System/test-security.cs
|
||||
|
||||
ifdef MOBILE_PROFILE
|
||||
TEST_CASES += \
|
||||
# Requires linker fix
|
||||
# mscorlib/test-crypto-01.cs
|
||||
endif
|
||||
|
||||
ifndef AOT_FRIENDLY_PROFILE
|
||||
TEST_CASES += \
|
||||
mscorlib/test-remoting.cs \
|
||||
mscorlib/test-reflection.cs
|
||||
endif
|
||||
|
||||
TESTS_COMPILER = $(MCS) -nologo -noconfig -debug:portable -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
|
||||
SIZE_TEST_CASES :=
|
||||
|
||||
TESTS_COMPILER = $(MCS) -nologo -noconfig -unsafe -debug:portable -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
|
||||
|
||||
check: compile-tests
|
||||
$(MAKE) run-tests
|
||||
|
||||
compile-tests: $(TEST_CASES)
|
||||
compile-tests: $(TEST_CASES) $(SIZE_TEST_CASES)
|
||||
|
||||
mscorlib/test-%.cs:
|
||||
$(TESTS_COMPILER) Tests/$@ /out:Tests/$(@:.cs=.exe)
|
||||
@@ -46,4 +61,40 @@ System/test-%.exe mscorlib/test-%.exe:
|
||||
$(TEST_EXEC) $(LINKER_OUTPUT)/$(@F)
|
||||
@rm -rf $(LINKER_OUTPUT)
|
||||
|
||||
BCL_ASSEMBLIES_CORE=mscorlib.dll System.dll System.Core.dll System.Xml.dll
|
||||
BCL_ASSEMBLIES=$(BCL_ASSEMBLIES_CORE) $(sort $(filter-out $(BCL_ASSEMBLIES_CORE), $(notdir $(wildcard $(PROFILE_PATH)/System.*.dll)) ))
|
||||
|
||||
COMMA=,
|
||||
REPORT_FILE=$(PROFILE)-linked-size.csv
|
||||
|
||||
bcl-size-current: compile-tests
|
||||
@echo "App,$$(echo '$(BCL_ASSEMBLIES)' | tr ' ' ',')" > $(REPORT_FILE)
|
||||
@for app in $(sort $(SIZE_TEST_CASES:.cs=.exe) $(TEST_CASES:.cs=.exe)); do \
|
||||
rm -rf $(LINKER_OUTPUT); \
|
||||
mkdir $(LINKER_OUTPUT); \
|
||||
echo Checking linked BCL size for $$app; \
|
||||
$(LINKER) -a Tests/$$app; \
|
||||
sizes=""; \
|
||||
for asm in $(BCL_ASSEMBLIES); do \
|
||||
if [ -f "$(LINKER_OUTPUT)/$$asm" ]; then size=$$(wc -c < "$(LINKER_OUTPUT)/$$asm" | tr -d "[:space:]"); else size="0"; fi; \
|
||||
sizes="$$sizes,$$size"; \
|
||||
done; \
|
||||
echo "$$app$$sizes" >> $(REPORT_FILE); \
|
||||
rm -rf $(LINKER_OUTPUT); \
|
||||
done;
|
||||
|
||||
bcl-size-diff:
|
||||
@echo "Regenerating BCL Linked Size diff..."
|
||||
$(Q) $(MAKE) bcl-size-current PROFILE=net_4_x || true
|
||||
$(Q) $(MAKE) bcl-size-current PROFILE=monotouch || true
|
||||
$(Q) $(MAKE) bcl-size-current PROFILE=monodroid || true
|
||||
@echo "Checking size differences..."
|
||||
@mkdir -p sizediff
|
||||
$(Q) git diff HEAD "*.csv" > temp.patch
|
||||
$(Q) git show HEAD:./net_4_x-linked-size.csv > net_4_x-linked-size.old.csv
|
||||
$(Q) git show HEAD:./monotouch-linked-size.csv > monotouch-linked-size.old.csv
|
||||
$(Q) git show HEAD:./monodroid-linked-size.csv > monodroid-linked-size.old.csv
|
||||
$(Q) sed -e "/@diffdata@/r temp.patch" -e "/@diffdata@/d" -e "/@olddata-net_4_x@/r net_4_x-linked-size.old.csv" -e "/@olddata-net_4_x@/d" -e "/@olddata-monotouch@/r monotouch-linked-size.old.csv" -e "/@olddata-monotouch@/d" -e "/@olddata-monodroid@/r monodroid-linked-size.old.csv" -e "/@olddata-monodroid@/d" -e "/@newdata-net_4_x@/r net_4_x-linked-size.csv" -e "/@newdata-net_4_x@/d" -e "/@newdata-monotouch@/r monotouch-linked-size.csv" -e "/@newdata-monotouch@/d" -e "/@newdata-monodroid@/r monodroid-linked-size.csv" -e "/@newdata-monodroid@/d" linked-size-diff.html.in > sizediff/index.html
|
||||
$(Q) if [ -s temp.patch ]; then echo "Error: Found BCL Linked Size differences, see mcs/tools/linker/sizediff/index.html."; rm -f temp.patch *.old.csv; exit 1; else echo "No differences found."; rm -f temp.patch *.old.csv; fi
|
||||
|
||||
include ../../build/executable.make
|
||||
|
Reference in New Issue
Block a user