Skip to content

Commit

Permalink
Enable tests for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nirvn committed Jun 8, 2024
1 parent 02a7858 commit ef67cef
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
-D APP_VERSION="${APP_VERSION}" \
-D APP_VERSION_STR="${APP_VERSION_STR}" \
-D APP_PACKAGE_NAME="${APP_PACKAGE_NAME}" \
-D ENABLE_TESTS=OFF \
-D ENABLE_TESTS=ON \
-D NUGET_USERNAME=opengisch \
-D NUGET_TOKEN=${{ secrets.GITHUB_TOKEN }} \
-D SENTRY_DSN=${{ secrets.SENTRY_DSN }} \
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
SOURCE_DIR=$( cygpath "${{ github.workspace }}" )
pip install -r "${SOURCE_DIR}/test/spix/requirements.txt"
cd "${{ env.CMAKE_BUILD_DIR }}"
ctest --output-on-failure -C ${{ env.BUILD_TYPE }}
ctest --output-on-failure -C ${{ env.BUILD_TYPE }} -E qmltest
- name: Package
shell: bash
Expand Down Expand Up @@ -150,6 +150,7 @@ jobs:
path: ${{ env.ARTIFACT_PATHNAME }}

- name: 📊 Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: "test-report-x64-windows-static-${{ env.BUILD_TYPE }}"
Expand Down
5 changes: 5 additions & 0 deletions src/core/appinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ bool AppInterface::hasProjectOnLaunch() const

bool AppInterface::loadFile( const QString &path, const QString &name )
{
if ( QFileInfo::exists( path ) )
{
return mApp->loadProjectFile( path, name );
}

const QUrl url( path );
return mApp->loadProjectFile( url.isLocalFile() ? url.toLocalFile() : url.path(), name );
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgismobileapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ bool QgisMobileapp::loadProjectFile( const QString &path, const QString &name )
QFileInfo fi( path );
if ( !fi.exists() )
{
QgsMessageLog::logMessage( tr( "Project file \"%1\" does not exist" ).arg( path ), QStringLiteral( "QField" ), Qgis::Warning );
QgsMessageLog::logMessage( tr( "Can't load project, file \"%1\" does not exist" ).arg( path ), QStringLiteral( "QField" ), Qgis::Warning );
return false;
}

Expand Down Expand Up @@ -739,7 +739,7 @@ void QgisMobileapp::readProjectFile()
{
QFileInfo fi( mProjectFilePath );
if ( !fi.exists() )
QgsMessageLog::logMessage( tr( "Project file \"%1\" does not exist" ).arg( mProjectFilePath ), QStringLiteral( "QField" ), Qgis::Warning );
QgsMessageLog::logMessage( tr( "Can't read project, file \"%1\" does not exist" ).arg( mProjectFilePath ), QStringLiteral( "QField" ), Qgis::Warning );

QSettings().setValue( QStringLiteral( "QField/lastProjectFilePath" ), mProjectFilePath );

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit ef67cef

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.