-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiniator.sh
More file actions
executable file
·29 lines (24 loc) · 776 Bytes
/
iniator.sh
File metadata and controls
executable file
·29 lines (24 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
#About : This is an intiator script. It assumes the gcov and gmon files are already present after compilation
#It spilts the files and creates three files : Call Graph, Function call times, coverage metrics with basic blocks
#with branch coverage
count=0
echo "Running Initiator script"
echo "This script creates function times call"
count=$#
if [ $count = 1 ]; then
#Display entered program name and continue
echo $1
#entered file exists. Generate the output files
#Gprof files
gprof -Q -b $1 gmon.out > functiontimes.txt
gprof -q -b $1 gmon.out > callgraph.txt
#Gcov files
echo "Enter filename.c"
read filename
#File exists
#create the coverage file
gcov -b -a $filename coverstats
else
echo "Please enter the program name to continue"
fi