2013-02-16 15:36:41 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2014-07-13 01:06:41 +00:00
|
|
|
root_dir=$(pwd)
|
|
|
|
|
2014-05-09 21:16:55 +00:00
|
|
|
run() {
|
|
|
|
echo '==============================================='
|
2014-07-13 01:06:41 +00:00
|
|
|
if [ ! $(pwd) = ${root_dir} ]; then
|
|
|
|
printf "cd $(pwd); "
|
|
|
|
fi
|
2014-05-09 21:16:55 +00:00
|
|
|
echo "${@}"
|
|
|
|
echo '==============================================='
|
|
|
|
"${@}"
|
|
|
|
}
|
|
|
|
|
2014-07-13 01:06:41 +00:00
|
|
|
run_cmake() {
|
|
|
|
mkdir -p cmake-build
|
|
|
|
rm -rf cmake-build/*
|
|
|
|
cd cmake-build
|
|
|
|
run cmake ${@} ..
|
|
|
|
run make -j4 check
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
2014-08-15 21:29:53 +00:00
|
|
|
flags="${@}"
|
|
|
|
|
2014-08-17 19:56:13 +00:00
|
|
|
has_flag() {
|
2014-08-15 21:29:53 +00:00
|
|
|
local arg=$1
|
|
|
|
for f in ${flags}; do
|
|
|
|
local key=$(echo $f | awk -F '=' '{print $1}')
|
|
|
|
if [ ${key} = ${arg} ]; then
|
2014-08-17 19:56:13 +00:00
|
|
|
return 0
|
2014-08-15 21:29:53 +00:00
|
|
|
fi
|
|
|
|
done
|
2014-08-17 19:56:13 +00:00
|
|
|
return 1
|
2014-08-15 21:29:53 +00:00
|
|
|
}
|
|
|
|
|
2014-08-17 19:56:13 +00:00
|
|
|
make_target=test
|
|
|
|
|
2014-08-19 17:47:34 +00:00
|
|
|
test `uname -o` = "Cygwin" || run_cmake -DCMAKE_BUILD_TYPE=Debug
|
2014-07-13 01:06:41 +00:00
|
|
|
|
2014-07-30 00:57:02 +00:00
|
|
|
run make jdk-test
|
2014-08-17 19:56:13 +00:00
|
|
|
run make ${flags} ${make_target}
|
|
|
|
run make ${flags} mode=debug ${make_target}
|
|
|
|
run make ${flags} process=interpret ${make_target}
|
|
|
|
|
|
|
|
(has_flag openjdk-src || ! has_flag openjdk) && \
|
|
|
|
run make ${flags} mode=debug bootimage=true ${make_target} && \
|
|
|
|
run make ${flags} bootimage=true ${make_target}
|
2014-08-15 21:29:53 +00:00
|
|
|
|
2014-08-21 19:09:42 +00:00
|
|
|
(! has_flag openjdk && ! has_flag android) && \
|
2014-08-17 19:56:13 +00:00
|
|
|
run make ${flags} openjdk=$JAVA_HOME ${make_target}
|
2014-08-15 21:29:53 +00:00
|
|
|
|
2014-08-17 19:56:13 +00:00
|
|
|
run make ${flags} tails=true continuations=true heapdump=true ${make_target}
|
2014-08-15 21:29:53 +00:00
|
|
|
run make ${flags} codegen-targets=all
|