Major rework on distributed mode

This commit is contained in:
louwrentius 2011-12-25 02:08:08 +00:00
parent 74d1e90282
commit 30f92bbae9
2 changed files with 35 additions and 14 deletions

12
ppss
View File

@ -2127,7 +2127,6 @@ commando () {
ERR_STATE="$?" ERR_STATE="$?"
fi fi
# #
# If recursion is used, a file name of an item may not be unique. # If recursion is used, a file name of an item may not be unique.
# The same filename can be used for files in differen directories. # The same filename can be used for files in differen directories.
@ -2148,9 +2147,14 @@ commando () {
if [ "$UPLOAD_TO_SERVER" == "1" ] if [ "$UPLOAD_TO_SERVER" == "1" ]
then then
OUTPUT_DIR=$PPSS_LOCAL_OUTPUT/"$HASH" OUTPUT_DIR=$PPSS_LOCAL_OUTPUT/"$HASH"
else
if [ -z "$REMOTE_OUTPUT_DIR" ]
then
OUTPUT_DIR="$PPSS_LOCAL_OUTPUT"
else else
OUTPUT_DIR="$REMOTE_OUTPUT_DIR/$ITEM_DIR_NAME" OUTPUT_DIR="$REMOTE_OUTPUT_DIR/$ITEM_DIR_NAME"
fi fi
fi
else else
ITEM_DIR_NAME="$SRC_DIR" ITEM_DIR_NAME="$SRC_DIR"
ITEM_BASE_NAME="$ITEM" ITEM_BASE_NAME="$ITEM"
@ -2170,10 +2174,15 @@ commando () {
if [ "$UPLOAD_TO_SERVER" == "1" ] if [ "$UPLOAD_TO_SERVER" == "1" ]
then then
OUTPUT_DIR=$PPSS_LOCAL_OUTPUT/"$ITEM_ESCAPED" OUTPUT_DIR=$PPSS_LOCAL_OUTPUT/"$ITEM_ESCAPED"
else
if [ -z "$REMOTE_OUTPUT_DIR" ]
then
OUTPUT_DIR="$PPSS_LOCAL_OUTPUT"
else else
OUTPUT_DIR="$REMOTE_OUTPUT_DIR" OUTPUT_DIR="$REMOTE_OUTPUT_DIR"
fi fi
fi fi
fi
OUTPUT_FILE="$ITEM_BASE_NAME" OUTPUT_FILE="$ITEM_BASE_NAME"
@ -2232,6 +2241,7 @@ commando () {
mkdir -p "$OUTPUT_DIR" mkdir -p "$OUTPUT_DIR"
fi fi
ERROR="" ERROR=""
# #
# Some formatting of item log files. # Some formatting of item log files.

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
DEBUG="$1" DEBUG="$1"
VERSION="2.90" VERSION="2.95"
TMP_DIR="/tmp/ppss" TMP_DIR="/tmp/ppss"
PPSS=./ppss PPSS=./ppss
PPSS_DIR=ppss_dir PPSS_DIR=ppss_dir
@ -26,9 +26,9 @@ cleanup () {
done done
fi fi
if [ ! -z "$TMP_DIR" ] if [ ! -z "$TMP_DIR" ] && [ -e "$TMP_DIR" ]
then then
rm -rf "/$TMP_DIR" rm -rf "$TMP_DIR"
fi fi
} }
@ -62,7 +62,7 @@ oneTimeSetUp () {
if [ ! -e "$TMP_DIR" ] if [ ! -e "$TMP_DIR" ]
then then
mkdir "$TMP_DIR" mkdir -p "$TMP_DIR"
fi fi
cleanup cleanup
@ -97,9 +97,20 @@ createDirectoryWithSomeFiles () {
CHILD_1=$ROOT_DIR/child_1 CHILD_1=$ROOT_DIR/child_1
CHILD_2=$ROOT_DIR/child_2 CHILD_2=$ROOT_DIR/child_2
if [ ! -e "$ROOT_DIR" ]
then
mkdir -p "$ROOT_DIR" mkdir -p "$ROOT_DIR"
fi
if [ ! -e "$CHILD_1" ]
then
mkdir -p "$CHILD_1" mkdir -p "$CHILD_1"
fi
if [ ! -e "$CHILD_2" ]
then
mkdir -p "$CHILD_2" mkdir -p "$CHILD_2"
fi
for x in {1..10} for x in {1..10}
do do
@ -228,7 +239,7 @@ testNumberOfLogfiles () {
createSpecialFilenames createSpecialFilenames
init_get_all_items $TMP_DIR/root 1 init_get_all_items $TMP_DIR/root 1
COMMAND='echo ' COMMAND='echo hoi'
while get_item while get_item
do do
commando "$ITEM" commando "$ITEM"