• introduce a virtual TARGET_OS=Android that just sets a check category
and switches to the TARGET_OS=Linux • introduce android as regression test suite category • add an android specific standard alias • clean up redundant ‘-o sh’ arg in a few checks
This commit is contained in:
parent
750ad16f3d
commit
79c6d6043e
8
Build.sh
8
Build.sh
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.473 2011/03/16 20:03:21 tg Exp $'
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.474 2011/03/16 20:26:33 tg Exp $'
|
||||
#-
|
||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
# Thorsten Glaser <tg@mirbsd.org>
|
||||
@ -391,6 +391,12 @@ ccpl=-Wl,
|
||||
tsts=
|
||||
ccpr='|| for _f in ${tcfn}*; do test x"${_f}" = x"mksh.1" || rm -f "${_f}"; done'
|
||||
|
||||
# Evil hack
|
||||
if test x"$TARGET_OS" = x"Android"; then
|
||||
check_categories=$check_categories,android
|
||||
TARGET_OS=Linux
|
||||
fi
|
||||
|
||||
# Configuration depending on OS revision, on OSes that need them
|
||||
case $TARGET_OS in
|
||||
QNX)
|
||||
|
81
check.t
81
check.t
@ -1,4 +1,4 @@
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.427 2011/03/13 17:07:08 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.428 2011/03/16 20:26:34 tg Exp $
|
||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
||||
@ -25,7 +25,7 @@
|
||||
# http://www.research.att.com/~gsf/public/ifs.sh
|
||||
|
||||
expected-stdout:
|
||||
@(#)MIRBSD KSH R39 2011/03/13
|
||||
@(#)MIRBSD KSH R39 2011/03/16
|
||||
description:
|
||||
Check version of shell.
|
||||
stdin:
|
||||
@ -5505,7 +5505,7 @@ expected-stdout:
|
||||
name: aliases-1
|
||||
description:
|
||||
Check if built-in shell aliases are okay
|
||||
category: !arge
|
||||
category: !android,!arge
|
||||
stdin:
|
||||
alias
|
||||
typeset -f
|
||||
@ -5546,6 +5546,28 @@ expected-stdout:
|
||||
source='PATH=$PATH:. command .'
|
||||
type='whence -v'
|
||||
---
|
||||
name: aliases-1-android
|
||||
description:
|
||||
Check if built-in shell aliases are okay
|
||||
category: android
|
||||
stdin:
|
||||
alias
|
||||
typeset -f
|
||||
expected-stdout:
|
||||
autoload='typeset -fu'
|
||||
functions='typeset -f'
|
||||
hash='alias -t'
|
||||
history='fc -l'
|
||||
integer='typeset -i'
|
||||
local=typeset
|
||||
login='exec login'
|
||||
lsmod='cat /proc/modules'
|
||||
nameref='typeset -n'
|
||||
nohup='nohup '
|
||||
r='fc -e -'
|
||||
source='PATH=$PATH:. command .'
|
||||
type='whence -v'
|
||||
---
|
||||
name: aliases-2a
|
||||
description:
|
||||
Check if “set -o sh” disables built-in aliases (except a few)
|
||||
@ -5562,7 +5584,6 @@ name: aliases-3a
|
||||
description:
|
||||
Check if running as sh disables built-in aliases (except a few)
|
||||
category: disabled
|
||||
arguments: !-o!sh!
|
||||
stdin:
|
||||
cp "$__progname" sh
|
||||
./sh -c 'alias; typeset -f'
|
||||
@ -5574,7 +5595,7 @@ expected-stdout:
|
||||
name: aliases-2b
|
||||
description:
|
||||
Check if “set -o sh” does not influence built-in aliases
|
||||
category: !arge
|
||||
category: !android,!arge
|
||||
arguments: !-o!sh!
|
||||
stdin:
|
||||
alias
|
||||
@ -5598,8 +5619,7 @@ expected-stdout:
|
||||
name: aliases-3b
|
||||
description:
|
||||
Check if running as sh does not influence built-in aliases
|
||||
category: !arge
|
||||
arguments: !-o!sh!
|
||||
category: !android,!arge
|
||||
stdin:
|
||||
cp "$__progname" sh
|
||||
./sh -c 'alias; typeset -f'
|
||||
@ -5646,7 +5666,6 @@ name: aliases-3b-hartz4
|
||||
description:
|
||||
Check if running as sh does not influence built-in aliases
|
||||
category: arge
|
||||
arguments: !-o!sh!
|
||||
stdin:
|
||||
cp "$__progname" sh
|
||||
./sh -c 'alias; typeset -f'
|
||||
@ -5665,6 +5684,52 @@ expected-stdout:
|
||||
source='PATH=$PATH:. command .'
|
||||
type='whence -v'
|
||||
---
|
||||
name: aliases-2b-android
|
||||
description:
|
||||
Check if “set -o sh” does not influence built-in aliases
|
||||
category: android
|
||||
arguments: !-o!sh!
|
||||
stdin:
|
||||
alias
|
||||
typeset -f
|
||||
expected-stdout:
|
||||
autoload='typeset -fu'
|
||||
functions='typeset -f'
|
||||
hash='alias -t'
|
||||
history='fc -l'
|
||||
integer='typeset -i'
|
||||
local=typeset
|
||||
login='exec login'
|
||||
lsmod='cat /proc/modules'
|
||||
nameref='typeset -n'
|
||||
nohup='nohup '
|
||||
r='fc -e -'
|
||||
source='PATH=$PATH:. command .'
|
||||
type='whence -v'
|
||||
---
|
||||
name: aliases-3b-android
|
||||
description:
|
||||
Check if running as sh does not influence built-in aliases
|
||||
category: android
|
||||
stdin:
|
||||
cp "$__progname" sh
|
||||
./sh -c 'alias; typeset -f'
|
||||
rm -f sh
|
||||
expected-stdout:
|
||||
autoload='typeset -fu'
|
||||
functions='typeset -f'
|
||||
hash='alias -t'
|
||||
history='fc -l'
|
||||
integer='typeset -i'
|
||||
local=typeset
|
||||
login='exec login'
|
||||
lsmod='cat /proc/modules'
|
||||
nameref='typeset -n'
|
||||
nohup='nohup '
|
||||
r='fc -e -'
|
||||
source='PATH=$PATH:. command .'
|
||||
type='whence -v'
|
||||
---
|
||||
name: aliases-funcdef-1
|
||||
description:
|
||||
Check if POSIX functions take precedences over aliases
|
||||
|
7
main.c
7
main.c
@ -33,7 +33,7 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.181 2011/03/13 16:03:52 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.182 2011/03/16 20:26:35 tg Exp $");
|
||||
|
||||
extern char **environ;
|
||||
|
||||
@ -70,7 +70,10 @@ static const char *initcoms[] = {
|
||||
/* not "alias -t --": hash -r needs to work */
|
||||
"hash=alias -t",
|
||||
"type=whence -v",
|
||||
#if !defined(ANDROID) && !defined(MKSH_UNEMPLOYED)
|
||||
#if defined(ANDROID)
|
||||
/* evil hack */
|
||||
"lsmod='cat /proc/modules'",
|
||||
#elif !defined(MKSH_UNEMPLOYED)
|
||||
/* not in Android for political reasons */
|
||||
/* not in ARGE mksh due to no job control */
|
||||
"stop=kill -STOP",
|
||||
|
4
sh.h
4
sh.h
@ -154,9 +154,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.445 2011/03/13 16:03:53 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.446 2011/03/16 20:26:36 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R39 2011/03/13"
|
||||
#define MKSH_VERSION "R39 2011/03/16"
|
||||
|
||||
#ifndef MKSH_INCLUDES_ONLY
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user