summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrono <chron0@users.noreply.github.com>2018-10-06 18:03:52 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-10-07 22:09:54 +0000
commit17a7bf3fd25d5b862b02267843fa2d37ed387d43 (patch)
tree648203637503efef5a9fb2b4dcba5809a4078f10
parent3f35a84968f100e1e6d3c9df467fd3c82a9ebb13 (diff)
Add AUTOTEST Option to CMakeLists.txt
-rwxr-xr-x.circleci/cmake-asan3
-rwxr-xr-x.circleci/cmake-tsan3
-rwxr-xr-x.travis/cmake-freebsd-stage23
-rwxr-xr-x.travis/cmake-linux3
-rwxr-xr-x.travis/cmake-osx3
-rw-r--r--.travis/cmake-windows.sh2
-rw-r--r--CMakeLists.txt4
-rw-r--r--INSTALL.md1
-rw-r--r--appveyor.yml2
9 files changed, 16 insertions, 8 deletions
diff --git a/.circleci/cmake-asan b/.circleci/cmake-asan
index 2f9e99a8..5c381ee4 100755
--- a/.circleci/cmake-asan
+++ b/.circleci/cmake-asan
@@ -18,7 +18,8 @@ cmake -B_build -H. -GNinja \
18 -DMUST_BUILD_TOXAV=ON \ 18 -DMUST_BUILD_TOXAV=ON \
19 -DSTRICT_ABI=ON \ 19 -DSTRICT_ABI=ON \
20 -DTEST_TIMEOUT_SECONDS=120 \ 20 -DTEST_TIMEOUT_SECONDS=120 \
21 -DUSE_IPV6=OFF 21 -DUSE_IPV6=OFF \
22 -DAUTOTEST=ON
22 23
23cd _build 24cd _build
24 25
diff --git a/.circleci/cmake-tsan b/.circleci/cmake-tsan
index 5d4453ff..31123dfa 100755
--- a/.circleci/cmake-tsan
+++ b/.circleci/cmake-tsan
@@ -18,7 +18,8 @@ cmake -H. -B_build -GNinja \
18 -DMUST_BUILD_TOXAV=ON \ 18 -DMUST_BUILD_TOXAV=ON \
19 -DSTRICT_ABI=ON \ 19 -DSTRICT_ABI=ON \
20 -DTEST_TIMEOUT_SECONDS=120 \ 20 -DTEST_TIMEOUT_SECONDS=120 \
21 -DUSE_IPV6=OFF 21 -DUSE_IPV6=OFF \
22 -DAUTOTEST=ON
22 23
23cd _build 24cd _build
24 25
diff --git a/.travis/cmake-freebsd-stage2 b/.travis/cmake-freebsd-stage2
index cf09490c..9750531e 100755
--- a/.travis/cmake-freebsd-stage2
+++ b/.travis/cmake-freebsd-stage2
@@ -60,7 +60,8 @@ travis_script() {
60 -DMUST_BUILD_TOXAV=ON \ 60 -DMUST_BUILD_TOXAV=ON \
61 -DSTRICT_ABI=ON \ 61 -DSTRICT_ABI=ON \
62 -DTEST_TIMEOUT_SECONDS=120 \ 62 -DTEST_TIMEOUT_SECONDS=120 \
63 -DUSE_IPV6=OFF' 63 -DUSE_IPV6=OFF \
64 -DAUTOTEST=ON'
64 65
65 # We created the VM with the same number of cores as the host, so the host-ran `nproc` here is fine 66 # We created the VM with the same number of cores as the host, so the host-ran `nproc` here is fine
66 RUN 'gmake "-j$NPROC" -k install -C_build' 67 RUN 'gmake "-j$NPROC" -k install -C_build'
diff --git a/.travis/cmake-linux b/.travis/cmake-linux
index 5f8fcbde..3b34f474 100755
--- a/.travis/cmake-linux
+++ b/.travis/cmake-linux
@@ -97,7 +97,8 @@ travis_script() {
97 -DMUST_BUILD_TOXAV=ON \ 97 -DMUST_BUILD_TOXAV=ON \
98 -DSTRICT_ABI=ON \ 98 -DSTRICT_ABI=ON \
99 -DTEST_TIMEOUT_SECONDS=120 \ 99 -DTEST_TIMEOUT_SECONDS=120 \
100 -DUSE_IPV6=OFF 100 -DUSE_IPV6=OFF \
101 -DAUTOTEST=ON
101 102
102 cd _build # pushd 103 cd _build # pushd
103 make "-j$NPROC" -k install 104 make "-j$NPROC" -k install
diff --git a/.travis/cmake-osx b/.travis/cmake-osx
index 9c5b8e10..b6526b15 100755
--- a/.travis/cmake-osx
+++ b/.travis/cmake-osx
@@ -31,7 +31,8 @@ travis_script() {
31 -DMIN_LOGGER_LEVEL=TRACE \ 31 -DMIN_LOGGER_LEVEL=TRACE \
32 -DMUST_BUILD_TOXAV=ON \ 32 -DMUST_BUILD_TOXAV=ON \
33 -DTEST_TIMEOUT_SECONDS=120 \ 33 -DTEST_TIMEOUT_SECONDS=120 \
34 -DUSE_IPV6=OFF 34 -DUSE_IPV6=OFF \
35 -DAUTOTEST=ON
35 36
36 cd _build # pushd 37 cd _build # pushd
37 make "-j$NPROC" -k install 38 make "-j$NPROC" -k install
diff --git a/.travis/cmake-windows.sh b/.travis/cmake-windows.sh
index 80e37141..f22accc0 100644
--- a/.travis/cmake-windows.sh
+++ b/.travis/cmake-windows.sh
@@ -30,7 +30,7 @@ travis_script() {
30 -e ENABLE_ARCH_i686=$i686 \ 30 -e ENABLE_ARCH_i686=$i686 \
31 -e ENABLE_ARCH_x86_64=$x86_64 \ 31 -e ENABLE_ARCH_x86_64=$x86_64 \
32 -e ENABLE_TEST=true \ 32 -e ENABLE_TEST=true \
33 -e EXTRA_CMAKE_FLAGS="-DBOOTSTRAP_DAEMON=OFF -DMIN_LOGGER_LEVEL=DEBUG -DTEST_TIMEOUT_SECONDS=90" \ 33 -e EXTRA_CMAKE_FLAGS="-DBOOTSTRAP_DAEMON=OFF -DMIN_LOGGER_LEVEL=DEBUG -DTEST_TIMEOUT_SECONDS=90 -DAUTOTEST=ON" \
34 -e DCMAKE_C_FLAGS="$C_FLAGS" \ 34 -e DCMAKE_C_FLAGS="$C_FLAGS" \
35 -e CMAKE_CXX_FLAGS="$CXX_FLAGS" \ 35 -e CMAKE_CXX_FLAGS="$CXX_FLAGS" \
36 -e CMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \ 36 -e CMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7142af5f..e7c0d79b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -389,8 +389,10 @@ if(ANDROID_CPU_FEATURES)
389 set(CPUFEATURES other/cpufeatures.c) 389 set(CPUFEATURES other/cpufeatures.c)
390endif() 390endif()
391 391
392option(AUTOTEST "Enable autotests (mainly for CI)" OFF)
393
392function(auto_test target) 394function(auto_test target)
393 if(NOT (MSVC AND ARGV1 STREQUAL "MSVC_DONT_BUILD")) 395 if(AUTOTEST AND NOT (MSVC AND ARGV1 STREQUAL "MSVC_DONT_BUILD"))
394 add_executable(auto_${target}_test ${CPUFEATURES} 396 add_executable(auto_${target}_test ${CPUFEATURES}
395 auto_tests/${target}_test.c) 397 auto_tests/${target}_test.c)
396 target_link_modules(auto_${target}_test toxcore misc_tools) 398 target_link_modules(auto_${target}_test toxcore misc_tools)
diff --git a/INSTALL.md b/INSTALL.md
index 9ba73e33..5e5828ac 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -94,6 +94,7 @@ There are some options that are available to configure the build.
94| `STRICT_ABI` | Enforce strict ABI export in dynamic libraries. | ON or OFF | OFF | 94| `STRICT_ABI` | Enforce strict ABI export in dynamic libraries. | ON or OFF | OFF |
95| `TEST_TIMEOUT_SECONDS` | Limit runtime of each test to the number of seconds specified. | Positive number or nothing (empty string). | Empty string. | 95| `TEST_TIMEOUT_SECONDS` | Limit runtime of each test to the number of seconds specified. | Positive number or nothing (empty string). | Empty string. |
96| `USE_IPV6` | Use IPv6 in tests. | ON or OFF | ON | 96| `USE_IPV6` | Use IPv6 in tests. | ON or OFF | ON |
97| `AUTOTEST` | Enable autotests (mainly for CI). | ON or OFF | OFF |
97 98
98You can get this list of option using the following commands 99You can get this list of option using the following commands
99 100
diff --git a/appveyor.yml b/appveyor.yml
index 1b5227e3..08505615 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -21,7 +21,7 @@ install:
21 - cd ../.. 21 - cd ../..
22 22
23before_build: 23before_build:
24 - cmake -B_build -H. -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF -DBUILD_TOXAV=OFF -DTEST_TIMEOUT_SECONDS=120 24 - cmake -B_build -H. -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF -DBUILD_TOXAV=OFF -DTEST_TIMEOUT_SECONDS=120 -DAUTOTEST=ON
25 25
26build: 26build:
27 project: _build/INSTALL.vcxproj 27 project: _build/INSTALL.vcxproj