Revision 2255812d ci/utils.py
b/ci/utils.py | ||
---|---|---|
208 | 208 |
accept_ssh_from = self.config.get('Global', 'filter_access_network') |
209 | 209 |
self.logger.debug("Block ssh except from %s" % accept_ssh_from) |
210 | 210 |
cmd = """ |
211 |
local_ip=/sbin/ifconfig eth0 | grep 'inet addr:' | \ |
|
212 |
cut -d':' -f2 | cut -d' ' -f1 |
|
211 | 213 |
iptables -A INPUT -s localhost -j ACCEPT |
214 |
iptables -A INPUT -s $local_ip -j ACCEPT |
|
212 | 215 |
iptables -A INPUT -s {0} -p tcp --dport 22 -j ACCEPT |
213 | 216 |
iptables -A INPUT -p tcp --dport 22 -j DROP |
214 | 217 |
""".format(accept_ssh_from) |
... | ... | |
430 | 433 |
""" |
431 | 434 |
_run(cmd, False) |
432 | 435 |
|
433 |
self.logger.debug("Upload local_unit_tests.sh file")
|
|
434 |
unit_tests_file = os.path.join(self.ci_dir, "local_unit_tests.sh")
|
|
436 |
self.logger.debug("Upload tests.sh file") |
|
437 |
unit_tests_file = os.path.join(self.ci_dir, "tests.sh") |
|
435 | 438 |
with fabric.quiet(): |
436 | 439 |
fabric.put(unit_tests_file, ".") |
437 | 440 |
|
438 | 441 |
self.logger.debug("Run unit tests") |
439 | 442 |
cmd = """ |
440 |
bash local_unit_tests.sh {0}
|
|
443 |
bash tests.sh {0} |
|
441 | 444 |
""".format(component) |
442 | 445 |
_run(cmd, True) |
443 | 446 |
|
Also available in: Unified diff