summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:21:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:21:29 +0000
commit29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc (patch)
tree63ef546b10a81d461e5cf5ed9e98a68cd7dee1aa /tests
parentInitial commit. (diff)
downloadkbuild-29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc.tar.xz
kbuild-29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc.zip
Adding upstream version 1:0.1.9998svn3589+dfsg.upstream/1%0.1.9998svn3589+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/Config.kmk95
-rw-r--r--tests/Makefile.kmk38
-rw-r--r--tests/dummy.c30
-rw-r--r--tests/dummy_defined_X.c43
-rw-r--r--tests/dummy_defined_Y.c39
-rw-r--r--tests/hello.c34
-rw-r--r--tests/inherit-bld/Config.kmk81
-rw-r--r--tests/inherit-bld/Makefile.kmk116
-rw-r--r--tests/inherit-misc/Makefile.kmk52
-rw-r--r--tests/inherit-misc/sdk51a-xz.kmk28
-rw-r--r--tests/inherit-target/Makefile.kmk90
-rw-r--r--tests/os2-implib/Makefile.kmk38
-rw-r--r--tests/os2-implib/os2-implib.def30
13 files changed, 714 insertions, 0 deletions
diff --git a/tests/Config.kmk b/tests/Config.kmk
new file mode 100644
index 0000000..e56d524
--- /dev/null
+++ b/tests/Config.kmk
@@ -0,0 +1,95 @@
+# $Id: Config.kmk 2413 2010-09-11 17:43:04Z bird $
+## @file
+# Tests - Configuration.
+#
+
+#
+# Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+#
+
+
+
+#
+# Template for building commandline tools.
+#
+TEMPLATE_TST = Commandline binary
+
+TEMPLATE_TST_INST = tests/
+ifeq ($(BUILD_TARGET),os2)
+ TEMPLATE_TST_TOOL = GCC3OMF
+ TEMPLATE_TST_CFLAGS.profile = -pg
+ TEMPLATE_TST_CFLAGS.release = -O3
+ TEMPLATE_TST_LDFLAGS = -Zhigh-mem -Zstack=1024
+endif
+
+ifeq ($(BUILD_TARGET),darwin)
+ TEMPLATE_TST_TOOL = GCC4MACHO
+ TEMPLATE_TST_CFLAGS.profile =
+ TEMPLATE_TST_CFLAGS.release = -O3
+ TEMPLATE_TST_LDFLAGS =
+endif
+
+ifeq ($(filter-out win nt,$(BUILD_TARGET)),)
+ ifeq ($(BUILD_TARGET_ARCH),x86)
+ include $(PATH_KBUILD)/tools/VCC70.kmk # fixme! template expanding does something bad to _LIBS /me thinks.
+ TEMPLATE_TST_TOOL = VCC70
+ else ifeq ($(BUILD_TARGET_ARCH),amd64)
+ TEMPLATE_TST_TOOL = VCC80AMD64
+ TEMPLATE_TST_DEFS = _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_WARNINGS
+ endif
+ TEMPLATE_TST_SDKS = WINPSDK
+ TEMPLATE_TST_CFLAGS = -W3 -Zi -Zl
+ TEMPLATE_TST_CFLAGS.release = -O2
+ TEMPLATE_TST_CFLAGS.profile = -O2 -GH -Gh
+ TEMPLATE_TST_LDFLAGS = /SUBSYSTEM:console /INCREMENTAL:no /NOD /DEBUG
+ TEMPLATE_TST_CFLAGS += -MD
+ TEMPLATE_TST_LIBS = \
+ $(PATH_TOOL_$(TEMPLATE_TST_TOOL)_LIB)/oldnames.lib \
+ $(PATH_TOOL_$(TEMPLATE_TST_TOOL)_LIB)/msvcrt.lib
+ TEMPLATE_TST_LIBS.profile = Y:/coding/libc/svn/trunk/out/win.$(BUILD_TARGET_ARCH)/debug/kStuff/lib/kPrf2.lib
+endif
+
+ifndef TEMPLATE_TST_TOOL
+ # Use GCC3 when we're certain that the system is using GNU ld and ar.
+ ifeq ($(filter-out linux freebsd openbsd netbsd,$(BUILD_TARGET)),)
+ TEMPLATE_TST_TOOL = GCC3
+ else
+ TEMPLATE_TST_TOOL = GCC3PLAIN
+ endif
+ TEMPLATE_TST_CFLAGS.release = -O3
+ ifeq ($(BUILD_TARGET),solaris)
+ TEMPLATE_TST_CFLAGS.x86 += -m32
+ TEMPLATE_TST_CFLAGS.amd64 += -m64
+ TEMPLATE_TST_CXXFLAGS.x86 += -m32
+ TEMPLATE_TST_CXXFLAGS.amd64 += -m64
+ TEMPLATE_TST_LDFLAGS.x86 += -m32
+ TEMPLATE_TST_LDFLAGS.amd64 += -m64
+ TEMPLATE_TST_LDFLAGS += -Wl,-i
+ endif
+endif
+
+#
+# Template for building libraries for the tools.
+#
+TEMPLATE_TSTLIB = Library for Commandline binary
+TEMPLATE_TSTLIB_EXTENDS = BIN
+TEMPLATE_TSTLIB_INST = lib/
+
+
diff --git a/tests/Makefile.kmk b/tests/Makefile.kmk
new file mode 100644
index 0000000..d36a5ed
--- /dev/null
+++ b/tests/Makefile.kmk
@@ -0,0 +1,38 @@
+# $Id: Makefile.kmk 2420 2010-10-17 00:33:38Z bird $
+## @file
+# Tests - Top Level Makefile.
+#
+
+#
+# Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+#
+
+
+include $(PATH_KBUILD)/header.kmk
+
+SUBDIRS = \
+ inherit-target \
+ inherit-bld \
+ inherit-misc \
+
+SUBDIRS.os2 = \
+ os2-impdef
+
+include $(FILE_KBUILD_FOOTER)
diff --git a/tests/dummy.c b/tests/dummy.c
new file mode 100644
index 0000000..535f0a2
--- /dev/null
+++ b/tests/dummy.c
@@ -0,0 +1,30 @@
+/* $Id: dummy.c 2413 2010-09-11 17:43:04Z bird $ */
+/** @file
+ * Tests - Dummy test program.
+ */
+
+/*
+ * Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+int main()
+{
+ return 0;
+}
diff --git a/tests/dummy_defined_X.c b/tests/dummy_defined_X.c
new file mode 100644
index 0000000..7f2415c
--- /dev/null
+++ b/tests/dummy_defined_X.c
@@ -0,0 +1,43 @@
+/* $Id: dummy_defined_X.c 2413 2010-09-11 17:43:04Z bird $ */
+/** @file
+ * Tests - Dummy test program checking that X == 42, possibly doing this via y.
+ */
+
+/*
+ * Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef X
+# error "X isn't defined, test the is busted."
+#endif
+
+#ifndef y
+# define y 42
+#endif
+
+#if X != 42
+# error "X != 42"
+#endif
+
+int main()
+{
+ return 0;
+}
+
diff --git a/tests/dummy_defined_Y.c b/tests/dummy_defined_Y.c
new file mode 100644
index 0000000..5e6b6e5
--- /dev/null
+++ b/tests/dummy_defined_Y.c
@@ -0,0 +1,39 @@
+/* $Id: dummy_defined_Y.c 2413 2010-09-11 17:43:04Z bird $ */
+/** @file
+ * Tests - Dummy test program checking that Y == 42.
+ */
+
+/*
+ * Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef Y
+# error "Y isn't defined, test the is busted."
+#endif
+
+#if Y != 42
+# error "Y != 42"
+#endif
+
+int main()
+{
+ return 0;
+}
+
diff --git a/tests/hello.c b/tests/hello.c
new file mode 100644
index 0000000..1785b95
--- /dev/null
+++ b/tests/hello.c
@@ -0,0 +1,34 @@
+/* $Id: hello.c 2413 2010-09-11 17:43:04Z bird $ */
+/** @file
+ * Tests - Hello world test program.
+ */
+
+/*
+ * Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+ *
+ * This file is part of kBuild.
+ *
+ * kBuild is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kBuild is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with kBuild; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <stdio.h>
+
+int main()
+{
+ printf("hello world\n");
+ return 0;
+}
+
diff --git a/tests/inherit-bld/Config.kmk b/tests/inherit-bld/Config.kmk
new file mode 100644
index 0000000..baa3e28
--- /dev/null
+++ b/tests/inherit-bld/Config.kmk
@@ -0,0 +1,81 @@
+# $Id: Config.kmk 2413 2010-09-11 17:43:04Z bird $
+## @file
+# Tests - Build Type Inheritance.
+#
+# Just to set up some additional build types the correct way.
+#
+
+#
+# Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+#
+
+
+#
+# Include our parent Config.kmk
+#
+include $(PATH_ROOT)/tests/Config.kmk
+
+
+#
+# For inherit-bld3 - no inheritance.
+#
+KBUILD_BLD_TYPES += dbgbld3
+
+
+#
+# For inherit-bld4 - default inheritance (override).
+#
+KBUILD_BLD_TYPES += dbgbld4
+BLD_TYPE_dbgbld4_EXTENDS = dbgbld3
+
+#
+# For inherit-bld5 - appending inheritance.
+#
+KBUILD_BLD_TYPES += dbgbld5
+BLD_TYPE_dbgbld5_EXTENDS = dbgbld3
+BLD_TYPE_dbgbld5_EXTENDS_BY = appending
+
+#
+# For inherit-bld6 - prepending inheritance.
+#
+KBUILD_BLD_TYPES += dbgbld6
+BLD_TYPE_dbgbld6_EXTENDS = dbgbld3
+BLD_TYPE_dbgbld6_EXTENDS_BY = prepending
+
+#
+# For inherit-bld7 - overriding inheritance.
+#
+KBUILD_BLD_TYPES += dbgbld7
+BLD_TYPE_dbgbld7_EXTENDS = dbgbld3
+BLD_TYPE_dbgbld7_EXTENDS_BY = overriding
+
+#
+# For inherit-bld10 thru 19 - overriding inheritance.
+#
+KBUILD_BLD_TYPES += dbgbld10 dbgbld11
+BLD_TYPE_dbgbld11_EXTENDS = dbgbld10
+
+#
+# For inherit-bld20 thru 29 - prepending inheritance.
+#
+KBUILD_BLD_TYPES += dbgbld20 dbgbld21
+BLD_TYPE_dbgbld21_EXTENDS = dbgbld20
+BLD_TYPE_dbgbld21_EXTENDS_BY = prepending
+
diff --git a/tests/inherit-bld/Makefile.kmk b/tests/inherit-bld/Makefile.kmk
new file mode 100644
index 0000000..919f5c2
--- /dev/null
+++ b/tests/inherit-bld/Makefile.kmk
@@ -0,0 +1,116 @@
+# $Id: Makefile.kmk 2413 2010-09-11 17:43:04Z bird $
+## @file
+# Test - Build Type Inheritance.
+#
+
+#
+# Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+#
+
+
+DEPTH = ../..
+include $(PATH_KBUILD)/header.kmk
+
+
+# Plain setup just for a reality check.
+PROGRAMS += inherit-bld1
+inherit-bld1_TEMPLATE = TST
+inherit-bld1_DEFS = X=y
+inherit-bld1_SOURCES = ../dummy_defined_X.c
+
+# Test that the BLD_TYPE feature works.
+PROGRAMS += inherit-bld2
+inherit-bld2_TEMPLATE = TST
+inherit-bld2_BLD_TYPE = debug
+inherit-bld2_DEFS.debug = X=y
+inherit-bld2_SOURCES = ../dummy_defined_X.c
+
+# Test that an simple alternative build type works.
+PROGRAMS += inherit-bld3
+inherit-bld3_TEMPLATE = TST
+inherit-bld3_BLD_TYPE = dbgbld3
+inherit-bld3_DEFS.dbgbld3 = X=y
+inherit-bld3_SOURCES = ../dummy_defined_X.c
+
+# Test that default build type inheritance works - dbgbld4 extends dbgbld3.
+PROGRAMS += inherit-bld4
+inherit-bld4_TEMPLATE = TST
+inherit-bld4_BLD_TYPE = dbgbld4
+inherit-bld4_DEFS.dbgbld3 = X=y
+inherit-bld4_SOURCES = ../dummy_defined_X.c
+
+# Test that appending build type inheritance works - dbgbld5 extends dbgbld3.
+PROGRAMS += inherit-bld5
+inherit-bld5_TEMPLATE = TST
+inherit-bld5_BLD_TYPE = dbgbld5
+inherit-bld5_DEFS.dbgbld3 = X=y y=0
+inherit-bld5_DEFS.dbgbld5 = y=42
+inherit-bld5_SOURCES = ../dummy_defined_X.c
+
+# Test that prepending build type inheritance works - dbgbld6 extends dbgbld3.
+PROGRAMS += inherit-bld6
+inherit-bld6_TEMPLATE = TST
+inherit-bld6_BLD_TYPE = dbgbld6
+inherit-bld6_DEFS.dbgbld3 = X=y y=42
+inherit-bld6_DEFS.dbgbld6 = y=0
+inherit-bld6_SOURCES = ../dummy_defined_X.c
+
+
+#
+# Tests where we inherit from a target and force build type which
+# relies on inheritance. These are the fine points...
+#
+PROGRAMS += inherit-bld10
+inherit-bld10_TEMPLATE = TST
+inherit-bld10_BLD_TYPE = dbgbld11
+inherit-bld10_DEFS = X=y
+inherit-bld10_DEFS.dbgbld10 = y=42
+inherit-bld10_SOURCES = ../dummy_defined_X.c
+
+# Tests that target and build inheriting works together.
+PROGRAMS += inherit-bld11
+inherit-bld11_EXTENDS = inherit-bld10
+
+# Tests that dbgbld11 is picked from the target rather than the parent.
+PROGRAMS += inherit-bld12
+inherit-bld12_EXTENDS = inherit-bld10
+inherit-bld12_DEFS = y=0
+inherit-bld12_DEFS.dbgbld11 = X=z z=42
+
+# Tests that prepending works.
+PROGRAMS += inherit-bld20
+inherit-bld20_TEMPLATE = TST
+inherit-bld20_BLD_TYPE = dbgbld21
+inherit-bld20_DEFS = X=y
+inherit-bld20_DEFS.dbgbld20 = y=42
+inherit-bld20_DEFS.dbgbld21 = y=0
+#inherit-bld20_DEFS.dbgbld21 = y=0 y=42 <-- expected result.
+inherit-bld20_SOURCES = ../dummy_defined_X.c
+
+# Tests that prepending + target inheritance works as expected. funky!
+PROGRAMS += inherit-bld21
+inherit-bld21_EXTENDS = inherit-bld20
+inherit-bld21_DEFS.dbgbld20 = Y=y
+#inherit-bld21_DEFS.dbgbld21 = y=0 y=42 Y=y <-- expected result; dbgbld21 from parent + our dbgbld20.
+inherit-bld21_SOURCES = ../dummy_defined_Y.c
+
+
+include $(FILE_KBUILD_FOOTER)
+
diff --git a/tests/inherit-misc/Makefile.kmk b/tests/inherit-misc/Makefile.kmk
new file mode 100644
index 0000000..e83e503
--- /dev/null
+++ b/tests/inherit-misc/Makefile.kmk
@@ -0,0 +1,52 @@
+# $Id: Makefile.kmk 2413 2010-09-11 17:43:04Z bird $
+## @file
+# Test - Misc Inheritance.
+#
+
+#
+# Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+#
+
+
+DEPTH = ../..
+include $(PATH_KBUILD)/header.kmk
+
+#
+# Search for SDKs in the current directory.
+#
+KBUILD_SDK_PATHS := $(PATH_SUB_CURRENT)
+
+#
+# Tests for checking that prepending and appending of properties
+# that have been defined as simple variables work. Ticket #51.
+# (This is a little bit out of place, but so what.)
+#
+PROGRAMS += inherit-misc51a
+inherit-misc51a_TEMPLATE := tmpl51a
+inherit-misc51a_SDKS := sdk51a-xz
+inherit-misc51a_DEFS := X=z
+inherit-misc51a_SOURCES := ../dummy_defined_X.c
+
+TEMPLATE_tmpl51a = inherit-misc51 template
+TEMPLATE_tmpl51a_EXTENDS = TST
+TEMPLATE_tmpl51a_DEFS = $(SDK_sdk51a-xz_SPECIAL_DEFS)
+
+include $(FILE_KBUILD_FOOTER)
+
diff --git a/tests/inherit-misc/sdk51a-xz.kmk b/tests/inherit-misc/sdk51a-xz.kmk
new file mode 100644
index 0000000..ea3430e
--- /dev/null
+++ b/tests/inherit-misc/sdk51a-xz.kmk
@@ -0,0 +1,28 @@
+# $Id: sdk51a-xz.kmk 2413 2010-09-11 17:43:04Z bird $
+## @file
+# Test - Misc Inheritance Issues.
+#
+
+#
+# Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+#
+
+SDK_sdk51a-xz = for inherit-misc51a
+SDK_sdk51a-xz_SPECIAL_DEFS = z=42
diff --git a/tests/inherit-target/Makefile.kmk b/tests/inherit-target/Makefile.kmk
new file mode 100644
index 0000000..6691cf1
--- /dev/null
+++ b/tests/inherit-target/Makefile.kmk
@@ -0,0 +1,90 @@
+# $Id: Makefile.kmk 2413 2010-09-11 17:43:04Z bird $
+## @file
+# Test - Target Inheritance.
+#
+
+#
+# Copyright (c) 2008-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+#
+
+DEPTH = ../..
+include $(PATH_KBUILD)/header.kmk
+
+
+PROGRAMS += inherit-target1
+inherit-target1_TEMPLATE = TST
+inherit-target1_SOURCES = ../dummy_defined_X.c
+inherit-target1_DEFS = X=y
+
+PROGRAMS += inherit-target2
+inherit-target2_EXTENDS = inherit-target1
+
+PROGRAMS += inherit-target3
+inherit-target3_EXTENDS = inherit-target2
+
+PROGRAMS += inherit-target4
+inherit-target4_EXTENDS = inherit-target3
+
+PROGRAMS += inherit-target5
+inherit-target5_EXTENDS = inherit-target3
+
+# out of target order.
+PROGRAMS += inherit-target6
+inherit-target6_EXTENDS = inherit-target9
+
+PROGRAMS += inherit-target7
+inherit-target7_EXTENDS = inherit-target1
+
+PROGRAMS += inherit-target8
+inherit-target8_EXTENDS = inherit-target7
+
+PROGRAMS += inherit-target9
+inherit-target9_EXTENDS = inherit-target8
+
+
+# More complicated, with a couple of SDKs and TEMPLATES.
+SDK_inh1 = target inherit test sdk 1
+SDK_inh1_DEFS = Z=42
+
+SDK_inh2 = target inherit test sdk 2
+SDK_inh2_DEFS = Y=128
+
+SDK_inh3 = target inherit test sdk 3
+SDK_inh3_DEFS = P=42
+
+TEMPLATE_inh1 = target inherit test template 1
+TEMPLATE_inh1_EXTENDS = TST
+TEMPLATE_inh1_DEFS = Q=256
+
+PROGRAMS += inherit-target10
+inherit-target10_TEMPLATE = inh1
+inherit-target10_SOURCES = ../dummy_defined_X.c
+inherit-target10_SDKS = inh1 inh2
+inherit-target10_DEFS = X=Z
+
+PROGRAMS += inherit-target11
+inherit-target11_EXTENDS = inherit-target10
+inherit-target11_SOURCES = ../dummy_defined_Y.c
+inherit-target11_SDKS = inh3
+inherit-target11_DEFS = Y=P
+
+
+include $(FILE_KBUILD_FOOTER)
+
diff --git a/tests/os2-implib/Makefile.kmk b/tests/os2-implib/Makefile.kmk
new file mode 100644
index 0000000..ec43222
--- /dev/null
+++ b/tests/os2-implib/Makefile.kmk
@@ -0,0 +1,38 @@
+# $Id: Makefile.kmk 2413 2010-09-11 17:43:04Z bird $
+## @file
+# Tests - OS/2 import library.
+#
+
+#
+# Copyright (c) 2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+#
+
+
+DEPTH = ../..
+include $(PATH_KBUILD)/header.kmk
+ifeq ($(KBUILD_HOST),os2)
+
+LIBRARIES = os2-implib-1
+os2-implib-1_TOOL = GCC3OMF
+os2-implib-1_SOURCES = os2-implib.def
+
+endif
+include $(FILE_KBUILD_FOOTER)
+
diff --git a/tests/os2-implib/os2-implib.def b/tests/os2-implib/os2-implib.def
new file mode 100644
index 0000000..f3b6a90
--- /dev/null
+++ b/tests/os2-implib/os2-implib.def
@@ -0,0 +1,30 @@
+; $Id: Makefile.kmk 2413 2010-09-11 17:43:04Z bird $
+;; @file
+; Tests - OS/2 import library definitions.
+;
+
+;
+; Copyright (c) 2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+;
+; This file is part of kBuild.
+;
+; kBuild is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or
+; (at your option) any later version.
+;
+; kBuild is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with kBuild; if not, write to the Free Software
+; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+;
+
+LIBRARY os2dll
+EXPORTS
+ SomeFunction1
+ SomeFunction2
+