import unittest
import re
import sys
+import logging
class PlanetLabIntegrationTestCase(unittest.TestCase):
testbed_id = "planetlab"
pl_desc.set_attribute_value("plcHost", plchost)
pl_desc.set_attribute_value("tapPortBase", self.port_base)
pl_desc.set_attribute_value("p2pDeployment", False) # it's interactive, we don't want it in tests
+ pl_desc.set_attribute_value("dedicatedSlice", True)
+ #pl_desc.set_attribute_value("plLogLevel", "DEBUG")
return pl_desc, exp_desc
"Unexpected trace:\n" + ping_result)
finally:
- controller.stop()
- controller.shutdown()
+ try:
+ controller.stop()
+ except:
+ import traceback
+ traceback.print_exc()
+ try:
+ controller.shutdown()
+ except:
+ import traceback
+ traceback.print_exc()
@test_util.skipUnless(test_util.pl_auth() is not None, "Test requires PlanetLab authentication info (PL_USER and PL_PASS environment variables)")
@test_util.skipUnless(os.environ.get('NEPI_FULL_TESTS','').lower() in ('1','yes','true','on'),
"Unexpected trace:\n" + build_result)
finally:
- controller.stop()
- controller.shutdown()
+ try:
+ controller.stop()
+ except:
+ import traceback
+ traceback.print_exc()
+ try:
+ controller.shutdown()
+ except:
+ import traceback
+ traceback.print_exc()
@test_util.skipUnless(test_util.pl_auth() is not None, "Test requires PlanetLab authentication info (PL_USER and PL_PASS environment variables)")
def test_simple(self):
access_config = proxy.AccessConfiguration({
DC.DEPLOYMENT_MODE : DC.MODE_DAEMON,
DC.ROOT_DIRECTORY : self.root_dir,
+ DC.LOG_LEVEL : DC.DEBUG_LEVEL,
})
self._test_simple(
if controller is not None:
try:
controller.stop()
+ except:
+ import traceback
+ traceback.print_exc()
+ try:
controller.shutdown()
except:
import traceback
access_config = proxy.AccessConfiguration({
DC.DEPLOYMENT_MODE : DC.MODE_DAEMON,
DC.ROOT_DIRECTORY : self.root_dir,
+ DC.LOG_LEVEL : DC.DEBUG_LEVEL,
})
self._test_recover(
pl_desc.set_attribute_value("plcHost", plchost1)
pl_desc.set_attribute_value("tapPortBase", self.port_base)
pl_desc.set_attribute_value("p2pDeployment", False) # it's interactive, we don't want it in tests
+ pl_desc.set_attribute_value("dedicatedSlice", True)
pl_desc2 = exp_desc.add_testbed_description(pl_provider)
pl_desc2.set_attribute_value("homeDirectory", self.root_dir+"v2")
pl_desc2.set_attribute_value("plcHost", plchost2)
pl_desc2.set_attribute_value("tapPortBase", self.port_base+500)
pl_desc2.set_attribute_value("p2pDeployment", False) # it's interactive, we don't want it in tests
+ pl_desc2.set_attribute_value("dedicatedSlice", True)
return pl_desc, pl_desc2, exp_desc
ping_result = controller.trace(ping.guid, "stdout")
tap2_trace = controller.trace(tap2.guid, "packets")
finally:
- controller.stop()
- controller.shutdown()
+ try:
+ controller.stop()
+ except:
+ import traceback
+ traceback.print_exc()
+ try:
+ controller.shutdown()
+ except:
+ import traceback
+ traceback.print_exc()
# asserts at the end, to make sure there's proper cleanup
self.assertTrue(re.match(comp_result, ping_result, re.MULTILINE),
pl_desc.set_attribute_value("plcHost", plchost1)
pl_desc.set_attribute_value("tapPortBase", self.port_base)
pl_desc.set_attribute_value("p2pDeployment", False) # it's interactive, we don't want it in tests
+ pl_desc.set_attribute_value("dedicatedSlice", True)
pl_desc2 = exp_desc.add_testbed_description(pl_provider)
pl_desc2.set_attribute_value("homeDirectory", self.root_dir+"v2")
pl_desc2.set_attribute_value("plcHost", plchost2)
pl_desc2.set_attribute_value("tapPortBase", self.port_base+500)
pl_desc2.set_attribute_value("p2pDeployment", False) # it's interactive, we don't want it in tests
+ pl_desc2.set_attribute_value("dedicatedSlice", True)
return pl_desc, pl_desc2, exp_desc
finally:
if controller is not None:
- controller.stop()
- controller.shutdown()
+ try:
+ controller.stop()
+ except:
+ import traceback
+ traceback.print_exc()
+ try:
+ controller.shutdown()
+ except:
+ import traceback
+ traceback.print_exc()
# asserts at the end, to make sure there's proper cleanup
self.assertTrue(re.match(comp_result, ping_result, re.MULTILINE),
pl_desc.set_attribute_value("plcHost", plchost)
pl_desc.set_attribute_value("tapPortBase", self.port_base)
pl_desc.set_attribute_value("p2pDeployment", False) # it's interactive, we don't want it in tests
+ pl_desc.set_attribute_value("dedicatedSlice", True)
return pl_desc, exp_desc
controller.start()
# just test that it starts...
finally:
- controller.stop()
- controller.shutdown()
+ try:
+ controller.stop()
+ except:
+ import traceback
+ traceback.print_exc()
+ try:
+ controller.shutdown()
+ except:
+ import traceback
+ traceback.print_exc()
@test_util.skipUnless(test_util.pl_auth() is not None,
"Test requires PlanetLab authentication info (PL_USER and PL_PASS environment variables)")
tap_trace = controller.trace(tap1.guid, "packets")
finally:
- controller.stop()
- controller.shutdown()
+ try:
+ controller.stop()
+ except:
+ import traceback
+ traceback.print_exc()
+ try:
+ controller.shutdown()
+ except:
+ import traceback
+ traceback.print_exc()
# asserts at the end, to make sure there's proper cleanup
self.assertTrue(re.match(comp_result, ping_result, re.MULTILINE),
tap_trace = controller.trace(tap1.guid, "packets")
finally:
- controller.stop()
- controller.shutdown()
+ try:
+ controller.stop()
+ except:
+ import traceback
+ traceback.print_exc()
+ try:
+ controller.shutdown()
+ except:
+ import traceback
+ traceback.print_exc()
# asserts at the end, to make sure there's proper cleanup
sent = 0
tap0_trace = controller.trace(tap0.guid, "packets")
finally:
- controller.stop()
- controller.shutdown()
+ try:
+ controller.stop()
+ except:
+ import traceback
+ traceback.print_exc()
+ try:
+ controller.shutdown()
+ except:
+ import traceback
+ traceback.print_exc()
# asserts at the end, to make sure there's proper cleanup
sent = 0