]> p2p-next.cs.pub.ro Git - p2p-testing-infrastructure.git/commitdiff
checked all sourced filed prior to them being sourced
authorGeorge Milescu <george.milescu@gmail.com>
Fri, 6 Aug 2010 17:27:43 +0000 (19:27 +0200)
committerGeorge Milescu <george.milescu@gmail.com>
Fri, 6 Aug 2010 17:27:43 +0000 (19:27 +0200)
Signed-off-by: George Milescu <george.milescu@gmail.com>
24 files changed:
ConfigFiles/globalconfig
ControlScripts/clients/hrk/start_hrk_leecher.sh
ControlScripts/clients/hrk/start_hrk_seeder.sh
ControlScripts/clients/tribler/start_tribler_doe.sh
ControlScripts/clients/tribler/start_tribler_leecher.sh
ControlScripts/clients/tribler/start_tribler_proxy.sh
ControlScripts/clients/tribler/start_tribler_seeder.sh
ControlScripts/detect_complete_client.sh
ControlScripts/parse_client_log.sh
ControlScripts/post-run.sh
ControlScripts/post-run_ct.sh
ControlScripts/post-run_nop.sh
ControlScripts/pre-run.ch [deleted file]
ControlScripts/pre-run.sh [new file with mode: 0755]
ControlScripts/pre-run_ct.ch [deleted file]
ControlScripts/pre-run_ct.sh [new file with mode: 0755]
ControlScripts/pre-run_nop.sh
ControlScripts/run_scenario.sh
ControlScripts/schedule_client.sh
ControlScripts/start_tracker.sh
ControlScripts/stop_client.sh
Utils/grep_search.sh
Utils/show_version.sh
Utils/start_tribler_gui.sh [moved from ControlScripts/clients/tribler/start_tribler_gui.sh with 83% similarity]

index 49738162149fa84227d3931818594d90aa293a3f..0ebded55d7631208729c7e074a81850c59f84e92 100644 (file)
@@ -7,19 +7,23 @@
 
 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"
@@ -30,13 +34,13 @@ HRK_LOG_ABS_PATH="/home/p2p/p2p-clients/hrktorrent-logging/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
index a891afb1ec8b820b2aebfb567ac417d2a01c439e..b3c16b585e614ce66775f3f9aa18341c221fbf25 100755 (executable)
@@ -17,8 +17,13 @@ else
        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/
 
index f36e0a2dba5d5fa8e521b606e3ee5598213d51da..ab31826cfecf1805367f34e2dfa1487a257020b9 100755 (executable)
@@ -17,8 +17,13 @@ else
        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/
 
index 51ab1d5e7e73e06b8125c25a591456ac1e03347a..ffa569f3909307daa6684e76afcc292a9a3042c3 100755 (executable)
@@ -16,8 +16,13 @@ else
        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:.
 
index c0cee872058ea5c5f95f52cb5c5d261f98935e21..5b686e8418ea3df214585fcedd51edb9bb2251b7 100755 (executable)
@@ -16,8 +16,13 @@ else
        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:.
 
index 301510eaff4e6bba3c198caeaf953469b8329d18..660ff3832126b191acc4f53c7e8b13a3f6886a73 100755 (executable)
@@ -24,8 +24,13 @@ else
        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
index b8e5f3f895a6ac544bd1ae52668c8d4822919f01..fd0bd3b36379ca976545b6984834ce60d5f27c29 100755 (executable)
@@ -15,8 +15,14 @@ else
        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:.
 
index 294200b427405fd1de91b9e4746e58f72caa0cd2..4d7c960b0c73ba739f217955d8dfbdad74ebad64 100755 (executable)
@@ -24,11 +24,21 @@ else
        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
 
index 228b2ce0520ec0cd452ea383b66c0078629b078a..437acf5b088290826c7a124f5b8828a1b564f24e 100755 (executable)
@@ -25,7 +25,12 @@ else
 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
index 6b02bb5c1582756addd34d6c517a516e2bfd234d..1c39f64ef9682937b68add292f2e786e1b0a22e8 100755 (executable)
@@ -4,7 +4,12 @@
 #
 # 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}
index 5a4ea209578104807184ca707a2157b8fb6f407e..b4926b36c5ca452e765368be5d779b53f851c4cb 100755 (executable)
@@ -4,7 +4,12 @@
 #
 # 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}
index 73b99f228dbfed9350def944d18c5a7b2704310a..965b775164d76d57f6bac1bc5fd56cbf7722b5be 100755 (executable)
@@ -4,5 +4,11 @@
 #
 # 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
+
diff --git a/ControlScripts/pre-run.ch b/ControlScripts/pre-run.ch
deleted file mode 100755 (executable)
index 657a952..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-# 2010, Razvan Deaconescu
-#
-# pre-run script for local bandwidth limitation scenarios
-
-# source configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
diff --git a/ControlScripts/pre-run.sh b/ControlScripts/pre-run.sh
new file mode 100755 (executable)
index 0000000..8ab88e1
--- /dev/null
@@ -0,0 +1,15 @@
+#!/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}
diff --git a/ControlScripts/pre-run_ct.ch b/ControlScripts/pre-run_ct.ch
deleted file mode 100755 (executable)
index a0165b8..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/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}
diff --git a/ControlScripts/pre-run_ct.sh b/ControlScripts/pre-run_ct.sh
new file mode 100755 (executable)
index 0000000..f294763
--- /dev/null
@@ -0,0 +1,15 @@
+#!/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}
index 779bd0a3a6867f5e51dd22dff9def011cf7eaa8c..965b775164d76d57f6bac1bc5fd56cbf7722b5be 100755 (executable)
@@ -4,7 +4,11 @@
 #
 # 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}
index 6bbb014331e0a9d670cfacca00aa7465716d5d3f..f6c2f62802e153fb4e6bc4c366affcc7bae6dcc9 100755 (executable)
@@ -108,7 +108,7 @@ scenario_setup() {
 
                # 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}\"
@@ -196,8 +196,8 @@ scenario_clean() {
                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
index 59ac82a6f3df46b531a9873d060f42b67a323615..e445ccfdd28b8521c2c38ada56bd11366ebb5c80 100755 (executable)
@@ -18,11 +18,21 @@ else
        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
 
index 2f2173ac27aa6e6e5ddb404d2c4797a4dec99622..c1f2450119fc856ae6532dc904c771b5b602f85c 100755 (executable)
@@ -15,9 +15,6 @@ else
        source ../ConfigFiles/globalconfig
 fi
 
-# Read scenarion configuration file
-source ../ClientWorkingFolders/TmpLogs/scenario_config
-
 export PYTHONPATH=$PYTHONPATH:.
 
 cd $BITTORNADO_REL_PATH
index eab657e646f39bf2bf05820f82fe5d82a989dc60..27ab8ff39bd04622286382085a8615f686ac30e8 100755 (executable)
@@ -18,11 +18,21 @@ else
        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}
 
index 333bc711e4dfd45bfeec25c1e98d2e090a28cb8e..04755e795c7323fb221abfd3b03da5f454cb5a9e 100755 (executable)
@@ -19,7 +19,7 @@ else
        source ../ConfigFiles/globalconfig
 fi
 
-cd $TRIBLER_REL_PATH
+cd $TRIBLER_UTIL_REL_PATH
 
 # -n: print line number
 # -I: ignore binary files
index 2769d05cd27c270c0b0488384210997142548373..dd3e9625d60dcdd314a3cd205cb8175ad43241b0 100755 (executable)
@@ -17,6 +17,6 @@ fi
 
 export PYTHONPATH=$PYTHONPATH:.
 
-cd $TRIBLER_REL_PATH
+cd $TRIBLER_UTIL_REL_PATH
 
 python Tribler/Tools/cmdlinedl.py -v
similarity index 83%
rename from ControlScripts/clients/tribler/start_tribler_gui.sh
rename to Utils/start_tribler_gui.sh
index eb06688417f9ee2e73442a078d65c4dc12625ac1..74e879bf3c0adabf5416d9ecd2283e6d47b14584 100755 (executable)
@@ -15,11 +15,8 @@ else
        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