forked from Imagelibrary/littlefs
scripts: Adopted better input file handling in result scripts
- Error on no/insufficient files. Instead of just returning no results. This is more useful when debugging complicated bash scripts. - Use elf magic to allow any file order in perfbd.py/stack.py. This was already implemented in stack.py, now also adopted in perfbd.py. Elf files always start with the magic string "\x7fELF", so we can use this to figure out the types of input files without needing to rely on argument order. This is just one less thing to worry about when invoking these scripts.
This commit is contained in:
@@ -1789,7 +1789,13 @@ def main(csv_paths, *,
|
||||
if args.get('use'):
|
||||
csv_paths = csv_paths + [args['use']]
|
||||
|
||||
# find CSV files
|
||||
# not enough info?
|
||||
if not csv_paths:
|
||||
print("error: no *.csv files?",
|
||||
file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
# collect info
|
||||
fields_, results = collect(csv_paths, defines)
|
||||
|
||||
# homogenize
|
||||
|
||||
Reference in New Issue
Block a user