diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f0a335267..1c63195a7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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 @@ -129,3 +136,4 @@ jobs: neovim-qt.dmg neovim-qt-installer.msi neovim-qt.zip + diff --git a/src/gui/shellwidget/test/test_shellwidget.cpp b/src/gui/shellwidget/test/test_shellwidget.cpp index fd4591c59..e3490c01f 100644 --- a/src/gui/shellwidget/test/test_shellwidget.cpp +++ b/src/gui/shellwidget/test/test_shellwidget.cpp @@ -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++) { @@ -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)); } @@ -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); } }