VirtualBox

source: kBuild/trunk/src/kash/tests/Makefile.kmk@ 2288

Last change on this file since 2288 was 2288, checked in by bird, 16 years ago

kash: more windows hacking.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1# $Id: Makefile.kmk 2288 2009-02-25 06:21:10Z bird $
2## @file
3# Sub-makefile for kash tests.
4#
5
6#
7# Copyright (c) 2005-2009 knut st. osmundsen <[email protected]>
8#
9# This file is part of kBuild.
10#
11# kBuild is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 3 of the License, or
14# (at your option) any later version.
15#
16# kBuild is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with kBuild. If not, see <http://www.gnu.org/licenses/>
23#
24#
25
26SUB_DEPTH = ../..
27include $(KBUILD_PATH)/subheader.kmk
28
29#
30# The program.
31#
32
33TESTING += kash_tests
34
35KASH_TEST_BIN = $(if $(kash_1_TARGET),$(kash_1_TARGET),$(PATH_INS)/$(TEMPLATE_BIN_INST)kash$(SUFF_EXE))
36KASH_TEST_DIR := $(PATH_SUB_CURRENT)
37KASH_TESTCASES := $(addprefix $(KASH_TEST_DIR)/,\
38 trap-exit-1 \
39 trap-int-1 \
40 trap-term-1 \
41 tick-1 \
42 redirect-1 \
43 redirect-2 \
44 redirect-3 \
45 pipe-1 \
46 pipe-2 \
47 )
48
49
50kash_tests::
51 $(ECHO) "kash tests..."
52 @export KASH_TEST_DIR=$(KASH_TEST_DIR); \
53 KASH_FAILURE=0; \
54 $(foreach test,$(KASH_TESTCASES)\
55 ,echo " * $(KASH_TEST_BIN) $(test)"; \
56 if ! $(KASH_TEST_BIN) $(test); then \
57 echo " => FAILURE!"; \
58 KASH_FAILURE=`$(EXPR_EXT) $${KASH_FAILURE} + 1`; \
59 fi; \
60 ) \
61 if test $$KASH_FAILURE -eq 0; then \
62 echo 'kash tests: All tests succeeded.'; \
63 else \
64 echo "kash tests: $$KASH_FAILURE tests failed"'!!'; \
65 echo ""; \
66 exit 1; \
67 fi
68
69
70
71include $(FILE_KBUILD_SUB_FOOTER)
72
73
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette