From cfd336d1637f441cd0bbafdcc7f29ae28b8a9652 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 9bf836c32..2ddb57bfe 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -135,7 +135,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) @@ -196,7 +196,7 @@ jobs: make package export CUTTER_VERSION=$(python3 ../scripts/get_version.py) echo PACKAGE_NAME=Cutter-${CUTTER_VERSION}-Darwin.dmg >> $GITHUB_ENV - ./src/test/CutterTest; + ./test/CutterTest; - name: windows dependencies if: contains(matrix.os, 'windows') shell: bash @@ -235,7 +235,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% - uses: actions/upload-artifact@v2 if: env.PACKAGE_NAME != null diff --git a/CMakeLists.txt b/CMakeLists.txt index 07f5f6dfd..bc80901a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,3 +133,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 9fae25fbe..c03e74d8d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -560,7 +560,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