Skip to content

Commit f2fa25c

Browse files
committed
Check for env
1 parent 3f40b77 commit f2fa25c

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

unittest/run_gprof.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ LIB="../mapcodelib/mapcoder.o"
55
echo "Run gprof profiler..." | tee $REPORT
66
date | tee -a $REPORT
77

8+
TEST=`which gprof`
9+
if [ "$TEST" = "" ]
10+
then
11+
echo "No gprof found on this machine - skipping script..."
12+
exit 1
13+
fi
14+
815
echo "" | tee -a $REPORT
916
echo "Run with: -O0" | tee -a $REPORT
1017
cd ../mapcodelib

unittest/run_sanitizer.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ export ASAN_OPTIONS=debug=true:strict_string_checks=1:detect_stack_use_after_ret
77
echo "Run address sanitizer..." | tee $REPORT
88
date | tee -a $REPORT
99

10+
TEST=`which clang`
11+
if [ "$TEST" = "" ]
12+
then
13+
echo "No clang found on this machine - skipping script..."
14+
exit 1
15+
fi
1016
# No optimize
1117
echo "" | tee -a $REPORT
1218
echo "Run with: -O0" | tee -a $REPORT

unittest/run_valgrind.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ OPTS="-Wall -Werror -Wno-pointer-to-int-cast"
33
LIB="../mapcodelib/mapcoder.o"
44

55
echo "Run valgrind" | tee $REPORT
6+
date | tee -a $REPORT
7+
8+
TEST=`which valgrind`
9+
if [ "$TEST" = "" ]
10+
then
11+
echo "No valgrind found on this machine - skipping script..."
12+
exit 1
13+
fi
614

715
echo "" | tee -a $REPORT
816
echo "Run with: -O0" | tee -a report_valgrind.txt

0 commit comments

Comments
 (0)