~ubuntu-branches/ubuntu/trusty/gnome-do/trusty

« back to all changes in this revision

Viewing changes to Tests/Makefile.am

  • Committer: Package Import Robot
  • Author(s): Christopher James Halse Rogers
  • Date: 2012-03-26 11:12:21 UTC
  • mfrom: (0.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120326111221-1jk143fy37zxi3e4
Tags: 0.9-1
* New upstream version no longer uses deprecated internal glib headers.
  (Closes: #665537)
* [59fa37b9] Fix watch file
* [63486516] Imported Upstream version 0.9
* [8c636d84] Disable testsuite for now; requires running dbus and gconf daemons
* [e46de4b9] Remove inaccurate README.Source
* [4591d677] Add git-buildpackage configuration to default to pristine-tar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
FILES = \
 
2
        TestLogging.cs \
 
3
        TestKeybindingService.cs \
 
4
        AssemblyInfo.cs
 
5
 
 
6
RESOURCES = \
 
7
        Tests.addin.xml
 
8
 
 
9
REFERENCES =  \
 
10
        -r:$(BUILD_DIR)/Do.exe \
 
11
        Mono.Posix \
 
12
        $(GLIB_SHARP_20_LIBS) \
 
13
        $(GTK_SHARP_20_LIBS) \
 
14
        $(MONO_ADDINS_LIBS) \
 
15
        $(MONO_ADDINS_GUI_LIBS) \
 
16
        $(MONO_ADDINS_SETUP_LIBS) \
 
17
        $(NUNIT_LIBS) \
 
18
        System \
 
19
        System.Core \
 
20
        System.Xml
 
21
 
 
22
PROJECT_REFERENCES = \
 
23
        Do.Universe \
 
24
        Do.Platform \
 
25
        Do.Interface.Linux
 
26
 
 
27
SOURCES_BUILD = $(addprefix $(srcdir)/, $(FILES))
 
28
 
 
29
RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
 
30
RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
 
31
        -resource:$(resource),$(notdir $(resource)))
 
32
 
 
33
BUILD_DIR = $(top_builddir)/build
 
34
 
 
35
ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
 
36
ASSEMBLY_FILE = $(BUILD_DIR)/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
 
37
 
 
38
STD_REFERENCES = $(foreach ref,$(filter-out -r:%,$(REFERENCES)),-r:$(ref))
 
39
BUILD_REFERENCES = $(filter -r:%,$(REFERENCES) $(STD_REFERENCES))
 
40
COMPONENT_REFERENCES = $(foreach ref, $(PROJECT_REFERENCES),-r:$(BUILD_DIR)/$(ref).dll)
 
41
COMPONENT_DEPS = $(foreach ref,$(PROJECT_REFERENCES),$(BUILD_DIR)/$(ref).dll)
 
42
 
 
43
MCS_FLAGS =  $(MCS_LINQ_FLAG) -noconfig -codepage:utf8 -warn:4
 
44
 
 
45
if ENABLE_DEBUG
 
46
MCS_FLAGS += -d:DEBUG -debug
 
47
COMPONENT_DEPS_DEBUG = $(foreach ref,$(COMPONENT_DEPS),$(ref).mdb)
 
48
DO_EXE_DEBUG = $(BUILD_DIR)/Do.exe.mdb
 
49
endif
 
50
 
 
51
Do.Tests.dll: $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(COMPONENT_DEPS) $(BUILD_DIR)/Do.exe test-environment
 
52
        @mkdir -p $(BUILD_DIR)
 
53
        @colors=no; \
 
54
        case $$TERM in \
 
55
                "xterm" | "rxvt" | "rxvt-unicode") \
 
56
                        test "x$$COLORTERM" != "x" && colors=yes ;; \
 
57
                "xterm-color") colors=yes ;; \
 
58
        esac; \
 
59
        if [ "x$$colors" = "xyes" ]; then \
 
60
                tty -s && true || { colors=no; true; } \
 
61
        fi; \
 
62
        test "x$$colors" = "xyes" && \
 
63
                echo -e "\033[1mCompiling $(notdir $@)...\033[0m" || \
 
64
                echo "Compiling $(notdir $@)...";
 
65
        @$(MCS) $(MCS_FLAGS) -target:library -out:$@ $(BUILD_DEFINES) $(BUILD_REFERENCES) $(COMPONENT_REFERENCES) -r:$(BUILD_DIR)/Do.exe $(RESOURCES_BUILD) $(SOURCES_BUILD) 
 
66
 
 
67
export MONO_ENV_OPTIONS=--debug
 
68
 
 
69
test-environment: $(COMPONENT_DEPS) $(COMPONENT_DEPS_DEBUG) $(BUILD_DIR)/Do.exe $(DO_EXE_DEBUG)
 
70
        cp $(COMPONENT_DEPS) $(COMPONENT_DEPS_DEBUG) .
 
71
        cp $(BUILD_DIR)/Do.exe $(DO_EXE_DEBUG) .
 
72
        touch $@
 
73
 
 
74
TESTS_ENVIRONMENT=nunit-console
 
75
TESTS=  Do.Tests.dll \
 
76
        $(BUILD_DIR)/Do.Platform.dll \
 
77
        $(BUILD_DIR)/Do.Platform.Linux.dll \
 
78
        $(BUILD_DIR)/Do.Interface.Linux.dll
 
79
 
 
80
CLEANFILES=$(foreach component, $(COMPONENT_DEPS) $(COMPONENT_DEPS_DEBUG) $(DO_EXE_DEBUG), $(notdir $(component))) Do.exe test-environment Do.Tests.dll Do.Tests.dll.mdb TestResult.xml
 
81
EXTRA_DIST=$(FILES) $(RESOURCES)