The mock-noinline.py script is fed list of files through its
stdin, each file on its own line. Unfortunately, the way the
script is written does nothing as the trailing newline character
prevents any .endswith() match. Strip each line of white spaces.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
mocked[name] = "%s:%d" % (filename, lineno)
-for filename in sys.stdin.readlines():
+for filename in sys.stdin:
+ filename = filename.rstrip()
if filename.endswith(".h"):
scan_annotations(filename)
elif filename.endswith("mock.c"):