From ee9d2f04b7edfb22d57f3ef418cc6acea0ddc5b1 Mon Sep 17 00:00:00 2001 From: yossizap Date: Fri, 5 Feb 2021 23:09:52 +0000 Subject: [PATCH] Move tests to test/ --- .github/workflows/ccpp.yml | 6 +++--- CMakeLists.txt | 4 ++++ src/CMakeLists.txt | 4 ---- {src/test => test}/AutoTest.h | 0 {src/test => test}/CMakeLists.txt | 0 {src/test => test}/CutterTest.cpp | 0 {src/test => test}/CutterTest.h | 0 {src/test => test}/TestHexdumpWidget.cpp | 0 {src/test => test}/main.cpp | 0 9 files changed, 7 insertions(+), 7 deletions(-) rename {src/test => test}/AutoTest.h (100%) rename {src/test => test}/CMakeLists.txt (100%) rename {src/test => test}/CutterTest.cpp (100%) rename {src/test => test}/CutterTest.h (100%) rename {src/test => test}/TestHexdumpWidget.cpp (100%) rename {src/test => test}/main.cpp (100%) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 778e66f5..06dcb702 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -137,7 +137,7 @@ jobs: fi ninja export QT_QPA_PLATFORM=minimal - ./src/test/CutterTest + ./test/CutterTest if [[ "${{ matrix.package || false }}" = "true" ]] then export CUTTER_VERSION=$(python ../scripts/get_version.py) @@ -204,7 +204,7 @@ jobs: export CUTTER_VERSION=$(python3 ../scripts/get_version.py) echo PACKAGE_NAME=${PACKAGE_NAME}.dmg >> $GITHUB_ENV echo UPLOAD_ASSET_TYPE=application/x-apple-diskimage >> $GITHUB_ENVV - ./src/test/CutterTest; + ./test/CutterTest; - name: windows dependencies if: contains(matrix.os, 'windows') shell: bash @@ -244,7 +244,7 @@ jobs: .. cmake --build . --config Release cmake --build . --config Release --target package - src/test/CutterTest + cd test; CutterTest echo PACKAGE_NAME=%PACKAGE_NAME%.zip >> %GITHUB_ENV% echo UPLOAD_ASSET_TYPE=application/zip >> %GITHUB_ENV% - uses: actions/upload-artifact@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index ef398b44..73acd49f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,3 +136,7 @@ add_subdirectory(src) if(CUTTER_ENABLE_PACKAGING) add_subdirectory(dist) endif() + +if(CUTTER_ENABLE_TESTS) + add_subdirectory(test) +endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 84dff4f5..468c957c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -602,7 +602,3 @@ if(UNIX AND NOT APPLE) DESTINATION "share/applications" COMPONENT Devel) endif() - -if(CUTTER_ENABLE_TESTS) - add_subdirectory(test) -endif() diff --git a/src/test/AutoTest.h b/test/AutoTest.h similarity index 100% rename from src/test/AutoTest.h rename to test/AutoTest.h diff --git a/src/test/CMakeLists.txt b/test/CMakeLists.txt similarity index 100% rename from src/test/CMakeLists.txt rename to test/CMakeLists.txt diff --git a/src/test/CutterTest.cpp b/test/CutterTest.cpp similarity index 100% rename from src/test/CutterTest.cpp rename to test/CutterTest.cpp diff --git a/src/test/CutterTest.h b/test/CutterTest.h similarity index 100% rename from src/test/CutterTest.h rename to test/CutterTest.h diff --git a/src/test/TestHexdumpWidget.cpp b/test/TestHexdumpWidget.cpp similarity index 100% rename from src/test/TestHexdumpWidget.cpp rename to test/TestHexdumpWidget.cpp diff --git a/src/test/main.cpp b/test/main.cpp similarity index 100% rename from src/test/main.cpp rename to test/main.cpp