Run go-smoke 14/181814/1
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 20 Jun 2017 10:19:24 +0000 (12:19 +0200)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 8 Aug 2017 08:18:56 +0000 (10:18 +0200)
Change-Id: I0f73c9862fac09b252cec388dad5eb2f5511b9d5

tct/odroid_run.sh
tsp/jobs/common_prep_flash_conf.sh
tsp/test.conf.example [new file with mode: 0644]

index 7065fda..f988251 100755 (executable)
@@ -58,6 +58,10 @@ case "$SDMUX" in
         ;;
 esac
 
+# Run go-smoke tests
+go-smoke -sdb "${SDMUX}" -conf test.conf -out smoke.json
+test -f "screenshot.png" && mv -v "screenshot.png" "smoke.png"
+
 if [ -f "${SCREENSHOOTER_RPM}" ] && [ -z "$IGNORE" ]
 then
     sdb -s "${SDMUX}" shell mount -o rw,remount /
index 01e5c44..79f8e59 100755 (executable)
@@ -108,6 +108,14 @@ cp "${ORG_MULTIPLEX_FILE}" "${MULTIPLEX_FILE}"
 # Copy multiplex file used by avocado
 cp "${MULTIPLEX_FILE}" "${WORKDIR_REMOTE}/" || retrigger "copy failed"
 
+SMOKE_FILE="test.conf"
+ORG_SMOKE_FILE="${TSP_DIR}/test.conf"
+test -f "${ORG_SMOKE_FILE}" || ORG_SMOKE_FILE="${TSP_DIR}/test.conf.example"
+cp "${ORG_SMOKE_FILE}" "${SMOKE_FILE}"
+
+# Copy test.conf file used by go-smoke
+cp "${SMOKE_FILE}" "${WORKDIR_REMOTE}/" || retrigger "copy failed"
+
 echo "start remote script"
 WORKDIR_REMOTE="${WORKDIR_REMOTE}" TARGET="${TARGET}" timeout 10m sh "${TSP_DIR}/scripts/common_prep_flash_conf.sh" \
     || retrigger "script execution failed"
@@ -115,6 +123,7 @@ echo "finish remote script"
 
 # Copy the results
 cp "${WORKDIR_REMOTE}/sysctl.result" "${WORKDIR_REMOTE}/screenshot.png" .
+cp "${WORKDIR_REMOTE}/smoke.png" "${WORKDIR_REMOTE}/smoke.json" .
 cp -r "${WORKDIR_REMOTE}/avocado-results" .
 
 {
diff --git a/tsp/test.conf.example b/tsp/test.conf.example
new file mode 100644 (file)
index 0000000..812e867
--- /dev/null
@@ -0,0 +1,109 @@
+{
+ "Tests": {
+  "KernelVersion": {
+   "Command": "uname -a",
+   "Weight": 10
+  },
+  "SystemctlFailed": {
+   "Command": "systemctl --state=failed | cat",
+   "Weight": 200
+  },
+  "SystemctlActivating": {
+   "Command": "systemctl --state=activating | cat",
+   "Weight": 200
+  },
+  "JournalErrAll": {
+   "Command": "journalctl -p err | cat"
+  },
+  "JournalErrSanitized": {
+   "Command": "journalctl -p err | grep -v \"Logs begin.* end at\" | uniq -c -f 3"
+  },
+  "JournalErrComparable": {
+   "Command": "journalctl -p err | grep -v \"Logs begin.* end at\" | cut -d' ' -f 4- | sort -u",
+   "Weight": 100
+  },
+  "OwnerSession": {
+   "Command": "su -c 'DBUS_SESSION_BUS_ADDRESS=\"unix:abstract=/run/user/$UID/dbus/user_bus_socket\" && XDG_RUNTIME_DIR=\"/run/user/$UID\" && systemctl --user --state=failed,activating' - owner | cat",
+   "Weight": 10
+  },
+  "EnlightenmentInfo": {
+   "Command": "enlightenment_info -topvwins"
+  },
+  "CrashWorker": {
+   "Command": "find /opt/usr/share/crash -maxdepth 2"
+  },
+  "CrashWorkerComparable": {
+   "Command": "find /opt/usr/share/crash/dump -maxdepth 1 | cut -d'_' -f 1 | sort -u"
+  },
+  "InstallScreenshooterRPM": {
+   "Command": "rpm -i /tmp/screenshooter.rpm",
+   "InputFiles": [
+    "/opt/screenshooter.rpm"
+   ]
+  },
+  "CaptureScreenshot": {
+   "Command": "XDG_RUNTIME_DIR=/run screenshooter -f /tmp/screenshot.png",
+   "OutputFiles": [
+    "screenshot.png"
+   ]
+  },
+  "RemountRW": {
+   "Command": "mount -o rw,remount /"
+  },
+  "RemountRO": {
+   "Command": "mount -o ro,remount /"
+  },
+  "DmesgKernel": {
+   "Command": "dmesg -f kern"
+  },
+  "DmesgDaemon": {
+   "Command": "dmesg -f daemon"
+  },
+  "TopProcesses": {
+   "Command": "ps -eo cputime,rss,vsz,pmem,command --sort -cputime | head -n 10"
+  },
+  "TopProcessesComaprable": {
+   "Command": "ps -eo cputime,rss,vsz,pmem,command --sort -cputime | head -n 6 | grep '/' | cut -d'/' -f 2-",
+   "Weight": 50
+  }
+ },
+ "Scenarios": {
+  "Main": {
+   "TestScenarioNames": [
+    "HumanReadable",
+    "Comparable",
+    "InstallScreenshooter",
+    "CaptureScreenshot"
+   ]
+  },
+  "InstallScreenshooter": {
+   "TestScenarioNames": [
+    "RemountRW",
+    "InstallScreenshooterRPM",
+    "RemountRO"
+   ]
+  },
+  "HumanReadable": {
+   "TestScenarioNames": [
+    "EnlightenmentInfo",
+    "DmesgKernel",
+    "DmesgDaemon",
+    "JournalErrAll",
+    "JournalErrSanitized",
+    "CrashWorker",
+    "TopProcesses"
+   ]
+  },
+  "Comparable": {
+   "TestScenarioNames": [
+    "KernelVersion",
+    "SystemctlFailed",
+    "SystemctlActivating",
+    "OwnerSession",
+    "JournalErrComparable",
+    "CrashWorkerComparable",
+    "TopProcessesComaprable"
+   ]
+  }
+ }
+}