Skip to content

Commit

Permalink
A few more tweaks to scripts
Browse files Browse the repository at this point in the history
- Changed `make summary` to show a one line summary
- Added `make lfs.csv` rule, which is useful for finding more info with
  other scripts
- Fixed small issue in ./scripts/summary.py
- Added *.ci (callgraph) and *.csv (script output) to CI
  • Loading branch information
geky committed Mar 20, 2022
1 parent 55b3c53 commit 7ea2b51
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
*.o
*.d
*.a
*.ci
*.csv

# Testing things
blocks/
Expand Down
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ summary: $(OBJ) $(CGI)
$(if $(COVERAGE),\
| ./scripts/coverage.py $(BUILDDIR)tests/*.toml.info \
-q -m - -o - $(COVERAGEFLAGS)) \
| ./scripts/summary.py $(SUMMARYFLAGS))
| ./scripts/summary.py -Y $(SUMMARYFLAGS))


# rules
Expand All @@ -143,9 +143,20 @@ summary: $(OBJ) $(CGI)
$(BUILDDIR)lfs: $(OBJ)
$(CC) $(CFLAGS) $^ $(LFLAGS) -o $@

$(BUILDDIR)%.a: $(OBJ)
$(BUILDDIR)lfs.a: $(OBJ)
$(AR) rcs $@ $^

$(BUILDDIR)lfs.csv: $(OBJ) $(CGI)
$(strip \
./scripts/code.py $(OBJ) -q -o - $(CODEFLAGS) \
| ./scripts/data.py $(OBJ) -q -m - -o - $(DATAFLAGS) \
| ./scripts/stack.py $(CGI) -q -m - -o - $(STACKFLAGS) \
| ./scripts/structs.py $(OBJ) -q -m - -o - $(STRUCTFLAGS) \
$(if $(COVERAGE),\
| ./scripts/coverage.py $(BUILDDIR)tests/*.toml.info \
-q -m - -o - $(COVERAGEFLAGS)) \
> $@)

$(BUILDDIR)%.o: %.c
$(CC) -c -MMD $(CFLAGS) $< -o $@

Expand Down
11 changes: 0 additions & 11 deletions scripts/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,6 @@ def openio(path, mode='r'):
except FileNotFoundError:
pass

if args.get('all_fields'):
fields = FIELDS
elif args.get('fields') is not None:
fields_dict = {field.name: field for field in FIELDS}
fields = [fields_dict[f] for f in args['fields']]
else:
fields = []
for field in FIELDS:
if any(field.name in result for result in prev_results.values()):
fields.append(field)

prev_total = {}
for result in prev_results.values():
for field in fields:
Expand Down

0 comments on commit 7ea2b51

Please sign in to comment.