VirtualBox

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

最後變更 在這個檔案從2284是 2284,由 bird 提交於 16 年 前

kash/tests: more tests.

  • 屬性 svn:eol-style 設為 LF
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.7 KB
 
1# $Id: Makefile.kmk 2284 2009-02-25 03:58:14Z 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 )
46
47
48kash_tests::
49 $(ECHO) "kash tests..."
50 @export KASH_TEST_DIR=$(KASH_TEST_DIR); \
51 KASH_FAILURE=0; \
52 $(foreach test,$(KASH_TESTCASES)\
53 ,echo " * $(KASH_TEST_BIN) $(test)"; \
54 if ! $(KASH_TEST_BIN) $(test); then \
55 echo " => FAILURE!"; \
56 KASH_FAILURE=`$(EXPR_EXT) $${KASH_FAILURE} + 1`; \
57 fi; \
58 ) \
59 if test $$KASH_FAILURE -eq 0; then \
60 echo 'kash tests: All tests succeeded.'; \
61 else \
62 echo "kash tests: $$KASH_FAILURE kash test failed"'!!'; \
63 exit 1; \
64 fi
65
66
67
68include $(FILE_KBUILD_SUB_FOOTER)
69
70
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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