forked from unikraft/eurosys21-artifacts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmerge.sh
executable file
·71 lines (56 loc) · 1.65 KB
/
merge.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
#Use this script to generate the plot (after running experiment)
if [ ! -d "/tmp/abi" ]; then
echo "/tmp/abi does not exist. Run 'make prepare' first"
exit 1
fi
if [ ${PWD:0:4} == "/tmp" ]; then
echo "Already in /tmp folder"
else
echo "Go to /tmp folder"
cd /tmp/abi
fi
CURRENT_FOLDER=$PWD
RESULT_FOLDER="results"
FILE1="$PWD/abi/apps_loc/cloc.csv"
FILE2="$PWD/abi/apps_musl_compat/musl-compat.csv"
FILE3="$PWD/abi/apps_newlib_compat/newlib-compat.csv"
FILE4="$PWD/abi/apps_musl_std/musl-std.csv"
FILE5="$PWD/abi/apps_newlib_std/newlib-std.csv"
mkdir -p "$RESULT_FOLDER"
if [ -f "$FILE1" ]; then
cp "$FILE1" "$CURRENT_FOLDER/$RESULT_FOLDER"
else
echo "$FILE1 does not exist. Perform the abi experiment first"
exit 1
fi
if [ -f "$FILE2" ]; then
cp "$FILE2" "$CURRENT_FOLDER/$RESULT_FOLDER"
else
echo "$FILE1 does not exist. Perform the abi experiment first"
exit 1
fi
if [ -f "$FILE3" ]; then
cp "$FILE3" "$CURRENT_FOLDER/$RESULT_FOLDER"
else
echo "$FILE3 does not exist. Perform the abi experiment first"
exit 1
fi
if [ -f "$FILE4" ]; then
cp "$FILE4" "$CURRENT_FOLDER/$RESULT_FOLDER"
else
echo "$FILE4 does not exist. Perform the abi experiment first"
exit 1
fi
if [ -f "$FILE5" ]; then
cp "$FILE5" "$CURRENT_FOLDER/$RESULT_FOLDER"
else
echo "$FILE5 does not exist. Perform the abi experiment first"
exit 1
fi
python3 merge_csv.py
echo "Copy results and move to base folder"
base_folder=$(cat .init_folder.txt)
cp $PWD/merged.csv $RESULT_FOLDER
cp -r $RESULT_FOLDER $base_folder
echo "Raw results are available in the results folder and CSV merged table is written in merged.csv"