[banshee] [tests] Add 'make test' rule from every assembly



commit 275d9e228c04ffd927ec64572d9e17b4105b2761
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Fri Mar 19 11:21:15 2010 -0700

    [tests] Add 'make test' rule from every assembly
    
    Won't work for assemblies not defined as having tests in
    tests/Makefile.am, but convenient for others.  Also, make some
    properties static in TestBase.

 build/build.rules.mk                        |    5 +++++
 src/Libraries/Hyena/Hyena/Tests/TestBase.cs |    8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/build/build.rules.mk b/build/build.rules.mk
index 5f72724..434994e 100644
--- a/build/build.rules.mk
+++ b/build/build.rules.mk
@@ -43,6 +43,11 @@ run:
 	make run; \
 	popd;
 
+test:
+	@pushd $(top_builddir)/tests; \
+	make $(ASSEMBLY); \
+	popd;
+
 build-debug:
 	@echo $(DEP_LINK)
 
diff --git a/src/Libraries/Hyena/Hyena/Tests/TestBase.cs b/src/Libraries/Hyena/Hyena/Tests/TestBase.cs
index 3c263b6..f008d23 100644
--- a/src/Libraries/Hyena/Hyena/Tests/TestBase.cs
+++ b/src/Libraries/Hyena/Hyena/Tests/TestBase.cs
@@ -70,13 +70,13 @@ namespace Hyena.Tests
 
     public abstract class TestBase
     {
-        private string bin_dir;
-        public string BinDir {
+        private static string bin_dir;
+        public static string BinDir {
             get { return bin_dir ?? (bin_dir = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location)); }
         }
 
-        private string tests_dir;
-        public string TestsDir {
+        private static string tests_dir;
+        public static string TestsDir {
             get { return tests_dir ?? (tests_dir = Path.Combine (Path.GetDirectoryName (BinDir), "tests")); }
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]