diff options
author | unknown <lenz@mysql.com> | 2003-09-25 23:12:24 +0200 |
---|---|---|
committer | unknown <lenz@mysql.com> | 2003-09-25 23:12:24 +0200 |
commit | dd3af2257aa36cc6c7018e123641193d0fdaa722 (patch) | |
tree | af2612c92998500db3b06f89f20ab16c1ac57a4a /sql-bench/crash-me.sh | |
parent | 8090030700bf51f8598c0f7ac61c4d7bec1ddf28 (diff) | |
download | mariadb-git-dd3af2257aa36cc6c7018e123641193d0fdaa722.tar.gz |
- Improved portability of the sql-bench Perl scripts by replacing
the calls of external programs "uname" and "pwd" with Perl builtin
functions "cwd()" and "POSIX::uname()"
sql-bench/as3ap.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/bench-count-distinct.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/bench-init.pl.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
- portability fix: don't call external "uname" in various combinations,
use POSIX::uname() instead.
sql-bench/copy-db.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/crash-me.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
- portability fix: don't call external "uname" in various combinations,
use POSIX::uname() instead.
sql-bench/innotest1.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/innotest1a.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/innotest1b.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/innotest2.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/innotest2a.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/innotest2b.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/run-all-tests.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/test-ATIS.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/test-alter-table.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/test-big-tables.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/test-connect.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/test-create.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/test-insert.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/test-select.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/test-transactions.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
sql-bench/test-wisconsin.sh:
- portability fix: don't call external "pwd" command, use the "cwd()"
builtin function instead.
Diffstat (limited to 'sql-bench/crash-me.sh')
-rw-r--r-- | sql-bench/crash-me.sh | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/sql-bench/crash-me.sh b/sql-bench/crash-me.sh index ff649acdae4..00989fc0bc8 100644 --- a/sql-bench/crash-me.sh +++ b/sql-bench/crash-me.sh @@ -41,9 +41,11 @@ $version="1.61"; +use Cwd; use DBI; use Getopt::Long; -chomp($pwd = `pwd`); $pwd = "." if ($pwd eq ''); +use POSIX; +$pwd = cwd(); $pwd = "." if ($pwd eq ''); require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n"; $opt_server="mysql"; $opt_host="localhost"; $opt_database="test"; @@ -3247,24 +3249,8 @@ EOF sub machine { - $name= `uname -s -r -m`; - if ($?) - { - $name= `uname -s -m`; - } - if ($?) - { - $name= `uname -s`; - } - if ($?) - { - $name= `uname`; - } - if ($?) - { - $name="unknown"; - } - chomp($name); $name =~ s/[\n\r]//g; + my @name = POSIX::uname(); + my $name= $name[0] . " " . $name[2] . " " . $name[4]; return $name; } |