docker valgrind

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2025-01-10 11:14:52 -07:00
parent 3095912a6c
commit c6ea49bd2d
4 changed files with 21 additions and 5 deletions

View File

@ -11,7 +11,7 @@ RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
&& sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo \
&& yum install -y devtoolset-8 wget cmake3 make eigen3-devel tcl-devel tcl-tclreadline-devel swig3 bison flex zlib-devel \
&& yum install -y devtoolset-8 wget cmake3 make eigen3-devel tcl-devel tcl-tclreadline-devel swig3 bison flex zlib-devel valgrind \
&& yum clean -y all
# Download CUDD

View File

@ -16,7 +16,8 @@ RUN apt-get update && \
bison \
flex \
automake \
autotools-dev
autotools-dev \
valgrind
# Download CUDD
RUN wget https://raw.githubusercontent.com/davidkebo/cudd/main/cudd_versions/cudd-3.0.0.tar.gz && \

View File

@ -72,10 +72,10 @@ proc source_ { filename echo verbose } {
if [catch {open $filename r} stream] {
sta_error 340 "cannot open '$filename'."
} else {
if { [info commands zlib] == "" } {
sta_error 339 "tcl version > 8.6 required for zlib support."
}
if { [file extension $filename] == ".gz" } {
if { [info commands zlib] == "" } {
sta_error 339 "tcl version > 8.6 required for zlib support."
}
zlib push gunzip $stream
}
# Save file and line in recursive call to source.

View File

@ -75,6 +75,9 @@ proc parse_args {} {
lappend app_options $threads
set argv [lrange $argv 2 end]
} elseif { $arg == "-valgrind" } {
if { ![find_valgrind] } {
error "valgrind not found."
}
set use_valgrind 1
set argv [lrange $argv 1 end]
} elseif { $arg == "-report_stats" } {
@ -92,6 +95,18 @@ proc parse_args {} {
}
}
# Find valgrind in $PATH.
proc find_valgrind {} {
global env
foreach dir [regsub -all ":" $env(PATH) " "] {
if { [file executable [file join $dir "valgrind"]] } {
return 1
}
}
return 0
}
proc expand_tests { argv } {
global test_groups errors