File: util.h

package info (click to toggle)
qt6-quick3dphysics 6.9.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,116 kB
  • sloc: cpp: 261,267; python: 40; makefile: 21
file content (23 lines) | stat: -rw-r--r-- 670 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef QUICK3D_PHYSICS_TEST_UTIL_H
#define QUICK3D_PHYSICS_TEST_UTIL_H

#include <QtGlobal>
#include <QtCore/qstring.h>

using namespace Qt::StringLiterals;

QString needSkip() {
    if (!qEnvironmentVariableIsEmpty("QEMU_LD_PREFIX"))
        return "This test is unstable on QEMU, so it will be skipped."_L1;

    auto platform = qEnvironmentVariable("QT_QPA_PLATFORM");
    if (platform == "offscreen"_L1 || platform == "minimal"_L1)
        return "This test doesn't work on offscreen or minimal, so it will be skipped."_L1;

    return ""_L1;
}

#endif