summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2016-05-19 19:54:50 +0200
committerMerryMage <MerryMage@users.noreply.github.com>2016-05-19 20:28:08 +0200
commit87de1ca96810eace7c3609d5b6ab7bfc93976c44 (patch)
tree7ef368cbab4aa45e9d5e06910a3b740c13cc8a9a
parenttests: Infrastructure for unit tests (diff)
downloadyuzu-87de1ca96810eace7c3609d5b6ab7bfc93976c44.tar
yuzu-87de1ca96810eace7c3609d5b6ab7bfc93976c44.tar.gz
yuzu-87de1ca96810eace7c3609d5b6ab7bfc93976c44.tar.bz2
yuzu-87de1ca96810eace7c3609d5b6ab7bfc93976c44.tar.lz
yuzu-87de1ca96810eace7c3609d5b6ab7bfc93976c44.tar.xz
yuzu-87de1ca96810eace7c3609d5b6ab7bfc93976c44.tar.zst
yuzu-87de1ca96810eace7c3609d5b6ab7bfc93976c44.zip
-rwxr-xr-x.travis-build.sh9
-rw-r--r--CMakeLists.txt2
-rw-r--r--appveyor.yml5
-rw-r--r--src/tests/CMakeLists.txt2
4 files changed, 16 insertions, 2 deletions
diff --git a/.travis-build.sh b/.travis-build.sh
index e06a4299b..511df04ac 100755
--- a/.travis-build.sh
+++ b/.travis-build.sh
@@ -18,9 +18,16 @@ if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
mkdir build && cd build
cmake -DCITRA_FORCE_QT4=ON ..
make -j4
+
+ ctest -VV -C Release
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ set -o pipefail
+
export Qt5_DIR=$(brew --prefix)/opt/qt5
+
mkdir build && cd build
cmake .. -GXcode
- xcodebuild -configuration Release | xcpretty -c && exit ${PIPESTATUS[0]}
+ xcodebuild -configuration Release | xcpretty -c
+
+ ctest -VV -C Release
fi
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f2898973..f7b0af115 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -255,6 +255,8 @@ endif()
add_subdirectory(externals/soundtouch)
+enable_testing()
+
add_subdirectory(src)
# Install freedesktop.org metadata files, following those specifications:
diff --git a/appveyor.yml b/appveyor.yml
index e825ff85d..b2b0ae28b 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -26,7 +26,10 @@ build:
project: build/citra.sln
parallel: true
-after_build:
+test_script:
+ - cd build && ctest -VV -C Release
+
+on_success:
# copying the needed QT Dlls is now done post build. See the CMakeLists.txt file in the citra-qt folder
- ps: >
if (!"$env:APPVEYOR_PULL_REQUEST_TITLE" -and ("$env:APPVEYOR_REPO_BRANCH" -eq "master"))
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index dc476616c..457c55571 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -12,3 +12,5 @@ include_directories(../../externals/catch/single_include/)
add_executable(tests ${SRCS} ${HEADERS})
target_link_libraries(tests core video_core audio_core common)
target_link_libraries(tests ${PLATFORM_LIBRARIES})
+
+add_test(NAME tests COMMAND $<TARGET_FILE:tests>)