Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2015-10-19 18:06:46 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2015-10-19 18:14:45 +0300
commit0ec96b12419f63da50719118820a028eb256baaa (patch)
tree8c6a7bdb580687620fd33d2917d135b9028d2301 /acceptance-tests/versions.mk
parent9f626c29bc13b5ad362d1004c1ba30c9d8d26066 (diff)
[acceptance-tests] Integrate Roslyn, CoreCLR and ms-test-suite into acceptance-tests
This commit integrates the CoreCLR, Roslyn and ms-test-suite (which is Xamarin-internal, but should just print a warning for someone without access). Running the tests suites can be done with 'make check-coreclr', 'make check-roslyn' and 'make check-ms-test-suite', or all of them with make check in the acceptance-tests folder. They won't run on a top-level make check though, which is intended until every test suite is fixed. This uses a custom submodule system that doesn't rely on git submodules (which are annoying when the repo is large and we only need them for tests). Instead we can fetch repositories on demand. History (before squashing into smaller chunks): - Rename check-{testsuite} make target to validate-{testsuite}. The former can be easily confused with the "check" target that runs the tests. - Move acceptance-tests Makefile to automake, so we can avoid hardcoding paths - Copy System.Console facade to CoreCLR IL test directories. Otherwise most of the IL tests fail as they rely on the System.Console assembly reference. - Update README.md to mention the tests - Use $(MAKE) instead of plain make and pass -C instead of cd'ing to directory - Exit when the repository can't be cloned and print a note about the ms-test-suite repo. The ms-test-suite repo is Xamarin-internal so it'll error out in public. - Integrate MS CoreCLR runtime tests into Mono's test infrastructure - Get rid of intermediate msg file and pipe straight to git - Rename README to CONFIG since we don't store metadata in readme.md anymore - Fix comparison in versions.mk to be sh compliant. It relied on bashism before.
Diffstat (limited to 'acceptance-tests/versions.mk')
-rw-r--r--acceptance-tests/versions.mk116
1 files changed, 58 insertions, 58 deletions
diff --git a/acceptance-tests/versions.mk b/acceptance-tests/versions.mk
index 5890dbe3fef..3d869cf156a 100644
--- a/acceptance-tests/versions.mk
+++ b/acceptance-tests/versions.mk
@@ -1,11 +1,11 @@
-.PHONY: check-versions reset-versions check-mono
+.PHONY: validate-versions reset-versions
-README=SUBMODULES.json
+CONFIG=SUBMODULES.json
-# usage $(call CheckVersionTemplate (name,MAKEFILE VAR,repo name))
-# usage $(call CheckVersionTemplate (mono,MONO,mono))
+# usage $(call ValidateVersionTemplate (name,MAKEFILE VAR,repo name))
+# usage $(call ValidateVersionTemplate (mono,MONO,mono))
-define CheckVersionTemplate
+define ValidateVersionTemplate
#$(eval REPOSITORY_$(2):=$(shell test -z $(3) && echo $(1) || echo "$(3)"))
#$(eval DIRECTORY_$(2):=$(shell ruby versions.rb get-dir $(1)))
#$(eval DIRECTORY_$(2):=$(shell test -z $(DIRECTORY_$(2)) && echo $(1) || echo $(DIRECTORY_$(2))))
@@ -19,31 +19,31 @@ define CheckVersionTemplate
#$(eval NEEDED_$(2)_REMOTE:=$(word 1, $(subst /, ,$($(2)_BRANCH_AND_REMOTE))))
#$(eval $(2)_BRANCH:=$$$$(shell cd $($(2)_PATH) 2>/dev/null && git symbolic-ref --short HEAD 2>/dev/null))
-check-$(1)::
+validate-$(1)::
@if test x$$(IGNORE_$(2)_VERSION) = "x"; then \
if test ! -d $($(2)_PATH); then \
if test x$$(RESET_VERSIONS) != "x"; then \
- make reset-$(1) || exit 1; \
+ $(MAKE) reset-$(1) || exit 1; \
else \
echo "Your $(1) checkout is missing, please run 'make reset-$(1)'"; \
- touch .check-versions-failure; \
+ touch .validate-versions-failure; \
fi; \
else \
if test "x$($(2)_VERSION)" != "x$(NEEDED_$(2)_VERSION)" ; then \
if test x$$(RESET_VERSIONS) != "x"; then \
- make reset-$(1) || exit 1; \
+ $(MAKE) reset-$(1) || exit 1; \
else \
echo "Your $(1) version is out of date, please run 'make reset-$(1)' (found $($(2)_VERSION), expected $(NEEDED_$(2)_VERSION))"; \
test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \
- touch .check-versions-failure; \
+ touch .validate-versions-failure; \
fi; \
elif test "x$($(2)_BRANCH)" != "x$(NEEDED_$(2)_BRANCH)" ; then \
if test x$$(RESET_VERSIONS) != "x"; then \
test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \
- make reset-$(1) || exit 1; \
+ $(MAKE) reset-$(1) || exit 1; \
else \
echo "Your $(1) branch is out of date, please run 'make reset-$(1)' (found $($(2)_BRANCH), expected $(NEEDED_$(2)_BRANCH))"; \
- touch .check-versions-failure; \
+ touch .validate-versions-failure; \
fi; \
fi; \
fi; \
@@ -68,7 +68,7 @@ reset-$(1)::
echo "*** git fetch `basename $$($(2)_PATH)`" && (cd $($(2)_PATH) && git fetch); \
fi; \
else \
- echo "*** git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2))" && (cd `dirname $($(2)_PATH)` && git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2))); \
+ echo "*** git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2))" && (cd `dirname $($(2)_PATH)` && git clone $(MODULE_$(2)) --recursive $(DIRECTORY_$(2)) || exit 1 ); \
fi
@if test x$$(IGNORE_$(2)_VERSION) = "x"; then \
echo "*** [$(1)] git checkout -f" $(NEEDED_$(2)_BRANCH) && (cd $($(2)_PATH) ; git checkout -f $(NEEDED_$(2)_BRANCH) || git checkout -f -b $($(2)_BRANCH_AND_REMOTE)); \
@@ -79,23 +79,23 @@ reset-$(1)::
print-$(1)::
@printf "*** %-16s %-45s %s (%s)\n" "$(DIRECTORY_$(2))" "$(MODULE_$(2))" "$(NEEDED_$(2)_VERSION)" "$(NEEDED_$(2)_BRANCH)"
-.PHONY: check-$(1) reset-$(1) print-$(1)
+.PHONY: validate-$(1) reset-$(1) print-$(1)
reset-versions:: reset-$(1)
-check-versions:: check-$(1)
+validate-versions:: Validate-$(1)
print-versions:: print-$(1)
endef
-ifneq ($(findstring mono-extensions, $(CHECK_VERSIONS)),)
- $(eval $(call CheckVersionTemplate,mono-extensions,MONO_EXTENSIONS))
-endif
+$(eval $(call ValidateVersionTemplate,roslyn,ROSLYN))
+$(eval $(call ValidateVersionTemplate,coreclr,CORECLR))
+$(eval $(call ValidateVersionTemplate,ms-test-suite,MSTESTSUITE))
reset-versions::
-check-versions::
- @if test -e .check-versions-failure; then \
- rm .check-versions-failure; \
+validate-versions::
+ @if test -e .validate-versions-failure; then \
+ rm .validate-versions-failure; \
echo One or more modules needs update; \
exit 1; \
else \
@@ -103,60 +103,60 @@ check-versions::
fi
reset:
- @make check-versions RESET_VERSIONS=1
-
-XAMARIN_SUBMODULES=mono-extensions
-
-check-versions-xamarin:
- $(MAKE) check-versions CHECK_VERSIONS=$(XAMARIN_SUBMODULES)
-
-reset-versions-xamarin:
- $(MAKE) reset-versions CHECK_VERSIONS=$(XAMARIN_SUBMODULES)
-
-reset-xamarin:
- $(MAKE) check-versions CHECK_VERSIONS=$(XAMARIN_SUBMODULES) RESET_VERSIONS=1
+ @$(MAKE) validate-versions RESET_VERSIONS=1
__bump-version-%:
- @if [ "$(REV)" == "" ]; then echo "Usage: make bump-version-$* REV=<ref>"; exit 1; fi
- @if [ "$(COMMIT)" == "1" ]; then git pull; fi
+ @if [ "$(REV)" = "" ]; then echo "Usage: make bump-version-$* REV=<ref>"; exit 1; fi
+ @if [ "$(COMMIT)" = "1" ]; then git pull; fi
ruby versions.rb set-rev $* $(REV)
- @if [ "$(COMMIT)" == "1" ]; then echo "Bump $* to pick up $(REV)." > msg; echo >> msg; cat msg | git commit -F - $(README); rm -f msg; fi
+ @if [ "$(COMMIT)" = "1" ]; then echo "Bump $* to pick up $(REV)." | git commit -F - $(CONFIG); fi
__bump-branch-%:
- @if [ "$(BRANCH)" == "" ]; then echo "Usage: make bump-branch-$* BRANCH=<branch> REMOTE_BRANCH=<remote branch>"; exit 1; fi
+ @if [ "$(BRANCH)" = "" ]; then echo "Usage: make bump-branch-$* BRANCH=<branch> REMOTE_BRANCH=<remote branch>"; exit 1; fi
@if [ "$(REMOTE_BRANCH)" == "" ]; then echo "Usage: make bump-branch-$* BRANCH=<branch> REMOTE_BRANCH=<remote branch>"; exit 1; fi
- @if [ "$(COMMIT)" == "1" ]; then git pull; fi
+ @if [ "$(COMMIT)" = "1" ]; then git pull; fi
ruby versions.rb set-branch $* $(BRANCH)
ruby versions.rb set-remote-branch $* $(REMOTE_BRANCH)
- @if [ "$(COMMIT)" == "1" ]; then echo "Bump $* to switch to $(BRANCH) $(REMOTE BRANCH)." > msg; echo >> msg; cat msg | git commit -F - $(README); rm -f msg; fi
+ @if [ "$(COMMIT)" = "1" ]; then echo "Bump $* to switch to $(BRANCH) $(REMOTE BRANCH)." | git commit -F - $(CONFIG); fi
__bump-current-version-%:
- @if [ "$(COMMIT)" == "1" ]; then git pull; fi
+ @if [ "$(COMMIT)" = "1" ]; then git pull; fi
REV=$(shell cd $(TOP)/../$* && git log -1 --pretty=format:%H); \
- ruby versions.rb set-rev $* $$REV
- if [ "$(COMMIT)" == "1" ]; then echo "Bump $* to pick up $$REV:" > msg; echo >> msg; cat msg | git commit -F - $(README); rm -f msg; fi
+ ruby versions.rb set-rev $* $$REV; \
+ if [ "$(COMMIT)" = "1" ]; then echo "Bump $* to pick up $$REV:" | git commit -F - $(CONFIG); fi
# Bump the given submodule to the revision given by the REV make variable
# If COMMIT is 1, commit the change
-bump-mono-extensions: __bump-version-mono-extensions
-bump-llvm: __bump-version-llvm
+bump-roslyn: __bump-version-roslyn
+bump-coreclr: __bump-version-coreclr
+bump-ms-test-suite: __bump-version-ms-test-suite
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
# If COMMIT is 1, commit the change
-bump-branch-mono-extensions: __bump-branch-mono-extensions
-bump-branch-llvm: __bump-branch-llvm
+bump-branch-roslyn: __bump-branch-roslyn
+bump-branch-coreclr: __bump-branch-coreclr
+bump-branch-ms-test-suite: __bump-branch-ms-test-suite
# Bump the given submodule to its current GIT version
# If COMMIT is 1, commit the change
-bump-current-mono-extensions: __bump-current-version-mono-extensions
-bump-current-llvm: __bump-current-version-llvm
-
-commit-bump-mono-extensions:
- $(MAKE) bump-mono-extensions COMMIT=1
-commit-bump-llvm:
- $(MAKE) bump-llvm COMMIT=1
-
-commit-bump-current-mono-extensions:
- $(MAKE) bump-current-mono-extensions COMMIT=1
-commit-bump-current-llvm:
- $(MAKE) bump-current-llvm COMMIT=1
+bump-current-roslyn: __bump-current-version-roslyn
+bump-current-coreclr: __bump-current-version-coreclr
+bump-current-ms-test-suite: __bump-current-version-ms-test-suite
+
+commit-bump-roslyn:
+ $(MAKE) bump-roslyn COMMIT=1
+
+commit-bump-coreclr:
+ $(MAKE) bump-coreclr COMMIT=1
+
+commit-bump-ms-test-suite:
+ $(MAKE) bump-ms-test-suite COMMIT=1
+
+commit-bump-current-roslyn:
+ $(MAKE) bump-current-roslyn COMMIT=1
+
+commit-bump-current-coreclr:
+ $(MAKE) bump-current-coreclr COMMIT=1
+
+commit-bump-current-ms-test-suite:
+ $(MAKE) bump-current-ms-test-suite COMMIT=1