mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
Test requirements added.
Updates to *-local-* tests so they can run on different computers.
This commit is contained in:
parent
d0dc1f9bd7
commit
9d1e2df9b9
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2016
|
||||
# Ole Tange and Free Software Foundation, Inc.
|
||||
|
@ -18,6 +18,43 @@
|
|||
# or write to the Free Software Foundation, Inc., 51 Franklin St,
|
||||
# Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
while test $# -gt 0; do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-i|--install)
|
||||
grep env_parallel.bash $HOME/.bashrc 2>/dev/null ||
|
||||
echo '. `which env_parallel.bash`' >> $HOME/.bashrc
|
||||
grep env_parallel.zsh $HOME/.zshenv 2>/dev/null ||
|
||||
echo '. `which env_parallel.zsh`' >> $HOME/.zshenv
|
||||
mkdir -p $HOME/.config/fish
|
||||
grep env_parallel.fish $HOME/.config/fish/config.fish 2>/dev/null ||
|
||||
echo '. (which env_parallel.fish)' >> $HOME/.config/fish/config.fish
|
||||
grep env_parallel.ksh $HOME/.kshrc 2>/dev/null ||
|
||||
echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc
|
||||
grep env_parallel.pdksh $HOME/.profile 2>/dev/null ||
|
||||
echo 'source `which env_parallel.pdksh`' >> $HOME/.profile
|
||||
grep env_parallel.csh $HOME/.cshrc 2>/dev/null ||
|
||||
echo 'source `which env_parallel.csh`' >> $HOME/.cshrc
|
||||
grep env_parallel.tcsh $HOME/.tcshrc 2>/dev/null ||
|
||||
echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc
|
||||
echo 'Installed env_parallel in: '
|
||||
echo " " $HOME/.bashrc
|
||||
echo " " $HOME/.zshenv
|
||||
echo " " $HOME/.config/fish/config.fish
|
||||
echo " " $HOME/.kshrc
|
||||
echo " " $HOME/.profile
|
||||
echo " " $HOME/.cshrc
|
||||
echo " " $HOME/.tcshrc
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $key"
|
||||
;;
|
||||
esac
|
||||
shift # past argument or value
|
||||
done
|
||||
|
||||
|
||||
cat <<_EOS
|
||||
env_parallel only works if it is a function. Do the below and restart your shell.
|
||||
|
@ -31,9 +68,9 @@ zsh: Put this in $HOME/.zshrc: . `which env_parallel.zsh`
|
|||
Supports: functions, variables, arrays
|
||||
|
||||
fish: Put this in $HOME/.config/fish/config.fish:
|
||||
source (which env_parallel.fish)
|
||||
. (which env_parallel.fish)
|
||||
E.g. by doing:
|
||||
echo 'source (which env_parallel.fish)' >> $HOME/.config/fish/config.fish
|
||||
echo '. (which env_parallel.fish)' >> $HOME/.config/fish/config.fish
|
||||
Supports: aliases, functions, variables, arrays
|
||||
|
||||
ksh: Put this in $HOME/.kshrc: source `which env_parallel.ksh`
|
||||
|
@ -52,6 +89,10 @@ tcsh: Put this in $HOME/.tcshrc: source `which env_parallel.tcsh`
|
|||
E.g. by doing: echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc
|
||||
Supports: aliases, variables, arrays with no special chars
|
||||
|
||||
To install in all shells run:
|
||||
|
||||
env_parallel --install
|
||||
|
||||
For details: see man env_parallel
|
||||
|
||||
_EOS
|
||||
|
|
|
@ -48,7 +48,7 @@ function env_parallel
|
|||
# Convert scalar vars to fish \XX quoting
|
||||
eval (set -L | perl -ne 'chomp;
|
||||
($name,$val)=split(/ /,$_,2);
|
||||
$name=~/^(COLUMNS|FISH_VERSION|LINES|PWD|SHLVL|_|history|status|version)$/ and next;
|
||||
$name=~/^(HOME|USER|COLUMNS|FISH_VERSION|LINES|PWD|SHLVL|_|history|status|version)$/ and next;
|
||||
if($val=~/^'"'"'/) { next; }
|
||||
print "set $name \"\$$name\";\n";
|
||||
')
|
||||
|
@ -68,7 +68,7 @@ function env_parallel
|
|||
chop;
|
||||
($name,$val)=split(/ /,$_,2);
|
||||
# Ignore read-only vars
|
||||
$name=~/^(COLUMNS|FISH_VERSION|LINES|PWD|SHLVL|_|history|status|version)$/ and next;
|
||||
$name=~/^(HOME|USER|COLUMNS|FISH_VERSION|LINES|PWD|SHLVL|_|history|status|version)$/ and next;
|
||||
# Quote $val
|
||||
$val=~s/[\002-\011\013-\032\\\#\?\`\(\)\{\}\[\]\^\*\<\=\>\~\|\; \"\!\$\&\202-\377]/\\\$&/go;
|
||||
# Quote single quote
|
||||
|
|
|
@ -3425,9 +3425,9 @@ sub reaper {
|
|||
}
|
||||
my $sshlogin = $job->sshlogin();
|
||||
$sshlogin->dec_jobs_running();
|
||||
$sshlogin->inc_jobs_completed();
|
||||
if(not $job->should_be_retried()) {
|
||||
# The job is done
|
||||
$sshlogin->inc_jobs_completed();
|
||||
# Free the jobslot
|
||||
$job->free_slot();
|
||||
if($opt::timeout) {
|
||||
|
@ -9145,6 +9145,9 @@ sub tmux_length {
|
|||
# If $opt::tmux set, find the limit for tmux
|
||||
# tmux 1.8 has a 2kB limit
|
||||
# tmux 1.9 has a 16kB limit
|
||||
# tmux 2.0 has a 16kB limit
|
||||
# tmux 2.1 has a 16kB limit
|
||||
# tmux 2.2 has a 16kB limit
|
||||
# Input:
|
||||
# $len = maximal command line length
|
||||
# Returns:
|
||||
|
|
|
@ -637,6 +637,9 @@ Show the estimated number of seconds before finishing. This forces GNU
|
|||
B<parallel> to read all jobs before starting to find the number of
|
||||
jobs. GNU B<parallel> normally only reads the next job to run.
|
||||
|
||||
The estimate is based on the runtime of finished jobs, so the first
|
||||
estimate will only be shown when the first job has finished.
|
||||
|
||||
Implies B<--progress>.
|
||||
|
||||
See also: B<--bar>, B<--progress>.
|
||||
|
@ -1401,6 +1404,8 @@ in two files: I<prefix>/<ARGS>/stdout and I<prefix>/<ARGS>/stderr, where
|
|||
source (if using B<--header :>) or the number of the input source and
|
||||
corresponding values.
|
||||
|
||||
I<prefix> can contain replacement strings.
|
||||
|
||||
E.g:
|
||||
|
||||
parallel --header : --results foo echo {a} {b} \
|
||||
|
@ -1432,6 +1437,25 @@ will generate the files:
|
|||
foo/1/II/2/IIII/stderr
|
||||
foo/1/II/2/IIII/stdout
|
||||
|
||||
and
|
||||
|
||||
parallel --results foo-{1} echo {1} {2} ::: I II ::: III IIII
|
||||
|
||||
will generate the files:
|
||||
|
||||
foo-I/1/I/2/IIII/seq
|
||||
foo-I/1/I/2/IIII/stderr
|
||||
foo-I/1/I/2/IIII/stdout
|
||||
foo-I/1/I/2/III/seq
|
||||
foo-I/1/I/2/III/stderr
|
||||
foo-I/1/I/2/III/stdout
|
||||
foo-II/1/II/2/IIII/seq
|
||||
foo-II/1/II/2/IIII/stderr
|
||||
foo-II/1/II/2/IIII/stdout
|
||||
foo-II/1/II/2/III/seq
|
||||
foo-II/1/II/2/III/stderr
|
||||
foo-II/1/II/2/III/stdout
|
||||
|
||||
If you do not want the dir structure, try B<--files> B<--tag> instead.
|
||||
|
||||
See also B<--files>, B<--tag>, B<--header>, B<--joblog>.
|
||||
|
|
2
src/sql
2
src/sql
|
@ -649,7 +649,7 @@ sub mysql_commands {
|
|||
my $host = defined($opt{'host'}) ? "--host=".$opt{'host'} : "";
|
||||
my $port = defined($opt{'port'}) ? "--port=".$opt{'port'} : "";
|
||||
my $user = defined($opt{'user'}) ? "--user=".$opt{'user'} : "";
|
||||
my $database = defined($opt{'database'}) ? $opt{'database'} : "";
|
||||
my $database = defined($opt{'database'}) ? $opt{'database'} : $ENV{'USER'};
|
||||
my $html = defined($::opt_html) ? "--html" : "";
|
||||
my $no_headers = defined($::opt_n) ? "--skip-column-names" : "";
|
||||
my $ssl = "";
|
||||
|
|
|
@ -49,7 +49,7 @@ prereqlocal: installparallel
|
|||
timeout 5 ssh csh@lo true || (echo ssh csh@lo is required for testsuite; /bin/false)
|
||||
|
||||
prereqremote: installparallel startvm
|
||||
parallel --timeout 10 --tag ssh parallel@parallel-server{} parallel --minversion 20121021 ::: 1 2 3 || (echo parallel on remote required for testsuite; /bin/true)
|
||||
parallel -j0 --timeout 10 --tag ssh parallel@parallel-server{} parallel --minversion 20121021 ::: 1 2 3 || (echo parallel on remote required for testsuite; /bin/true)
|
||||
|
||||
startvm:
|
||||
# Make sure we can reach the virtual machines
|
||||
|
|
95
testsuite/REQUIREMENTS
Normal file
95
testsuite/REQUIREMENTS
Normal file
|
@ -0,0 +1,95 @@
|
|||
#!/bin/bash
|
||||
|
||||
mysqlrootpass=${mysqlrootpass:-FoOo}
|
||||
|
||||
# The testsuite depends on this:
|
||||
|
||||
sudo aptitude install imagemagick expect autossh
|
||||
|
||||
# DEBIAN package
|
||||
sudo aptitude install dpkg-dev build-essential debhelper
|
||||
|
||||
|
||||
# DATABASES
|
||||
sudo aptitude install postgresql mysql-server
|
||||
sudo su - postgres -c 'createdb '`whoami`
|
||||
sudo su - postgres -c 'createuser '`whoami`
|
||||
sudo su - postgres -c "sql pg:/// \"ALTER USER \\\"`whoami`\\\" WITH PASSWORD '`whoami`';\""
|
||||
|
||||
sudo su - mysql mysqladmin create `whoami`
|
||||
sql mysql://root:$mysqlrootpass@/mysql "CREATE DATABASE `whoami`;CREATE USER '`whoami`'@'localhost' IDENTIFIED BY '`whoami`'; GRANT ALL ON `whoami`.* TO '`whoami`'@'localhost';"
|
||||
|
||||
|
||||
# SHELLS
|
||||
sudo aptitude install ash csh fdclone fish fizsh ksh mksh pdksh posh rush sash tcsh yash zsh
|
||||
|
||||
SSHPASS=`goodpasswd`
|
||||
export SSHPASS
|
||||
shells="sh csh ash tcsh zsh ksh fish fizsh mksh pdksh posh rc sash yash nopathbash nopathcsh"
|
||||
create_shell_user() {
|
||||
shell="$1"
|
||||
sudo deluser $shell && sudo mv /home/$shell /tmp/$shell.$RANDOM
|
||||
sudo groupdel $shell
|
||||
sudo adduser --disabled-password --gecos "$shell for parallel,,," $shell &&
|
||||
echo "$shell:$SSHPASS" | sudo chpasswd &&
|
||||
sshpass -e ssh-copy-id $shell@lo &&
|
||||
echo "ssh-keyscan" &&
|
||||
ssh $shell@lo 'ssh-keyscan -t rsa lo >> .ssh/known_hosts' &&
|
||||
echo "chsh" &&
|
||||
sudo chsh -s $(which $shell || which ${shell#"nopath"}) $shell &&
|
||||
echo | ssh -t $shell@lo ssh-keygen &&
|
||||
ssh $shell@lo 'cat .ssh/id_rsa.pub >> .ssh/authorized_keys' &&
|
||||
ssh $shell@lo cat .ssh/id_rsa.pub | ssh parallel@lo 'cat >> .ssh/authorized_keys' &&
|
||||
ssh $shell@lo env_parallel --install
|
||||
}
|
||||
export -f create_shell_user
|
||||
parallel -u --timeout 15 --retries 2 --tag -j1 create_shell_user ::: $shells
|
||||
# sh fails if not run by itself
|
||||
parallel -u --timeout 15 --retries 2 --tag -j1 create_shell_user ::: sh
|
||||
parallel -j10 ssh {}@lo ssh {}@lo echo {} OK ::: $shells
|
||||
|
||||
(
|
||||
ssh parallel@lo 'ssh-keyscan -t rsa lo >> .ssh/known_hosts'
|
||||
ssh parallel@lo 'cat .ssh/id_rsa.pub >> .ssh/authorized_keys'
|
||||
)
|
||||
ssh_copy_id() {
|
||||
from="$1"
|
||||
to="$2"
|
||||
ssh $from cat .ssh/id_rsa.pub | ssh $to 'cat >> .ssh/authorized_keys'
|
||||
}
|
||||
export -f ssh_copy_id
|
||||
shellsplus="parallel $shells"
|
||||
parallel --bar -j200% --timeout 3 --retries 10 --tag ssh_copy_id {1}@lo {2}@lo ::: $shellsplus ::: $shellsplus
|
||||
parallel -j10 ssh {1}@lo ssh {2}@lo echo {} OK ::: $shellsplus ::: $shellsplus
|
||||
|
||||
# change paths to no path
|
||||
(
|
||||
ssh nopathbash@lo 'echo >> .bashrc PATH=/bin:/usr/bin'
|
||||
# Remove env_parallel from .profile
|
||||
ssh nopathbash@lo 'perl -i.bak -pe s/.*env_parallel.*// .profile .bashrc'
|
||||
ssh nopathcsh@lo 'echo >> .cshrc setenv PATH /bin:/usr/bin'
|
||||
ssh nopathbash@lo 'echo $PATH'
|
||||
ssh nopathcsh@lo 'echo $PATH'
|
||||
)
|
||||
|
||||
ssh-copy-id localhost
|
||||
|
||||
# SHELLS: lsh-client against openssh server
|
||||
sudo aptitude install lsh-client
|
||||
cd
|
||||
mkdir .lsh
|
||||
lsh-make-seed -o ".lsh/yarrow-seed-file"
|
||||
lsh --sloppy-host-authentication --capture-to ~/.lsh/host-acls lo
|
||||
lsh-keygen | lsh-writekey -c none
|
||||
lsh-export-key --openssh < ~/.lsh/identity.pub | lsh localhost 'cat >>.ssh/authorized_keys'
|
||||
lsh-export-key --openssh < ~/.lsh/identity.pub | ssh csh@localhost 'cat >>.ssh/authorized_keys'
|
||||
|
||||
# To configure zsh
|
||||
zsh
|
||||
parallel --record-env
|
||||
|
||||
|
||||
# SHEBANG TOOLS
|
||||
sudo aptitude install gnuplot octave ruby r-base-core libdbd-pg-perl libdbd-sqlite3-perl pxz pixz
|
||||
sudo cp /usr/bin/tmux /usr/local/bin/tmux1.8
|
||||
|
|
@ -42,6 +42,7 @@ export -f run_test
|
|||
echo forever "'echo; pstree -lp '"$$"'; pstree -l'" $$ >/tmp/monitor
|
||||
chmod 755 /tmp/monitor
|
||||
# Log rotate
|
||||
mkdir -p log
|
||||
seq 10 -1 1 | parallel -j1 mv log/testsuite.log.{} log/testsuite.log.'{= $_++ =}'
|
||||
mv testsuite.log log/testsuite.log.1
|
||||
date
|
||||
|
|
|
@ -11,7 +11,7 @@ export SMALLDISK
|
|||
sudo umount -l smalldisk.img
|
||||
dd if=/dev/zero of=smalldisk.img bs=100k count=1k
|
||||
yes|mkfs smalldisk.img
|
||||
mkdir -p /mnt/ram
|
||||
sudo mkdir -p /mnt/ram
|
||||
sudo mount smalldisk.img /mnt/ram
|
||||
sudo chmod 777 /mnt/ram
|
||||
) >/dev/null 2>/dev/null
|
||||
|
@ -606,10 +606,18 @@ echo '### --pipepart autoset --block => 10*joblots'
|
|||
|
||||
echo '**'
|
||||
|
||||
echo '### bug #48295: --results should be dynamic like --wd'
|
||||
|
||||
rm -rf /tmp/parallel-48295;
|
||||
parallel --results /tmp/parallel-48295/{1} -k echo ::: A B ::: a b;
|
||||
find /tmp/parallel-48295 -type f | sort
|
||||
|
||||
echo '**'
|
||||
|
||||
|
||||
EOF
|
||||
echo '### 1 .par file from --files expected'
|
||||
find /tmp{/*,}/*.{par,tms,tmx} 2>/dev/null -mmin -10 | wc -l
|
||||
find /tmp{/*,}/*.{par,tms,tmx} 2>/dev/null -mmin -10 | parallel rm
|
||||
|
||||
sudo umount -l /tmp/smalldisk.img
|
||||
sudo umount -l /tmp/smalldisk.img
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# Each should be taking >100s and be possible to run in parallel
|
||||
# I.e.: No race conditions, no logins
|
||||
|
||||
# tmpdir with > 5 GB available
|
||||
TMP5G=${TMP5G:-/dev/shm}
|
||||
export TMP5G
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ export SQLITE=sqlite3:///%2Frun%2Fshm%2Fparallel.db
|
|||
export SQLITETBL=$SQLITE/parsql
|
||||
export PG=pg://tange:tange@lo/tange
|
||||
export PGTBL=$PG/parsql
|
||||
export MYSQL=mysql://tange:tange@lo/tange
|
||||
export MYSQL=mysql://`whoami`:`whoami`@lo/tange
|
||||
export MYSQLTBL=$MYSQL/parsql
|
||||
export PGTBL2=${PGTBL}2
|
||||
export PGTBL3=${PGTBL}3
|
||||
|
@ -72,4 +72,4 @@ echo '### --sqlandworker postgresql -u'
|
|||
|
||||
EOF
|
||||
|
||||
eval rm '$T'{1..14}
|
||||
eval rm '$T'{1..14}
|
||||
|
|
|
@ -111,8 +111,8 @@ _EOS
|
|||
# Exporting a big variable should not fail
|
||||
setenv A "`seq 1000`"
|
||||
setenv PATH ${PATH}:/tmp
|
||||
cp /usr/local/bin/env_parallel.csh /tmp
|
||||
cp /usr/local/bin/env_parallel.*csh /tmp
|
||||
# --filter to see if $PATH with parallel is transferred
|
||||
env_parallel --filter --env A,PATH -Slo echo '$PATH' ::: OK
|
||||
_EOS
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
MYSQL_ADMIN_DBURL=mysql://tange:tange@
|
||||
MYSQL_ADMIN_DBURL=mysql://`whoami`:`whoami`@
|
||||
|
||||
# Setup
|
||||
sql $MYSQL_ADMIN_DBURL "drop user 'sqlunittest'@'localhost'"
|
||||
|
|
|
@ -306,7 +306,7 @@ OK
|
|||
/home/tange/privat/parallel/testsuite
|
||||
OK
|
||||
parallel --wd ... 'pwd; echo $OLDPWD; echo' ::: OK | perl -pe 's/\d+/0/g'
|
||||
/home/tange/.parallel/tmp/aspire-0-0
|
||||
/home/tange/.parallel/tmp/hp-0-0
|
||||
/home/tange/privat/parallel/testsuite
|
||||
OK
|
||||
parallel --wd . 'pwd; echo $OLDPWD; echo' ::: OK
|
||||
|
@ -595,7 +595,7 @@ e
|
|||
echo '### test too long args'
|
||||
### test too long args
|
||||
perl -e 'print "z"x1000000' | parallel echo 2>&1
|
||||
parallel: Error: Command line too long (1000005 >= 65528) at input 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
||||
parallel: Error: Command line too long (1000005 >= 65524) at input 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
||||
perl -e 'print "z"x1000000' | xargs echo 2>&1
|
||||
xargs: argument line too long
|
||||
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -km -s 10 echo
|
||||
|
@ -862,7 +862,7 @@ echo far
|
|||
### Test --show-limits
|
||||
(echo b; echo c; echo f) | parallel -k --show-limits echo {}ar
|
||||
Maximal size of command: 131049
|
||||
Maximal used size of command: 65528
|
||||
Maximal used size of command: 65524
|
||||
|
||||
Execution of will continue now, and it will try to read its input
|
||||
and run commands; if this is not what you wanted to happen, please
|
||||
|
@ -1243,26 +1243,17 @@ a b
|
|||
seq 1 92 | parallel -j+0 -kX -s 100 echo
|
||||
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
||||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
||||
66 67 68 69
|
||||
70 71 72 73
|
||||
74 75 76 77
|
||||
78 79 80 81
|
||||
82 83 84 85
|
||||
86 87 88 89
|
||||
90 91 92
|
||||
66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
||||
80 81 82 83 84 85 86 87 88 89 90 91 92
|
||||
echo '### Test distribute arguments at EOF to 5 jobslots'
|
||||
### Test distribute arguments at EOF to 5 jobslots
|
||||
seq 1 92 | parallel -j+3 -kX -s 100 echo
|
||||
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
||||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
||||
66 67 68
|
||||
69 70 71
|
||||
72 73 74
|
||||
75 76 77
|
||||
78 79 80
|
||||
81 82 83
|
||||
84 85 86
|
||||
87 88 89
|
||||
66 67 68 69 70 71
|
||||
72 73 74 75 76 77
|
||||
78 79 80 81 82 83
|
||||
84 85 86 87 88 89
|
||||
90 91 92
|
||||
echo '### Test distribute arguments at EOF to infinity jobslots'
|
||||
### Test distribute arguments at EOF to infinity jobslots
|
||||
|
@ -1635,7 +1626,7 @@ echo '### bug #34422: parallel -X --eta crashes with div by zero'
|
|||
seq 2 | stdout parallel -X --eta echo | grep -E -v 'ETA:.*AVG'
|
||||
|
||||
Computers / CPU cores / Max jobs to run
|
||||
1:local / 8 / 2
|
||||
1:local / 2 / 2
|
||||
|
||||
Computer:jobs running/jobs completed/%of started jobs/Average seconds to complete
|
||||
echo '**'
|
||||
|
@ -1665,5 +1656,26 @@ echo '### --pipepart autoset --block => 10*joblots'
|
|||
20
|
||||
echo '**'
|
||||
**
|
||||
echo '### bug #48295: --results should be dynamic like --wd'
|
||||
### bug #48295: --results should be dynamic like --wd
|
||||
rm -rf /tmp/parallel-48295; parallel --results /tmp/parallel-48295/{1} -k echo ::: A B ::: a b; find /tmp/parallel-48295 -type f | sort
|
||||
A a
|
||||
A b
|
||||
B a
|
||||
B b
|
||||
/tmp/parallel-48295/A/1/A/2/a/seq
|
||||
/tmp/parallel-48295/A/1/A/2/a/stderr
|
||||
/tmp/parallel-48295/A/1/A/2/a/stdout
|
||||
/tmp/parallel-48295/A/1/A/2/b/seq
|
||||
/tmp/parallel-48295/A/1/A/2/b/stderr
|
||||
/tmp/parallel-48295/A/1/A/2/b/stdout
|
||||
/tmp/parallel-48295/B/1/B/2/a/seq
|
||||
/tmp/parallel-48295/B/1/B/2/a/stderr
|
||||
/tmp/parallel-48295/B/1/B/2/a/stdout
|
||||
/tmp/parallel-48295/B/1/B/2/b/seq
|
||||
/tmp/parallel-48295/B/1/B/2/b/stderr
|
||||
/tmp/parallel-48295/B/1/B/2/b/stdout
|
||||
echo '**'
|
||||
**
|
||||
### 1 .par file from --files expected
|
||||
0
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
echo '### bug #46214: Using --pipepart doesnt spawn multiple jobs in version 20150922'
|
||||
### bug #46214: Using --pipepart doesnt spawn multiple jobs in version 20150922
|
||||
seq 1000000 > /tmp/num1000000; stdout parallel --pipepart --progress -a /tmp/num1000000 --block 10k -j0 true |grep 1:local
|
||||
1:local / 8 / 252
|
||||
1:local / 2 / 252
|
||||
echo '**'
|
||||
**
|
||||
testhalt() { echo '### testhalt --halt '$1; (yes 0 | head -n 10; seq 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?; (seq 10; yes 0 | head -n 10) | stdout parallel -kj4 --halt $1 'sleep {= $_=$_*0.3+1 =}; exit {}'; echo $?; }; export -f testhalt; parallel -kj0 testhalt ::: now,fail=0 now,fail=1 now,fail=2 now,fail=30% now,fail=70% soon,fail=0 soon,fail=1 soon,fail=2 soon,fail=30% soon,fail=70% now,success=0 now,success=1 now,success=2 now,success=30% now,success=70% soon,success=0 soon,success=1 soon,success=2 soon,success=30% now,success=70%
|
||||
|
@ -863,12 +863,12 @@ echo '**'
|
|||
echo "### Test max line length -m -I"
|
||||
### Test max line length -m -I
|
||||
seq 1 60000 | parallel -I :: -m -j1 echo a::b::c | sort >/tmp/114-a$$; md5sum </tmp/114-a$$; export CHAR=$(cat /tmp/114-a$$ | wc -c); export LINES=$(cat /tmp/114-a$$ | wc -l); echo "Chars per line ($CHAR/$LINES): "$(echo "$CHAR/$LINES" | bc); rm /tmp/114-a$$
|
||||
14bacad229d8b0d32be0a2339c2a6af7 -
|
||||
d10d5c84fc4716b21d90afa92cf44d73 -
|
||||
Chars per line (697810/11): 63437
|
||||
echo "### Test max line length -X -I"
|
||||
### Test max line length -X -I
|
||||
seq 1 60000 | parallel -I :: -X -j1 echo a::b::c | sort >/tmp/114-b$$; md5sum </tmp/114-b$$; export CHAR=$(cat /tmp/114-b$$ | wc -c); export LINES=$(cat /tmp/114-b$$ | wc -l); echo "Chars per line ($CHAR/$LINES): "$(echo "$CHAR/$LINES" | bc); rm /tmp/114-b$$
|
||||
81c0a85162c989c07f666b827a30ce52 -
|
||||
47ec7550232044dc1e7a504705a45184 -
|
||||
Chars per line (817788/13): 62906
|
||||
echo '**'
|
||||
**
|
||||
|
|
|
@ -4,7 +4,7 @@ echo "### BUG: The length for -X is not close to max (131072)"; seq 1 60000 |
|
|||
seq 1 60000 | parallel -X echo a{}b{}c |head -n 1 |wc
|
||||
1 5644 65514
|
||||
seq 1 60000 | parallel -X echo |head -n 1 |wc
|
||||
1 12771 65520
|
||||
1 12770 65514
|
||||
seq 1 60000 | parallel -X echo a{}b{}c {} |head -n 1 |wc
|
||||
1 8098 65512
|
||||
seq 1 60000 | parallel -X echo {}aa{} |head -n 1 |wc
|
||||
|
|
|
@ -123,25 +123,19 @@ echo '### exported function to csh but with PARALLEL_SHELL=bash'
|
|||
CSH/TCSH DO NOT SUPPORT newlines IN VARIABLES/FUNCTIONS. Unset doit
|
||||
OK
|
||||
bug #47695: How to set $PATH on remote?
|
||||
Welcome to Linux Mint 17 Qiana (GNU/Linux 3.16.0-31-lowlatency x86_64)
|
||||
Welcome to Linux Mint 17.3 Rosa (GNU/Linux 3.19.0-32-generic x86_64)
|
||||
|
||||
Welcome to Linux Mint
|
||||
* Documentation: http://www.linuxmint.com
|
||||
|
||||
0 updates are security updates.
|
||||
|
||||
BASH Path before: /bin:/usr/bin with no parallel
|
||||
-bash: line 2: parallel: command not found
|
||||
^^^^^^^^ Not found is OK
|
||||
/bin:/usr/bin:/tmp OK
|
||||
|
||||
Welcome to Linux Mint 17 Qiana (GNU/Linux 3.16.0-31-lowlatency x86_64)
|
||||
Welcome to Linux Mint 17.3 Rosa (GNU/Linux 3.19.0-32-generic x86_64)
|
||||
|
||||
Welcome to Linux Mint
|
||||
* Documentation: http://www.linuxmint.com
|
||||
|
||||
0 updates are security updates.
|
||||
|
||||
Warning: no access to tty (Bad file descriptor).
|
||||
Thus no job control in this shell.
|
||||
CSH Path before: /bin:/usr/bin with no parallel
|
||||
|
|
|
@ -166,8 +166,6 @@ Funky-
|
|||
### Zsh environment
|
||||
|
||||
* Documentation: http://www.linuxmint.com
|
||||
|
||||
|
||||
zsh:130: command not found: alias_echo
|
||||
function_works
|
||||
myvar works
|
||||
|
@ -191,8 +189,6 @@ Funky-
|
|||
### Ksh environment
|
||||
|
||||
* Documentation: http://www.linuxmint.com
|
||||
|
||||
|
||||
3 arg alias_works
|
||||
function_works
|
||||
myvar works
|
||||
|
@ -214,8 +210,6 @@ Funky-
|
|||
### Fish environment
|
||||
|
||||
* Documentation: http://www.linuxmint.com
|
||||
|
||||
|
||||
env_parallel: Warning: ASCII value 1 in variables is not supported
|
||||
env_parallel: Warning: ASCII value 1 in variables is not supported
|
||||
3 arg alias_works
|
||||
|
@ -256,8 +250,6 @@ Funkyenv-
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG
|
|||
### csh environment
|
||||
|
||||
* Documentation: http://www.linuxmint.com
|
||||
|
||||
|
||||
Warning: no access to tty (Bad file descriptor).
|
||||
Thus no job control in this shell.
|
||||
3 arg alias_works
|
||||
|
|
|
@ -456,7 +456,7 @@ echo '### true < 32767-ys.xi'
|
|||
### true < 32767-ys.xi
|
||||
stdout xargs true < 32767-ys.xi
|
||||
stdout parallel -k true < 32767-ys.xi
|
||||
parallel: Error: Command line too long (98306 >= 65528) at input 0: y y y y y y y y y y y y y y y y y y y y y y y y y ...
|
||||
parallel: Error: Command line too long (98306 >= 65524) at input 0: y y y y y y y y y y y y y y y y y y y y y y y y y ...
|
||||
echo '### true < 16383-ys.xi'
|
||||
### true < 16383-ys.xi
|
||||
stdout xargs true < 16383-ys.xi
|
||||
|
|
|
@ -111,7 +111,7 @@ echo '### Test -m with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | par
|
|||
20 179960 1286702
|
||||
echo '### Test -X with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1
|
||||
### Test -X with 60000 args
|
||||
97715240fa65309902932877d24273db -
|
||||
8646e0f7fd5f8795e4b1a831ede50e85 -
|
||||
21 60000 1346682
|
||||
echo '### Test -X with 60000 args and 5 expansions'
|
||||
### Test -X with 60000 args and 5 expansions
|
||||
|
|
|
@ -86,9 +86,9 @@ please cite as described in 'parallel --citation'.
|
|||
echo '### bug #39787: --xargs broken'
|
||||
### bug #39787: --xargs broken
|
||||
nice perl -e 'for(1..30000){print "$_\n"}' | $NICEPAR --xargs -k echo | perl -ne 'print length $_,"\n"'
|
||||
65520
|
||||
65520
|
||||
37854
|
||||
65514
|
||||
65514
|
||||
37866
|
||||
echo '### --delay should grow by 3 sec per arg'
|
||||
### --delay should grow by 3 sec per arg
|
||||
stdout /usr/bin/time -f %e parallel --delay 3 true ::: 1 2 | perl -ne '$_ >= 3 and $_ <= 8 and print "OK\n"'
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
bug #46120: Suspend should suspend (at least local) children
|
||||
2048 0a:c0:70:5b:ec:f6:c2:de:67:c3:53:7f:29:81:65:54 tange@hk (RSA1)
|
||||
1024 93:d1:21:c5:ff:e3:c3:be:6d:73:ea:aa:1e:a2:dc:06 /home/tange/.ssh/id_dsa (DSA)
|
||||
8192 e1:95:e3:ff:99:a6:3a:b5:53:5a:54:59:d0:72:94:7f /home/tange/.ssh/id_rsa (RSA)
|
||||
4096 94:2a:e3:cb:6b:66:63:21:13:51:8d:e8:4e:09:49:b2 /home/tange/.ssh/id_rsa_openindiana (RSA)
|
||||
2048 4b:d0:08:9c:88:c1:b9:20:ce:69:91:73:e0:07:5d:13 /home/tange/.ssh/id_rsa (RSA)
|
||||
|
||||
stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 burnP6 ::: 1 | grep --colour=auto -q CPUTIME=1
|
||||
Zero=OK 0
|
||||
2048 0a:c0:70:5b:ec:f6:c2:de:67:c3:53:7f:29:81:65:54 tange@hk (RSA1)
|
||||
1024 93:d1:21:c5:ff:e3:c3:be:6d:73:ea:aa:1e:a2:dc:06 /home/tange/.ssh/id_dsa (DSA)
|
||||
8192 e1:95:e3:ff:99:a6:3a:b5:53:5a:54:59:d0:72:94:7f /home/tange/.ssh/id_rsa (RSA)
|
||||
4096 94:2a:e3:cb:6b:66:63:21:13:51:8d:e8:4e:09:49:b2 /home/tange/.ssh/id_rsa_openindiana (RSA)
|
||||
2048 4b:d0:08:9c:88:c1:b9:20:ce:69:91:73:e0:07:5d:13 /home/tange/.ssh/id_rsa (RSA)
|
||||
|
||||
echo 1 | stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 burnP6 | grep --colour=auto -q CPUTIME=1
|
||||
Zero=OK 0
|
||||
|
|
|
@ -63,7 +63,7 @@ echo '### Test --number-of-cpus'; stdout $NICEPAR --number-of-cpus
|
|||
1
|
||||
echo '### Test --number-of-cores'; stdout $NICEPAR --number-of-cores
|
||||
### Test --number-of-cores
|
||||
8
|
||||
2
|
||||
echo '### Test --use-cpus-instead-of-cores'; (seq 1 8 | stdout parallel --use-cpus-instead-of-cores -j100% sleep) && echo CPUs done & (seq 1 8 | stdout parallel -j100% sleep) && echo cores done & echo 'Cores should complete first on machines with less than 8 physical CPUs'; wait
|
||||
### Test --use-cpus-instead-of-cores
|
||||
Cores should complete first on machines with less than 8 physical CPUs
|
||||
|
@ -400,7 +400,7 @@ echo "### BUG: empty lines with --show-limit"
|
|||
### BUG: empty lines with --show-limit
|
||||
echo | $NICEPAR --show-limits
|
||||
Maximal size of command: 131049
|
||||
Maximal used size of command: 65528
|
||||
Maximal used size of command: 65524
|
||||
|
||||
Execution of will continue now, and it will try to read its input
|
||||
and run commands; if this is not what you wanted to happen, please
|
||||
|
|
Loading…
Reference in a new issue