VirtualBox

source: kBuild/trunk/src/kmk/testcase-xargs.kmk@ 2016

Last change on this file since 2016 was 822, checked in by bird, 18 years ago

eol-style and keywords

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1# $Id: testcase-xargs.kmk 822 2007-02-01 05:47:18Z bird $
2## @file
3#
4# kBuild - testcase for the xargs function.
5# Requires manual inspection of the output.
6#
7# Copyright (c) 2007 knut st. osmundsen <[email protected]>
8#
9#
10# This file is part of kLdr.
11#
12# kLdr is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2 of the License, or
15# (at your option) any later version.
16#
17# kLdr is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with kLdr; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25#
26#
27
28DEPTH = ../..
29include $(PATH_KBUILD)/header.kmk
30
31ifneq ($(not 1),)
32 $(error The 'not' function is missing)
33endif
34ifneq ($(eq 1,1),1)
35 $(error The 'eq' function is missing)
36endif
37
38
39ASSERT_TRUE = $(if $(not $(1)),$(error failure: '$(1)' isn't true))
40ASSERT_FALSE = $(if $(1) ,$(error failure: '$(1)' isn't false))
41
42# 94 bytes
43ONEARG = abcdefghijklmnopqrstuvwxyz_abcdefghijklmnopqrstuvwxyz_abcdefghijklmnopqrstuvwxyz_xxxxxxxxxxxx
44ITERATIONS := 0 1 2 3 4 5 6 7 8 9
45ITERATIONS := $(foreach i, 0 1 2 3 4 5 6 7 8 9,$(addprefix $(i),$(ITERATIONS)))
46ITERATIONS := $(foreach i, 0 1 2 3 4 5 6 7 8 9,$(addprefix $(i),$(ITERATIONS)))
47ITERATIONS := $(foreach i, 0 1 2 3 4 5 6 7 8 9,$(addprefix $(i),$(ITERATIONS)))
48ITERATIONS := $(foreach i, 0 1 2 3 4 5 6 7 8 9,$(addprefix $(i),$(ITERATIONS)))
49
50# add a 5 bytes sequence number and a space, then duplicate it 10000 times:
51# 100 bytes * 10000 = 1,000,000 bytes.
52REALLY_LONG := $(foreach i,$(ITERATIONS),$(i)$(ONEARG))
53
54
55#$(call ASSERT_TRUE, $(xargs $(ECHO) 1:, $(ECHO) 2:, $(ECHO) 3:, asdf asdf asdf asdf asdf asdf asdf adf asdf asdf))
56
57all_recursive:
58 $(xargs @$(ECHO_EXT) 1:, @$(ECHO_EXT) 2:, @$(ECHO_EXT) 3:, $(REALLY_LONG))
59 $(ECHO) done
60
Note: See TracBrowser for help on using the repository browser.

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