Skip to content

Commit 23d1dd1

Browse files
committed
Misc: Add two test scripts
Add two scripts for testing build.
1 parent 25b217f commit 23d1dd1

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

tests/cmake-test.sh

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# Test script for CMake build
4+
5+
BASE_DIR=$(dirname "$0")/..
6+
. "${BASE_DIR}/functions.sh"
7+
8+
BUILD_DIR="build"
9+
10+
cmake_prepare() {
11+
[ ! -e "CMakeLists.txt" ] && ln -s {_,}CMakeLists.txt
12+
}
13+
14+
cmake_build() {
15+
einfo Building compton with cmake $@
16+
17+
[ -e "${BUILD_DIR}" ] && rm -r "${BUILD_DIR}"
18+
mkdir "${BUILD_DIR}" && cd "${BUILD_DIR}" || die
19+
cmake ${@} .. || die
20+
make VERBOSE=1 -B || die
21+
cd -
22+
23+
einfo Build completed successfully
24+
}
25+
26+
show_build_help_msg() {
27+
"${BUILD_DIR}/compton" -h | less
28+
}
29+
30+
main() {
31+
cmake_prepare
32+
cmake_build "${@}"
33+
# show_build_help_msg
34+
}
35+
36+
main "${@}"

tests/make-tests.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Test script for GNU make build
4+
5+
BASE_DIR=$(dirname "$0")/..
6+
. "${BASE_DIR}/functions.sh"
7+
8+
OPTIONS=( NO_XINERAMA NO_LIBCONFIG NO_REGEX_PCRE NO_REGEX_PCRE_JIT
9+
NO_VSYNC_DRM NO_VSYNC_OPENGL NO_VSYNC_OPENGL_GLSL NO_VSYNC_OPENGL_FBO
10+
NO_VSYNC_OPENGL_VBO NO_DBUS NO_XSYNC NO_C2 )
11+
12+
for o in "${OPTIONS[@]}"; do
13+
einfo Building with $o
14+
make "${o}=1" -B "${@}" || die
15+
einfo Build completed.
16+
done

0 commit comments

Comments
 (0)