Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
equalsraf committed Aug 1, 2023
1 parent f5d9424 commit 5d5cff3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ jobs:
macdeployqt ./build/bin/nvim-qt.app -dmg
mv ./build/bin/nvim-qt.dmg neovim-qt.dmg
- name: Upload Test Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: ${{ matrix.name }}_testoutput
path: |
build/test_shellwidget_output/
- name: Upload Artifacts
if: ${{ matrix.publish }}
uses: actions/upload-artifact@v2
Expand All @@ -129,3 +136,4 @@ jobs:
neovim-qt.dmg
neovim-qt-installer.msi
neovim-qt.zip
12 changes: 8 additions & 4 deletions src/gui/shellwidget/test/test_shellwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ void Test::diffWidgetOutput(QString name)
QImage diff(output.size(), QImage::Format_RGB32);
diff.fill(Qt::white);

bool failed = false;
bool failed = (output.width() != expected.width()) || (output.height() != expected.height());
if (failed) {
qWarning() << "Output dimensions do not match";
}

for (int y=0; y < output.height(); y++) {
for (int x=0; x < output.width(); x++) {
Expand All @@ -214,9 +217,10 @@ void Test::diffWidgetOutput(QString name)
qDebug() << "Saving diff" << outpath;


if (QGuiApplication::platformName() != "xcb") {
auto platform = QGuiApplication::platformName();
if (platform != "xcb") {
auto msg = QString("Skipping render test in non X11: %1")
.arg(QGuiApplication::platformName());
.arg(platform);
QSKIP(qPrintable(msg));
}

Expand All @@ -226,7 +230,7 @@ void Test::diffWidgetOutput(QString name)
QCOMPARE(output.height(), expected.height());

if (failed) {
qWarning() << "Failing diff, check the output diff image" << outpath;
qWarning() << platform << " - Failing diff, check the output diff image" << outpath;
QCOMPARE(failed, false);
}
}
Expand Down

0 comments on commit 5d5cff3

Please sign in to comment.