imalse /

#!/usr/bin/env python
"""test all experiments and scenarios"""

from subprocess import check_call
from util.util import get_availabe_scenarios, get_available_experiments
import settings

exper_options = get_available_experiments()
scenario_option =  get_availabe_scenarios()
skip_expr = []
skip_scen = ['spamming', 'infecting', 'file_exfiltration']

fid = open ('test.out', 'w')

for exper in exper_options:
    for scenario in scenario_option:
        if exper in skip_expr or scenario in skip_scen:
            print >>fid, 'skipping experiment: [%s], scenario:[%s]'%(exper, scenario)
        print >>fid, '-' * 100
        print >>fid, 'testing experiment: [%s], scenario:[%s]'%(exper, scenario)
        print >>fid, '-' * 100
        cmd = settings.ROOT + '/ -e ' + exper + ' -t 120 -s ' + scenario
        if exper == "complex_net_exp":
            cmd = cmd + " -f net_config/aro_demo/topology.inet --net_settings=net_config/aro_demo/"
        waf_cmd = ['cd', settings.NS3_PATH, '&&', './waf', '--pyrun', '"%s"'%(cmd)]
        check_call(' '.join(waf_cmd), shell=True)        
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.