TESTING_INFRASTRUCTURE_ABS_PATH="/home/george/P2P-Next/P2P-Testing-Infrastructure"
-# P2P_NEXT_REL_PATH is relative to ControlScripts folder
+# P2P_NEXT_REL_PATH is relative to Utils folder - used by sync_* scripts
P2P_NEXT_REL_PATH="../../"
# The / at the end is important for rsync to work properly
P2P_NEXT_ABS_PATH="/home/george/P2P-Next/"
-# TEST_INFRASTRUCTURE_REL_PATH is relative to ControlScripts folder
+# TEST_INFRASTRUCTURE_REL_PATH is relative to ControlScripts folder - used by run_scenario.sh
TEST_INFRASTRUCTURE_REL_PATH="../../P2P-Testing-Infrastructure"
# No / at the end is important for rsync to work properly
TEST_INFRASTRUCTURE_ABS_PATH="/home/george/P2P-Next/P2P-Testing-Infrastructure"
-# TRIBLER_REL_PATH is relative to ControlScripts folder
-TRIBLER_REL_PATH="../../TriblerBranches/proxyservice-m32"
-TRIBLER_ABS_PATH="/home/george/P2P-Next/TriblerBranches/proxyservice-m32"
+# TRIBLER_REL_PATH is relative to ControlScripts/clients/<client-name> folder
+TRIBLER_REL_PATH="../../../../TriblerBranches/proxyservice-5.3"
+TRIBLER_ABS_PATH="/home/george/P2P-Next/TriblerBranches/proxyservice-5.3"
+
+# TRIBLER_UTIL_REL_PATH is relative to Util folder
+TRIBLER_UTIL_REL_PATH="../../TriblerBranches/proxyservice-5.3"
+TRIBLER_UTIL_ABS_PATH="/home/george/P2P-Next/TriblerBranches/proxyservice-5.3"
# HRK_PATH
HRK_ABS_PATH="/home/p2p/p2p-clients/hrktorrent/hrktorrent"
# WORKING_FOLDER_REL_PATH is relative to TRIBLER_ABS_PATH folder
WORKING_FOLDER_REL_PATH="../../P2P-Testing-Infrastructure/ClientWorkingFolders"
-# BITTORNADO_REL_PATH is relative to ControlScripts folder
+# BITTORNADO_REL_PATH is relative to ControlScripts folder - used by start_tracker.sh
BITTORNADO_REL_PATH="../../BTclients/BitTornado/BitTornado-CVS"
-# CONFIG_FILES_REL_PATH is relative to ControlScripts folder
+# CONFIG_FILES_REL_PATH is relative to ControlScripts folder - used by run_scenario.sh
CONFIG_FILES_REL_PATH="../ConfigFiles"
-# CONFIG_FILES_REL_PATH is relative to ControlScripts folder
+# CONFIG_FILES_REL_PATH is relative to ControlScripts folder - used by run_campaign.sh
RESULTS_FOLDER_REL_PATH="../Results"
# DEBUG function
source ../../../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file (TORRENT_FILE)
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file (TORRENT_FILE)
+# Check if the node-specific configuration file exists
+if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../../../ClientWorkingFolders/TmpLogs/node_config
+fi
cd $WORKING_FOLDER_REL_PATH/Regular/
source ../../../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file (TORRENT_FILE)
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file (TORRENT_FILE)
+# Check if the node-specific configuration file exists
+if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../../../ClientWorkingFolders/TmpLogs/node_config
+fi
cd $WORKING_FOLDER_REL_PATH/TorrentsAndData/
source ../../../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file (TORRENT_FILE)
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file (TORRENT_FILE)
+# Check if the node-specific configuration file exists
+if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../../../ClientWorkingFolders/TmpLogs/node_config
+fi
export PYTHONPATH=$PYTHONPATH:.
source ../../../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file (TORRENT_FILE)
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file (TORRENT_FILE)
+# Check if the node-specific configuration file exists
+if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../../../ClientWorkingFolders/TmpLogs/node_config
+fi
export PYTHONPATH=$PYTHONPATH:.
source ../../../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file
+# Check if the node-specific configuration file exists
+if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../../../ClientWorkingFolders/TmpLogs/node_config
+fi
# Read arguments
PROXY_NO=$1
source ../../../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file (TORRENT_FILE)
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file (TORRENT_FILE)
+# Check if the node-specific configuration file exists
+if [ ! -e ../../../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../../../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../../../ClientWorkingFolders/TmpLogs/node_config
+fi
+
export PYTHONPATH=$PYTHONPATH:.
source ../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file (CLIENT_TYPE)
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file (CLIENT_TYPE)
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
# Read client mappings configuration file
-source ../ConfigFiles/client_script_mappings
+# Check if the client mappings configuration file exists
+if [ ! -e ../ConfigFiles/client_script_mappings ]; then
+ echo "Warning: The client mappings config file ../ConfigFiles/client_script_mappings does not exist."
+else
+ source ../ConfigFiles/client_script_mappings
+fi
log_file=$1
fi
# Read client mappings configuration file
-source ../ConfigFiles/client_script_mappings
+# Check if the client mappings configuration file exists
+if [ ! -e ../ConfigFiles/client_script_mappings ]; then
+ echo "Warning: The client mappings config file ../ConfigFiles/client_script_mappings does not exist."
+else
+ source ../ConfigFiles/client_script_mappings
+fi
client_type=$1
log_folder=$2
#
# post-run script for local bandwidth limitation scenarios
-# source configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
./bw_limit.sh del ${IFACE}
#
# post-run script for container bandwidth limitation scenarios
-# source configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
./bw_limit_ct.sh del ${IFACE}
#
# pre-run script for client-based limitation scenarios
-# source configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
+
+++ /dev/null
-#!/bin/bash
-
-# 2010, Razvan Deaconescu
-#
-# pre-run script for local bandwidth limitation scenarios
-
-# source configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
--- /dev/null
+#!/bin/bash
+
+# 2010, Razvan Deaconescu
+#
+# pre-run script for local bandwidth limitation scenarios
+
+# Read the node-specific configuration file
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
+
+./bw_limit_ct.sh set ${IFACE} ${DL_BW} ${DL_BURST} ${UL_BW} ${UL_BURST}
+++ /dev/null
-#!/bin/bash
-
-# 2010, Razvan Deaconescu
-#
-# pre-run script for container bandwidth limitation scenarios
-
-# source configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
-
-./bw_limit_ct.sh set ${IFACE} ${DL_BW} ${DL_BURST} ${UL_BW} ${UL_BURST}
--- /dev/null
+#!/bin/bash
+
+# 2010, Razvan Deaconescu
+#
+# pre-run script for container bandwidth limitation scenarios
+
+# Read the node-specific configuration file
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
+
+./bw_limit_ct.sh set ${IFACE} ${DL_BW} ${DL_BURST} ${UL_BW} ${UL_BURST}
#
# pre-run script for client-based limitation scenarios
-# source configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
-./bw_limit_ct.sh set ${IFACE} ${DL_BW} ${DL_BURST} ${UL_BW} ${UL_BURST}
# Create node config file
if ! ssh -n -p ${PORT} ${USER}@${SERVER} "
-cat > $REMOTE_PATH/P2P-Testing-Infrastructure/ClientWorkingFolders/TmpLogs/scenario_config << END
+cat > $REMOTE_PATH/P2P-Testing-Infrastructure/ClientWorkingFolders/TmpLogs/node_config << END
IFACE=\"${REMOTE_IF}\"
DL_BW=\"${DL_BW}\"
DL_BURST=\"${DL_BURST}\"
fi
# Remove node config file
- if ! ssh -n -p ${PORT} ${USER}@${SERVER} "rm $REMOTE_PATH/P2P-Testing-Infrastructure/ClientWorkingFolders/TmpLogs/scenario_config" &>> ${ERR_LOG}; then
- echo "Error: cannot remove scenario_config file"
+ if ! ssh -n -p ${PORT} ${USER}@${SERVER} "rm $REMOTE_PATH/P2P-Testing-Infrastructure/ClientWorkingFolders/TmpLogs/node_config" &>> ${ERR_LOG}; then
+ echo "Error: cannot remove node_config file"
fi
# Retrieve log files
source ../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration file
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
# Read client mappings configuration file
-source ../ConfigFiles/client_script_mappings
+# Check if the client mappings configuration file exists
+if [ ! -e ../ConfigFiles/client_script_mappings ]; then
+ echo "Warning: The client mappings config file ../ConfigFiles/client_script_mappings does not exist."
+else
+ source ../ConfigFiles/client_script_mappings
+fi
client_pid=0
source ../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
-
export PYTHONPATH=$PYTHONPATH:.
cd $BITTORNADO_REL_PATH
source ../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file (CLIENT_TYPE)
-source ../ClientWorkingFolders/TmpLogs/scenario_config
+# Read the node-specific configuration (CLIENT_TYPE)
+# Check if the node-specific configuration file exists
+if [ ! -e ../ClientWorkingFolders/TmpLogs/node_config ]; then
+ echo "Warning: The global config file ../ClientWorkingFolders/TmpLogs/node_config does not exist."
+else
+ source ../ClientWorkingFolders/TmpLogs/node_config
+fi
# Read client mappings configuration file
-source ../ConfigFiles/client_script_mappings
+# Check if the client mappings configuration file exists
+if [ ! -e ../ConfigFiles/client_script_mappings ]; then
+ echo "Warning: The client mappings config file ../ConfigFiles/client_script_mappings does not exist."
+else
+ source ../ConfigFiles/client_script_mappings
+fi
stop_client ${CLIENT_TYPE}
source ../ConfigFiles/globalconfig
fi
-cd $TRIBLER_REL_PATH
+cd $TRIBLER_UTIL_REL_PATH
# -n: print line number
# -I: ignore binary files
export PYTHONPATH=$PYTHONPATH:.
-cd $TRIBLER_REL_PATH
+cd $TRIBLER_UTIL_REL_PATH
python Tribler/Tools/cmdlinedl.py -v
source ../../../ConfigFiles/globalconfig
fi
-# Read scenarion configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
-
export PYTHONPATH=$PYTHONPATH:.
-cd $TRIBLER_REL_PATH
+cd $TRIBLER_UTIL_REL_PATH
python2.6 Tribler/Main/tribler.py