Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
mbedtls
Commits
3895f5a3
Commit
3895f5a3
authored
Mar 27, 2014
by
Manuel Pégourié-Gonnard
Browse files
all.sh: directly go for ASan build
parent
969ccc62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
28 deletions
+32
-28
tests/scripts/all.sh
tests/scripts/all.sh
+32
-28
No files found.
tests/scripts/all.sh
View file @
3895f5a3
...
...
@@ -5,6 +5,9 @@
# Warning: includes various build modes, so it will mess with the current
# CMake configuration. After this script is run, the CMake cache is lost and
# CMake is not initialised any more!
#
# Assumes gcc, clang (recent enough for using ASan) are available, as weel as
# cmake. Also assumes valgrind is available if --memcheck is used.
# Abort on errors (and uninitiliased variables)
set
-eu
...
...
@@ -40,50 +43,50 @@ cleanup()
git checkout
--
{
.,library,programs,tests
}
/Makefile
}
# Step 0: compile with max warnings, with GCC and Clang
msg
()
{
echo
""
echo
"******************************************************************"
echo
"*
$1
"
echo
"******************************************************************"
}
if
which gcc
>
/dev/null
;
then
cleanup
CC
=
gcc cmake
-D
CMAKE_BUILD_TYPE:String
=
Check
.
make
fi
# Step 1: various build types
if
which clang
>
/dev/null
;
then
cleanup
CC
=
clang cmake
-D
CMAKE_BUILD_TYPE:String
=
Check
.
make
fi
msg
"Unix make, default compiler and flags"
cleanup
make
msg
"cmake, gcc with lots of warnings"
cleanup
CC
=
gcc cmake
-D
CMAKE_BUILD_TYPE:String
=
Check
.
make
msg
"cmake, clang with lots of warnings"
cleanup
CC
=
clang cmake
-D
CMAKE_BUILD_TYPE:String
=
Check
.
make
# Step
1
:
Unix Make, default compiler, all test suites/scripts
# Step
2
:
Full tests, with ASan
msg
"ASan build and full tests"
cleanup
cmake
-D
CMAKE_BUILD_TYPE:String
=
ASan
.
make
make
check
make
test
cd
tests
./compat.sh
./ssl-opt.sh
cd
..
tests/scripts/test-ref-configs.pl
# Step 2: using ASan
if
[
"
$MEMORY
"
-gt
0
]
;
then
cleanup
cmake
-D
CMAKE_BUILD_TYPE:String
=
ASan
.
make
make
test
cd
tests
./compat.sh
./ssl-opt.sh
cd
..
tests/scripts/test-ref-configs.pl
fi
# Step 3: using valgrind's memcheck
if
[
"
$MEMORY
"
-gt
0
]
&&
which valgrind
>
/dev/null
;
then
msg
"Release build, full tests with valgrind's memcheck"
cleanup
cmake
-D
CMAKE_BUILD_TYPE:String
=
Debug
.
# optimized build to compensate a bit for valgrind slowdown
cmake
-D
CMAKE_BUILD_TYPE:String
=
Release
.
make
make memcheck
cd
tests
...
...
@@ -95,5 +98,6 @@ fi
# Done
echo
"Done."
cleanup
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment