# Copyright (C) 2013 INRIA
#
# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation;
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
stdout = ec.trace(app, "stdout")
size = ec.trace(app, "stdout", attr = TraceAttr.SIZE)
- self.assertEquals(len(stdout), size)
+ self.assertEqual(len(stdout), size)
block = ec.trace(app, "stdout", attr = TraceAttr.STREAM, block = 5, offset = 1)
- self.assertEquals(block, stdout[5:10])
+ self.assertEqual(block, stdout[5:10])
path = ec.trace(app, "stdout", attr = TraceAttr.PATH)
rm = ec.get_resource(app)
p = os.path.join(rm.run_home, "stdout")
- self.assertEquals(path, p)
+ self.assertEqual(path, p)
ec.shutdown()
ec.wait_finished(app)
out = ec.trace(app, 'stdout')
- self.assertEquals(out, "Hello, world!\n")
+ self.assertEqual(out, "Hello, world!\n")
ec.shutdown()
ec.set(node, "cleanProcesses", True)
apps = list()
- for i in xrange(50):
+ for i in range(50):
app = ec.register_resource("linux::Application")
cmd = "ping -c5 %s" % self.target
ec.set(app, "command", cmd)
for app in apps:
stdout = ec.trace(app, 'stdout')
size = ec.trace(app, 'stdout', attr = TraceAttr.SIZE)
- self.assertEquals(len(stdout), size)
+ self.assertEqual(len(stdout), size)
block = ec.trace(app, 'stdout', attr = TraceAttr.STREAM, block = 5, offset = 1)
- self.assertEquals(block, stdout[5:10])
+ self.assertEqual(block, stdout[5:10])
path = ec.trace(app, 'stdout', attr = TraceAttr.PATH)
rm = ec.get_resource(app)
p = os.path.join(rm.run_home, 'stdout')
- self.assertEquals(path, p)
+ self.assertEqual(path, p)
ec.shutdown()