summaryrefslogtreecommitdiffstats
path: root/tests/lib/inspectors/sample
diff options
context:
space:
mode:
authorCarlos Goncalves <carlos.goncalves@neclab.eu>2016-11-30 13:08:20 +0000
committerCarlos Goncalves <carlos.goncalves@neclab.eu>2016-12-14 16:12:13 +0000
commit18651c07b942abf0060e6478758050dd365619eb (patch)
tree201428ea4fc2a2f1eeb2e5dda0ffd5f0b050a904 /tests/lib/inspectors/sample
parent40cba233d16e355b078e368772ad4aadbb5f91b1 (diff)
Refactor inspectors support code
JIRA: DOCTOR-71 Change-Id: I0913d4d0390325cc0cc715572b7525a6bbb795d3 Signed-off-by: Carlos Goncalves <carlos.goncalves@neclab.eu>
Diffstat (limited to 'tests/lib/inspectors/sample')
-rw-r--r--tests/lib/inspectors/sample16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lib/inspectors/sample b/tests/lib/inspectors/sample
new file mode 100644
index 00000000..cd21a008
--- /dev/null
+++ b/tests/lib/inspectors/sample
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+function start_inspector_sample {
+ pgrep -f "python inspector.py" && return 0
+ python inspector.py "$INSPECTOR_PORT" > inspector.log 2>&1 &
+}
+
+function stop_inspector_sample {
+ pgrep -f "python inspector.py" || return 0
+ kill $(pgrep -f "python inspector.py")
+}
+
+function cleanup_inspector_sample {
+ # Noop
+ return
+}