Skip to content

Commit

Permalink
Merge pull request #839 from zack-vii/test
Browse files Browse the repository at this point in the history
Fix: addressed some performance issues in python
  • Loading branch information
tfredian committed Feb 22, 2017
2 parents ea955ef + 197e99e commit dd3f02d
Show file tree
Hide file tree
Showing 55 changed files with 490 additions and 293 deletions.
2 changes: 1 addition & 1 deletion LabView/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ EGREP = @EGREP@
ENABLE_SANITIZE = @ENABLE_SANITIZE@
ENABLE_SANITIZE_LIBPATH = @ENABLE_SANITIZE_LIBPATH@
ENABLE_SANITIZE_OPTIONS = @ENABLE_SANITIZE_OPTIONS@
ENABLE_VALGRIND = @ENABLE_VALGRIND@
EXEEXT = @EXEEXT@
EXPORTS_FILE = @EXPORTS_FILE@
FC = @FC@
Expand Down Expand Up @@ -377,7 +378,6 @@ UIL = @UIL@
USE_PIPED_MESSAGING = @USE_PIPED_MESSAGING@
USE_TM_GMTOFF = @USE_TM_GMTOFF@
VALGRIND = @VALGRIND@
VALGRIND_ENABLED = @VALGRIND_ENABLED@
VALGRIND_FLAGS = @VALGRIND_FLAGS@
VALGRIND_HAVE_TOOL_drd = @VALGRIND_HAVE_TOOL_drd@
VALGRIND_HAVE_TOOL_exp_sgcheck = @VALGRIND_HAVE_TOOL_exp_sgcheck@
Expand Down
2 changes: 1 addition & 1 deletion actions/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ EGREP = @EGREP@
ENABLE_SANITIZE = @ENABLE_SANITIZE@
ENABLE_SANITIZE_LIBPATH = @ENABLE_SANITIZE_LIBPATH@
ENABLE_SANITIZE_OPTIONS = @ENABLE_SANITIZE_OPTIONS@
ENABLE_VALGRIND = @ENABLE_VALGRIND@
EXEEXT = @EXEEXT@
EXPORTS_FILE = @EXPORTS_FILE@
FC = @FC@
Expand Down Expand Up @@ -426,7 +427,6 @@ UIL = @UIL@
USE_PIPED_MESSAGING = @USE_PIPED_MESSAGING@
USE_TM_GMTOFF = @USE_TM_GMTOFF@
VALGRIND = @VALGRIND@
VALGRIND_ENABLED = @VALGRIND_ENABLED@
VALGRIND_FLAGS = @VALGRIND_FLAGS@
VALGRIND_HAVE_TOOL_drd = @VALGRIND_HAVE_TOOL_drd@
VALGRIND_HAVE_TOOL_exp_sgcheck = @VALGRIND_HAVE_TOOL_exp_sgcheck@
Expand Down
4 changes: 4 additions & 0 deletions conf/test-driver
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ if [ ${TEST_FORMAT} ]; then
(echo "${TEST_FORMAT}" | grep "xml" > /dev/null) && export TEST_XMLFILE=$(echo $log_file | sed -e 's/\(.log\)$/.xml/');
fi

# add LD_PRELOAD just before the test LOG_COMPILER execution
if [ ${TEST_LD_PRELOAD} ]; then
export LD_PRELOAD=${TEST_LD_PRELOAD};
fi

# Test script is run here.
"$@" >$log_file 2>&1
Expand Down
143 changes: 73 additions & 70 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,9 @@ VALGRIND_HAVE_TOOL_drd
VALGRIND_HAVE_TOOL_helgrind
VALGRIND_HAVE_TOOL_memcheck
VALGRIND_LIB
VALGRIND_ENABLED
VALGRIND_ENABLED_FALSE
VALGRIND_ENABLED_TRUE
ENABLE_VALGRIND
ENABLE_VALGRIND_FALSE
ENABLE_VALGRIND_TRUE
VALGRIND
HAVE_PL_TAP_PARSER_FALSE
HAVE_PL_TAP_PARSER_TRUE
Expand Down Expand Up @@ -986,9 +986,6 @@ enable_largefile
enable_shared
enable_perf
enable_java
enable_sanitize_address
enable_sanitize_undefined
enable_sanitize_thread
with_jdk
with_java_target
with_java_bootclasspath
Expand Down Expand Up @@ -1679,15 +1676,6 @@ Optional Features:
--disable-shared Prevent building shared libraries
--enable-perf enable MDSplus I/O statistics
--disable-java Do not build java libraries and applications
--enable-sanitize-address
Enable memory error detection using address
sanitizer [default=no]
--enable-sanitize-undefined
Enable undefined behavior detection using undefined
sanitizer [default=no]
--enable-sanitize-address
Enable race condition detection using thread
sanitizer [default=no]
--enable-d3d build d3d ptdata access library
--disable-xmltest Do not try to compile and run a test LIBXML program
--enable-valgrind Whether to enable Valgrind on the unit tests
Expand Down Expand Up @@ -7405,33 +7393,7 @@ else
fi


# Add address sanitizer options to flags, if requested. Only useful for GCC
# version 4.8 and later.
# Check whether --enable-sanitize-address was given.
if test "${enable_sanitize_address+set}" = set; then :
enableval=$enable_sanitize_address; enable_san_a="$enableval"
else
enable_san_a="no"

fi


# Check whether --enable-sanitize-undefined was given.
if test "${enable_sanitize_undefined+set}" = set; then :
enableval=$enable_sanitize_undefined; enable_san_u="$enableval"
else
enable_san_u="no"

fi


# Check whether --enable-sanitize-thread was given.
if test "${enable_sanitize_thread+set}" = set; then :
enableval=$enable_sanitize_thread; enable_san_t="$enableval"
else
enable_san_t="no"

fi



Expand Down Expand Up @@ -12702,16 +12664,20 @@ fi

# check for valgrind



# Check whether --enable-valgrind was given.
if test "${enable_valgrind+set}" = set; then :
enableval=$enable_valgrind; enable_valgrind=$enableval
if test "${ENABLE_VALGRIND+set}" = set; then :
enableval=$ENABLE_VALGRIND; ENABLE_VALGRIND=$enableval
else
enable_valgrind="yes"
ENABLE_VALGRIND="yes"
fi


# Check for Valgrind.
# Extract the first word of "valgrind", so it can be a program name with args.
if test "x$ENABLE_VALGRIND" = xyes; then :

# check for valgrind program
# Extract the first word of "valgrind", so it can be a program name with args.
set dummy valgrind; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
Expand Down Expand Up @@ -12748,35 +12714,64 @@ $as_echo "no" >&6; }
fi



if test "$enable_valgrind" = "yes" -a "$VALGRIND" = ""; then :
if test "${VALGRIND}" = ""; then :

{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find valgrind; either install it or reconfigure with --disable-valgrind" >&5
$as_echo "$as_me: WARNING: Could not find valgrind; either install it or reconfigure with --disable-valgrind" >&2;}
enable_valgrind="no"
ENABLE_VALGRIND=no

fi

# Enable valgrind only in debug mode (WARNING $enable_debug must be used to selec debug mode)
if test "$enable_valgrind" = "yes" -a x"$enable_debug" = x"yes"; then :
# Enable valgrind only in debug mode (WARNING $enable_debug must be used to selec debug mode)
if test "x$enable_debug" = xyes; then :
:
else

{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Valgrind works onli in debug mode, either reconfigure with --enable-debug or --disable-valgrind" >&5
$as_echo "$as_me: WARNING: Valgrind works onli in debug mode, either reconfigure with --enable-debug or --disable-valgrind" >&2;}
enable_valgrind="no"
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Valgrind works only in debug mode, either reconfigure with --enable-debug or --disable-valgrind" >&5
$as_echo "$as_me: WARNING: Valgrind works only in debug mode, either reconfigure with --enable-debug or --disable-valgrind" >&2;}
ENABLE_VALGRIND=no

fi

if test "$enable_valgrind" = "yes" ; then
VALGRIND_ENABLED_TRUE=
VALGRIND_ENABLED_FALSE='#'
fi

# Looking for Valgrind specific headers
if test "x$ENABLE_VALGRIND" = xyes; then :
ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
have_valgrind_h=yes
else
VALGRIND_ENABLED_TRUE='#'
VALGRIND_ENABLED_FALSE=
have_valgrind_h=no
fi

VALGRIND_ENABLED=$enable_valgrind

ac_fn_c_check_header_mongrel "$LINENO" "valgrind/memcheck.h" "ac_cv_header_valgrind_memcheck_h" "$ac_includes_default"
if test "x$ac_cv_header_valgrind_memcheck_h" = xyes; then :
have_valgrind_memcheck_h=yes
else
have_valgrind_memcheck_h=no
fi


fi
if test "x$have_valgrind_h" = xyes; then :

$as_echo "#define HAVE_VALGRIND_H 1" >>confdefs.h

fi
if test "x$have_valgrind_memcheck_h" = xyes; then :

$as_echo "#define HAVE_VALGRIND_MEMCHECK_H 1" >>confdefs.h

fi

# AM CONDITIONAL
if test "${ENABLE_VALGRIND}" = "yes" ; then
ENABLE_VALGRIND_TRUE=
ENABLE_VALGRIND_FALSE='#'
else
ENABLE_VALGRIND_TRUE='#'
ENABLE_VALGRIND_FALSE=
fi



Expand All @@ -12795,8 +12790,12 @@ fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Valgrind on the unit tests" >&5
$as_echo_n "checking whether to enable Valgrind on the unit tests... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_valgrind" >&5
$as_echo "$enable_valgrind" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ENABLE_VALGRIND}" >&5
$as_echo "${ENABLE_VALGRIND}" >&6; }





# Check for Valgrind tools we care about.

Expand Down Expand Up @@ -12960,6 +12959,7 @@ VALGRIND_LOGS ?= $(foreach ext,$(TEST_EXTENSIONS),$(valgrind__test_lo
# Internal use
valgrind_log_files = $(addprefix valgrind-suite-,$(addsuffix .log,$(VALGRIND_TOOLS))) \
$(TEST_LOGS:.log=-valgrind-*.log) \
$(TEST_LOGS:.log=-valgrind-*.log.core.*) \
$(TEST_LOGS:.log=-valgrind-*.xml) \
$(TEST_LOGS:.log=-valgrind-*.supp)

Expand Down Expand Up @@ -13002,8 +13002,7 @@ VALGRIND_LOG_COMPILER = \

.PHONY: tests-valgrind tests-valgrind-tool
.PHONY: tests-valgrind-suppressions tests-valgrind-suppressions-tool
ifeq ($(VALGRIND_ENABLED),yes)

ifeq ($(ENABLE_VALGRIND),yes)

_print_valgrind_hello = \
echo ""; \
Expand All @@ -13016,6 +13015,7 @@ _print_valgrind_hello = \
echo " $${supp}"; \
done

$(VALGRIND_LOGS):

tests-valgrind:
@ \
Expand Down Expand Up @@ -13085,6 +13085,7 @@ VALGRIND_CHECK_RULES="${VALGRIND_CHECK_RULES_PRE} ${VALGRIND_CHECK_RULES}"




# check for sanitizer
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
$as_echo_n "checking for C compiler vendor... " >&6; }
Expand Down Expand Up @@ -14534,8 +14535,7 @@ fi
LOG_DRIVER="\$(SHELL) \$(top_srcdir)/conf/test-driver"
abs_srcdir=$(cd ${srcdir}; pwd)


as_fn_append PY_LOG_COMPILER "sh -c LD_PRELOAD=${ENABLE_SANITIZE_LIBPATH} ${PYTHON} -B \$(top_srcdir)/testing/testing.py"
as_fn_append PY_LOG_COMPILER "${PYTHON} -B \$(top_srcdir)/testing/testing.py"
as_fn_append PY_LOG_FLAGS ""

case "${build_os}:${host}" in #(
Expand Down Expand Up @@ -14905,7 +14905,10 @@ done

else

as_fn_append LOG_COMPILER "sh -c \"exit 77\"; :"
LOG_COMPILER="sh -c \"exit 77\"; :"


PY_LOG_COMPILER="sh -c \"exit 77\"; :"

fi
;; #(
Expand Down Expand Up @@ -17352,8 +17355,8 @@ if test -z "${HAVE_PL_TAP_PARSER_TRUE}" && test -z "${HAVE_PL_TAP_PARSER_FALSE}"
as_fn_error $? "conditional \"HAVE_PL_TAP_PARSER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${VALGRIND_ENABLED_TRUE}" && test -z "${VALGRIND_ENABLED_FALSE}"; then
as_fn_error $? "conditional \"VALGRIND_ENABLED\" was never defined.
if test -z "${ENABLE_VALGRIND_TRUE}" && test -z "${ENABLE_VALGRIND_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_VALGRIND\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_SANITIZE_TRUE}" && test -z "${ENABLE_SANITIZE_FALSE}"; then
Expand Down
58 changes: 29 additions & 29 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -133,34 +133,34 @@ AC_ARG_ENABLE([java],
[],
[AS_VAR_SET([enable_java], [yes])])

# Add address sanitizer options to flags, if requested. Only useful for GCC
# version 4.8 and later.
AC_ARG_ENABLE([sanitize-address],
[AS_HELP_STRING(
[--enable-sanitize-address],
[Enable memory error detection using address sanitizer @<:@default=no@:>@]
)],
[enable_san_a="$enableval"],
[enable_san_a="no"]
)

AC_ARG_ENABLE([sanitize-undefined],
[AS_HELP_STRING(
[--enable-sanitize-undefined],
[Enable undefined behavior detection using undefined sanitizer @<:@default=no@:>@]
)],
[enable_san_u="$enableval"],
[enable_san_u="no"]
)

AC_ARG_ENABLE([sanitize-thread],
[AS_HELP_STRING(
[--enable-sanitize-address],
[Enable race condition detection using thread sanitizer @<:@default=no@:>@]
)],
[enable_san_t="$enableval"],
[enable_san_t="no"]
)
dnl # Add address sanitizer options to flags, if requested. Only useful for GCC
dnl # version 4.8 and later.
dnl AC_ARG_ENABLE([sanitize-address],
dnl [AS_HELP_STRING(
dnl [--enable-sanitize-address],
dnl [Enable memory error detection using address sanitizer @<:@default=no@:>@]
dnl )],
dnl [enable_san_a="$enableval"],
dnl [enable_san_a="no"]
dnl )

dnl AC_ARG_ENABLE([sanitize-undefined],
dnl [AS_HELP_STRING(
dnl [--enable-sanitize-undefined],
dnl [Enable undefined behavior detection using undefined sanitizer @<:@default=no@:>@]
dnl )],
dnl [enable_san_u="$enableval"],
dnl [enable_san_u="no"]
dnl )

dnl AC_ARG_ENABLE([sanitize-thread],
dnl [AS_HELP_STRING(
dnl [--enable-sanitize-address],
dnl [Enable race condition detection using thread sanitizer @<:@default=no@:>@]
dnl )],
dnl [enable_san_t="$enableval"],
dnl [enable_san_t="no"]
dnl )

dnl AC_ARG_ENABLE([universal],
dnl [AS_HELP_STRING([--enable-universal],
Expand Down Expand Up @@ -1017,7 +1017,7 @@ AX_PERL_MODULE_VERSION(TAP::Parser 0 TAP::Parser::Aggregator 0,
AM_CONDITIONAL([HAVE_PL_TAP_PARSER],[test x"${have_pl_tap_parser}" = x"yes"])

# check for valgrind
AX_VALGRIND_CHECK
AX_VALGRIND_CHECK([ENABLE_VALGRIND])

# check for sanitizer
AX_ENABLE_SANITIZE([ENABLE_SANITIZE],
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ EGREP = @EGREP@
ENABLE_SANITIZE = @ENABLE_SANITIZE@
ENABLE_SANITIZE_LIBPATH = @ENABLE_SANITIZE_LIBPATH@
ENABLE_SANITIZE_OPTIONS = @ENABLE_SANITIZE_OPTIONS@
ENABLE_VALGRIND = @ENABLE_VALGRIND@
EXEEXT = @EXEEXT@
EXPORTS_FILE = @EXPORTS_FILE@
FC = @FC@
Expand Down Expand Up @@ -379,7 +380,6 @@ UIL = @UIL@
USE_PIPED_MESSAGING = @USE_PIPED_MESSAGING@
USE_TM_GMTOFF = @USE_TM_GMTOFF@
VALGRIND = @VALGRIND@
VALGRIND_ENABLED = @VALGRIND_ENABLED@
VALGRIND_FLAGS = @VALGRIND_FLAGS@
VALGRIND_HAVE_TOOL_drd = @VALGRIND_HAVE_TOOL_drd@
VALGRIND_HAVE_TOOL_exp_sgcheck = @VALGRIND_HAVE_TOOL_exp_sgcheck@
Expand Down
Loading

0 comments on commit dd3f02d

Please sign in to comment.