diff options
author | Manish Sinha <manish.sinha@xamarin.com> | 2015-05-13 23:24:46 +0300 |
---|---|---|
committer | Manish Sinha <manish.sinha@xamarin.com> | 2015-05-13 23:35:29 +0300 |
commit | 79cc9b68c2b9d243218f6f39dc042bd128b50b9c (patch) | |
tree | 4b163930e41550d0603ed07f77f14f4980c87cc6 /main | |
parent | 038171409fe765917b4310c552ca160399149905 (diff) |
[UITets] Add filtering of uitest target by 'categories' argument
Now when running
$ make uitest assembly=assemblyname.dll
it is possible to selectively run certain tests by passing another
optional argument named categories which is a comma seperated list
of NUnit categories
$ make uitest assembly=UserInterfaceTests.dll categories=DotNet,Misc
Diffstat (limited to 'main')
5 files changed, 13 insertions, 2 deletions
diff --git a/main/Makefile.am b/main/Makefile.am index a40a7c0d63..0ef7da6f10 100644 --- a/main/Makefile.am +++ b/main/Makefile.am @@ -153,7 +153,7 @@ test: cd tests && $(MAKE) test assembly=$(assembly) uitest: - cd tests && $(MAKE) uitest assembly=$(assembly) + cd tests && $(MAKE) uitest assembly=$(assembly) categories=$(categories) coverage: cd tests && $(MAKE) coverage diff --git a/main/tests/Makefile.am b/main/tests/Makefile.am index 5c08034b18..ed2d5c9fb5 100644 --- a/main/tests/Makefile.am +++ b/main/tests/Makefile.am @@ -76,7 +76,12 @@ uitest: @if test -n "$(assembly)"; then \ for asm in $(UITEST_ASSEMBLIES); do \ if test `basename $$asm` = $(assembly); then \ - ($(RUN_TEST) -xml=TestResult_`basename $$asm`.xml -labels $$asm) || exit $?; \ + if test -n "$(categories)"; then \ + ($(RUN_TEST) -xml=TestResult_`basename $$asm`.xml -labels -include=$(categories) $$asm) || exit $?; \ + fi; \ + if ! test -n "$(categories)"; then \ + ($(RUN_TEST) -xml=TestResult_`basename $$asm`.xml -labels $$asm) || exit $?; \ + fi; \ fi; \ done; \ fi diff --git a/main/tests/UserInterfaceTests/MonoDevelopTests/ASPNETTemplateTests.cs b/main/tests/UserInterfaceTests/MonoDevelopTests/ASPNETTemplateTests.cs index 6d8085c68d..9b84a6db7b 100644 --- a/main/tests/UserInterfaceTests/MonoDevelopTests/ASPNETTemplateTests.cs +++ b/main/tests/UserInterfaceTests/MonoDevelopTests/ASPNETTemplateTests.cs @@ -29,6 +29,8 @@ using NUnit.Framework; namespace UserInterfaceTests { + [TestFixture] + [Category("ASP")] public class ASPNetTemplatesTest : CreateBuildTemplatesTestBase { readonly string aspCategory = "ASP.NET"; diff --git a/main/tests/UserInterfaceTests/MonoDevelopTests/DotNetTemplatesTest.cs b/main/tests/UserInterfaceTests/MonoDevelopTests/DotNetTemplatesTest.cs index 459b2768a3..0fb7cbffc1 100644 --- a/main/tests/UserInterfaceTests/MonoDevelopTests/DotNetTemplatesTest.cs +++ b/main/tests/UserInterfaceTests/MonoDevelopTests/DotNetTemplatesTest.cs @@ -31,6 +31,8 @@ using NUnit.Framework; namespace UserInterfaceTests { + [TestFixture] + [Category("DotNet")] public class MonoDevelopTemplatesTest : CreateBuildTemplatesTestBase { public MonoDevelopTemplatesTest () : base (Util.TestRunId) {} diff --git a/main/tests/UserInterfaceTests/MonoDevelopTests/MiscTemplatesTest.cs b/main/tests/UserInterfaceTests/MonoDevelopTests/MiscTemplatesTest.cs index 7fdc71fb70..9e391cd7e0 100644 --- a/main/tests/UserInterfaceTests/MonoDevelopTests/MiscTemplatesTest.cs +++ b/main/tests/UserInterfaceTests/MonoDevelopTests/MiscTemplatesTest.cs @@ -28,6 +28,8 @@ using NUnit.Framework; namespace UserInterfaceTests { + [TestFixture] + [Category("Misc")] public class MiscTemplatesTest : CreateBuildTemplatesTestBase { readonly string miscCategory = "Miscellaneous"; |