summaryrefslogtreecommitdiffstats
path: root/tests/lib/inspectors/sample
diff options
context:
space:
mode:
authorwenjuan dong <dong.wenjuan@zte.com.cn>2016-12-22 03:37:38 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-22 03:37:38 +0000
commitbb5fd848c7bee3bf2d0d43a143f613076211ff07 (patch)
treec1bbac3b9521e89baf6c75d98d191da5b443361e /tests/lib/inspectors/sample
parent0207bbf49f8814caacbf151e1b71657d2d3276ab (diff)
parent18651c07b942abf0060e6478758050dd365619eb (diff)
Merge "Refactor inspectors support code"
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
+}