-
Notifications
You must be signed in to change notification settings - Fork 1
/
trace.sh
executable file
·31 lines (24 loc) · 686 Bytes
/
trace.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
#!/bin/bash
export LANGUAGE=en
export LC_COLLATE=C
export LC_TIME=C
export LC_ALL=C
export SRCDIR=.
export R_TESTS=""
export R_BROWSER=false
export R_PDFVIEWER=false
export R_KEEP_PKG_SOURCE=yes
export R_KEEP_PKG_PARSE_DATA=yes
export RUNR_CWD="$(pwd)"
unset R_LIBS_SITE
unset R_LIBS_USER
export R_LIBS=$(readlink -f ../pipeline-fuzzing/out/library)
cwd="$(pwd)"
file=$(basename "$1")
dir=$(dirname "$1")
path=$(realpath "$1")
OUTPUT=$(readlink -f data/baseline)
SXPDB=$(readlink -f $OUTPUT/$file.sxpdb)
[[ -d "$SXPDB" ]] && rm -fr "$SXPDB"
cd "$dir"
R --no-save --no-echo --quiet --no-readline -e "argtracer::trace_file('$file', '$OUTPUT/$file.sxpdb', '$OUTPUT/$file.callids')"