###############################################################################
#                                                                             #
#  TakTuk, a middleware for adaptive large scale parallel remote executions   #
#  deployment. Perl implementation, copyright(C) 2006 Guillaume Huard.        #
#                                                                             #
#  This program is free software; you can redistribute it and/or modify       #
#  it under the terms of the GNU General Public License as published by       #
#  the Free Software Foundation; either version 2 of the License, or          #
#  (at your option) any later version.                                        #
#                                                                             #
#  This program is distributed in the hope that it will be useful,            #
#  but WITHOUT ANY WARRANTY; without even the implied warranty of             #
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              #
#  GNU General Public License for more details.                               #
#                                                                             #
#  You should have received a copy of the GNU General Public License          #
#  along with this program; if not, write to the Free Software                #
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA #
#                                                                             #
#  Contact: Guillaume.Huard@imag.fr                                           #
#           ENSIMAG - Laboratoire ID                                          #
#           51 avenue Jean Kuntzmann                                          #
#           38330 Montbonnot Saint Martin                                     #
#                                                                             #
###############################################################################

0:TITLE:TAKTUK OPTIONS TESTS

1:TITLE:SEPARATORS, Commands separator
1:CMD:$TAKTUK -n -C: -F arguments

2:TITLE:SEPARATORS, Options separator
2:CMD:$TAKTUK -n -O: -F arguments2

3:TITLE:SEPARATORS, Commands and options separator
3:CMD:$TAKTUK -n -O= -C: -F arguments3

4:TITLE:OUTPUT TEMPLATES, Stream suppression (status)
4:CMD:$TAKTUK -o status `generate_hosts 10`
 :RAW:    broadcast exec { echo \$TAKTUK_RANK }

5:TITLE:OUTPUT TEMPLATES, Raw output (default)
5:CMD:$TAKTUK
 :RAW:    -o default='"$line$eol"'
 :CMD:    `generate_hosts 10`
 :RAW:    broadcast exec { echo \$TAKTUK_RANK }

6:TITLE: OUTPUT TEMPLATES, Complex output, odd lines (output)
6:CMD:$TAKTUK
 :RAW:    -o output='$user_scalar = defined($user_scalar)?$user_scalar+1:0, ($user_scalar%2)?$line."\n":undef'
 :CMD:    `generate_hosts 1` broadcast exec { ls }

7:TITLE:OUTPUT TEMPLATES, Position and state of instances
7:CMD:$TAKTUK
 :RAW:    -o state='"position $position rank $rank > ".event_msg($line)."\n"'
 :CMD:    `generate_hosts 10`
 :RAW:    broadcast exec { echo \$TAKTUK_RANK }

8:TITLE:DEPLOYMENT CHAIN, Batch, no propagation
8:CMD:$TAKTUK -n `generate_local_chain 10`
 :RAW:    broadcast exec [ echo \$TAKTUK_HOSTNAME ]

9:TITLE:DEPLOYMENT CHAIN, Interactive, propagation
9:RAW:echo broadcast exec [ echo \$TAKTUK_HOSTNAME ] |
 :CMD:    $TAKTUK_RELATIVE -n -s `generate_local_chain 10`
