sanitycheck: clarify who spawns processes and threads and where
Notably fix the wrong comment I added in commit 6f011c95c477: when
testing with QEmu sanitycheck does _not_ spawn QEmu; it relies on "make
run" instead.
Searching the code for "Spawning" now cycles directly to all the places
starting processes and threads.
- Sample -v -v verbose output (lines wrapped for commit message check)
Spawning QEMUHandler Thread for \
qemu_x86/samples/hello_world/sample.helloworld 'make run'
- native_posix example:
Spawning process /home/.../sanity-out/native_posix/\
/samples/hello_world/sample.helloworld/zephyr/zephyr.exe
Spawning BinaryHandler Thread for native_posix/\
samples/hello_world/sample.helloworld
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
diff --git a/scripts/sanitycheck b/scripts/sanitycheck
index dc3f6b5..d4d913f 100755
--- a/scripts/sanitycheck
+++ b/scripts/sanitycheck
@@ -179,6 +179,7 @@
import multiprocessing
import select
import shutil
+import shlex
import signal
import threading
import time
@@ -570,7 +571,10 @@
"--log-file="+self.outdir+"/valgrind.log"
] + command
+ verbose("Spawning process: " +
+ " ".join(shlex.quote(word) for word in command))
with subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as proc:
+ verbose("Spawning BinaryHandler Thread for %s" % self.name)
t = threading.Thread(target=self._output_reader, args=(proc, harness, ))
t.start()
t.join(self.timeout)
@@ -854,7 +858,7 @@
self.instance.results = harness.tests
self.thread.daemon = True
- verbose("Spawning QEMU process for %s" % self.name)
+ verbose("Spawning QEMUHandler Thread for %s 'make run'" % self.name)
self.thread.start()
def get_fifo(self):
@@ -1336,7 +1340,7 @@
# Watch stderr output which is where we will keep
# track of build state
tf.write('\n# Generated by %s which is expected\n' % __file__)
- tf.write('# to spawn qemu or testbinary, renode, etc. \n\n')
+ tf.write('# to create QEMU_PIPE, spawn zephyr.exe, etc. \n\n')
for name, goal in sorted(self.goals.items()):
tf.write(goal.text)
tf.write("all: %s\n" % (" ".join(sorted(self.goals.keys()))))