SquishTests: Adapt cmake based speedcrunch test

Change-Id: Ic4c22311828f2c0364cbc514b98d2cb4e7d1b86a
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2023-07-27 09:39:22 +02:00
parent e321b3d6fc
commit 488f1b3d11
3 changed files with 43 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
From e5aec585120ca65b92e642b50b1552f75df26b93 Mon Sep 17 00:00:00 2001
From: Christian Stenger <christian.stenger@qt.io>
Date: Thu, 27 Jul 2023 08:49:30 +0200
Subject: [PATCH] Fix build on macOS
---
src/CMakeLists.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7be6aad..0cad721 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,7 +18,6 @@ if(APPLE)
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${speedcrunch_VERSION})
set(MACOSX_BUNDLE_VERSION ${speedcrunch_VERSION})
set(MACOSX_BUNDLE_LONG_VERSION_STRING Version ${speedcrunch_VERSION})
- set(CMAKE_OSX_ARCHITECTURES ppc;i386)
else(APPLE)
set(PROGNAME speedcrunch)
endif(APPLE)
@@ -71,7 +70,7 @@ if(APPLE)
set( speedcrunch_RESOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${PROGNAME}.app/Contents/Resources )
add_custom_command(TARGET ${PROGNAME} POST_BUILD
COMMAND mkdir ARGS -p ${speedcrunch_RESOURCE_DIR}
- COMMAND cp ARGS -f resources/${MACOSX_BUNDLE_ICON_FILE} ${speedcrunch_RESOURCE_DIR})
+ COMMAND cp ARGS -f ${CMAKE_CURRENT_SOURCE_DIR}/resources/${MACOSX_BUNDLE_ICON_FILE} ${speedcrunch_RESOURCE_DIR})
endif(APPLE)
add_custom_target(confclean COMMAND rm -rf Makefile CMakeFiles/ CMakeCache.txt cmake_install.cmake DartTestfile.txt install_manifest.txt)
--
2.32.0 (Apple Git-132)

View File

@@ -32,6 +32,16 @@ def main():
if not SpeedCrunchPath:
test.fatal("Could not clone SpeedCrunch")
return
# patch CMakeLists.txt outside of QC
try:
patchFile = os.path.join(os.path.dirname(__file__),
"..", "..", "0001-Fix-build-on-macOS.patch")
subprocess.check_call(["git", "am", patchFile], cwd=SpeedCrunchPath)
test.log("Patched speedcrunch.")
except:
t, v = sys.exc_info()[:2]
test.warning("Patching speedcrunch failed.", "%s(%s)" % (str(t), str(v)))
startQC()
if not startedWithoutPluginError():
return

View File

@@ -1,6 +1,5 @@
"text" "nestinglevel"
"CMakeLists.txt" "0"
"speedcrunch" "0"
"Header Files" "1"
"genericdock.h" "2"
"Source Files" "1"
1 text nestinglevel
2 CMakeLists.txt 0
speedcrunch 0
3 Header Files 1
4 genericdock.h 2
5 Source Files 1