Skip to content

Commit

Permalink
Add an xcode project to run the tests.
Browse files Browse the repository at this point in the history
Also makes the qslint command line program.
  • Loading branch information
dak180 committed Feb 25, 2012
1 parent a1fc808 commit c91f51a
Show file tree
Hide file tree
Showing 24 changed files with 1,341 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/.gitignore
@@ -0,0 +1,3 @@
#Mac Stuff
build/
Build/
@@ -0,0 +1 @@
Really, the only thing likely to happen is that you break the file.
929 changes: 929 additions & 0 deletions tests/Tests.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions tests/configs/Base-Tests.xcconfig
@@ -0,0 +1,15 @@
// Global settings for all Test configurations


GCC_VERSION = com.apple.compilers.llvm.clang.1_0
INSTALL_PATH = /usr/local/bin

LD_RUNPATH_SEARCH_PATHS = @loader_path @loader_path/. @loader_path/../macosx/build/$(CONFIGURATION) @loader_path/../macosx/build/$(CONFIGURATION)/. @loader_path/Warzone.app/Contents/Frameworks /Applications/Warzone.app/Contents/Frameworks

ALWAYS_SEARCH_USER_PATHS = NO

FRAMEWORK_SEARCH_PATHS = $(inherited) $(FRAMEWORK_SEARCH_PATHS_QUOTED_2) $(FRAMEWORK_SEARCH_PATHS_QUOTED_3)

USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/.." "$(SRCROOT)/../tools" "$(SRCROOT)"

srcdir = $(SRCROOT)
29 changes: 29 additions & 0 deletions tests/configs/Project-All.xcconfig
@@ -0,0 +1,29 @@
// Global settings for all configurations


ARCHS = i386 x86_64
SDKROOT = macosx10.5
SDKROOT[arch=x86_64] = macosx10.6
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
MACOSX_DEPLOYMENT_TARGET = 10.5
MACOSX_DEPLOYMENT_TARGET[sdk=macosx10.6] = 10.6
COPY_PHASE_STRIP = NO
DEAD_CODE_STRIPPING = YES
GCC_AUTO_VECTORIZATION = YES
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_DEBUGGING_SYMBOLS = full
GCC_C_LANGUAGE_STANDARD = gnu99
GCC_ALTIVEC_EXTENSIONS = YES
OTHER_CFLAGS = $(inherited)
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) __MACOSX__

FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "$(SDK_DIR)/System/Library/Frameworks"
FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "$(SRCROOT)/../macosx/build/$(CONFIGURATION)"
FRAMEWORK_SEARCH_PATHS_QUOTED_3 = "$(SRCROOT)/../macosx/external/QT"

LIBRARY_SEARCH_PATHS_QUOTED_1 = "$(SDK_DIR)/usr/lib"
LIBRARY_SEARCH_PATHS_QUOTED_2 = "$(SRCROOT)/../macosx/build/$(CONFIGURATION)"
LIBRARY_SEARCH_PATHS_QUOTED_3 = "$(SRCROOT)/../macosx/external/QT"

HEADER_SEARCH_PATHS_QUOTED_1 = "$(SRCROOT)/../macosx/external/glew/include/**"
40 changes: 40 additions & 0 deletions tests/configs/maptest-All.xcconfig
@@ -0,0 +1,40 @@
// maptest settings for all configurations

#include "Base-Tests.xcconfig"


PRODUCT_NAME = maptest

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(BUILD_PREPROCESSOR_DEFINITIONS)


OTHER_CFLAGS = $(FlagsForCandCpp) $(WarnForC) $(inherited)
OTHER_CFLAGS[arch=i386] = $(inherited) // intel 32 bit only
OTHER_CFLAGS[arch=x86_64] = $(inherited) // intel 64 bit only

OTHER_CPLUSPLUSFLAGS = $(FlagsForCandCpp) $(WarnForCpp)
OTHER_CPLUSPLUSFLAGS[arch=i386] = $(inherited) // intel 32 bit only
OTHER_CPLUSPLUSFLAGS[arch=x86_64] = $(inherited) // intel 64 bit only


// Warnings
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES // -Wswitch
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES // -Wmissing-braces
GCC_WARN_ABOUT_RETURN_TYPE = YES // -Wreturn-type
GCC_WARN_MISSING_PARENTHESES = YES // -Wparentheses
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES // -Wmissing-field-initializers
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO // FIXME: -Wno-format Hides some "format not a string literal and no format arguments" warnings; these should be fixed at some point
GCC_WARN_UNDECLARED_SELECTOR = YES // -Wundeclared-selector
GCC_WARN_UNUSED_FUNCTION = YES // -Wunused-function
GCC_WARN_UNUSED_LABEL = YES // -Wunused-label
GCC_WARN_UNUSED_VALUE = YES // -Wunused-value
GCC_WARN_UNUSED_VARIABLE = YES // -Wunused-variable

// Build setting dependent warnings
WarnForCandCpp = -Wall -Wextra -Wcast-align -Wwrite-strings -Wpointer-arith $(WarnForCandCppDep)
WarnForC = -Wstrict-prototypes -Wdeclaration-after-statement $(WarnForCDep)
WarnForCpp = $(WarnForCppDep)

// Additional build flags for both c and c++ files
FlagsForCandCpp = $(BuildDependentFlagsForCandCpp) $(WarnForCandCpp)
FlagsForCandCpp[arch=i386] = $(inherited) // Flags for intel 32 bit only
17 changes: 17 additions & 0 deletions tests/configs/maptest-Debug.xcconfig
@@ -0,0 +1,17 @@
// maptest settings for Debug configuration

#include "maptest-All.xcconfig"


GCC_ENABLE_FIX_AND_CONTINUE = YES
GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
BUILD_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG

// Additional build flags for both c and c++ files
BuildDependentFlagsForCandCpp = -Werror -fstack-protector-all

// Build setting dependent warnings
WarnForCandCppDep = -Wno-error=unused-parameter -Wno-error=format-security -Wno-sign-compare // -Wno-error=sign-compare // FIXME: For some reason these will be errors anyway, so off for now
WarnForCDep =
WarnForCppDep = // -Wno-error=enum-compare // not currently supported by compiler
14 changes: 14 additions & 0 deletions tests/configs/maptest-Release.xcconfig
@@ -0,0 +1,14 @@
// maptest settings for Release configuration

#include "maptest-All.xcconfig"


GCC_OPTIMIZATION_LEVEL = 2
BUILD_PREPROCESSOR_DEFINITIONS = $(inherited)

BuildDependentFlagsForCandCpp = -fstack-protector

// Build setting dependent warnings
WarnForCandCppDep = -Wno-unused-parameter -Wno-format-security -Wno-sign-compare
WarnForCDep =
WarnForCppDep = // -Wno-enum-compare // not currently supported by compiler
11 changes: 11 additions & 0 deletions tests/configs/maptest-StaticAnalyzer.xcconfig
@@ -0,0 +1,11 @@
// maptest settings for StaticAnalyzer configuration

#include "maptest-Debug.xcconfig"


RUN_CLANG_STATIC_ANALYZER = YES
GCC_OPTIMIZATION_LEVEL = 2

// Analyser Settings
// CCC_ANALYZER_OUTPUT_FORMAT = plist-html
// CCC_ANALYZER_ANALYSIS = -analyzer-opt-analyze-headers // need to find someplace that lists everything that could go here
40 changes: 40 additions & 0 deletions tests/configs/modeltest-All.xcconfig
@@ -0,0 +1,40 @@
// modeltest settings for all configurations

#include "Base-Tests.xcconfig"


PRODUCT_NAME = modeltest

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(BUILD_PREPROCESSOR_DEFINITIONS)


OTHER_CFLAGS = $(FlagsForCandCpp) $(WarnForC) $(inherited)
OTHER_CFLAGS[arch=i386] = $(inherited) // intel 32 bit only
OTHER_CFLAGS[arch=x86_64] = $(inherited) // intel 64 bit only

OTHER_CPLUSPLUSFLAGS = $(FlagsForCandCpp) $(WarnForCpp)
OTHER_CPLUSPLUSFLAGS[arch=i386] = $(inherited) // intel 32 bit only
OTHER_CPLUSPLUSFLAGS[arch=x86_64] = $(inherited) // intel 64 bit only


// Warnings
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES // -Wswitch
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES // -Wmissing-braces
GCC_WARN_ABOUT_RETURN_TYPE = YES // -Wreturn-type
GCC_WARN_MISSING_PARENTHESES = YES // -Wparentheses
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES // -Wmissing-field-initializers
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO // FIXME: -Wno-format Hides some "format not a string literal and no format arguments" warnings; these should be fixed at some point
GCC_WARN_UNDECLARED_SELECTOR = YES // -Wundeclared-selector
GCC_WARN_UNUSED_FUNCTION = YES // -Wunused-function
GCC_WARN_UNUSED_LABEL = YES // -Wunused-label
GCC_WARN_UNUSED_VALUE = YES // -Wunused-value
GCC_WARN_UNUSED_VARIABLE = YES // -Wunused-variable

// Build setting dependent warnings
WarnForCandCpp = -Wall -Wextra -Wcast-align -Wwrite-strings -Wpointer-arith $(WarnForCandCppDep)
WarnForC = -Wstrict-prototypes -Wdeclaration-after-statement $(WarnForCDep)
WarnForCpp = $(WarnForCppDep)

// Additional build flags for both c and c++ files
FlagsForCandCpp = $(BuildDependentFlagsForCandCpp) $(WarnForCandCpp)
FlagsForCandCpp[arch=i386] = $(inherited) // Flags for intel 32 bit only
17 changes: 17 additions & 0 deletions tests/configs/modeltest-Debug.xcconfig
@@ -0,0 +1,17 @@
// modeltest settings for Debug configuration

#include "modeltest-All.xcconfig"


GCC_ENABLE_FIX_AND_CONTINUE = YES
GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
BUILD_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG

// Additional build flags for both c and c++ files
BuildDependentFlagsForCandCpp = -Werror -fstack-protector-all

// Build setting dependent warnings
WarnForCandCppDep = -Wno-error=unused-parameter -Wno-error=format-security -Wno-sign-compare // -Wno-error=sign-compare // FIXME: For some reason these will be errors anyway, so off for now
WarnForCDep =
WarnForCppDep = // -Wno-error=enum-compare // not currently supported by compiler
14 changes: 14 additions & 0 deletions tests/configs/modeltest-Release.xcconfig
@@ -0,0 +1,14 @@
// modeltest settings for Release configuration

#include "modeltest-All.xcconfig"


GCC_OPTIMIZATION_LEVEL = 2
BUILD_PREPROCESSOR_DEFINITIONS = $(inherited)

BuildDependentFlagsForCandCpp = -fstack-protector

// Build setting dependent warnings
WarnForCandCppDep = -Wno-unused-parameter -Wno-format-security -Wno-sign-compare
WarnForCDep =
WarnForCppDep = // -Wno-enum-compare // not currently supported by compiler
11 changes: 11 additions & 0 deletions tests/configs/modeltest-StaticAnalyzer.xcconfig
@@ -0,0 +1,11 @@
// modeltest settings for StaticAnalyzer configuration

#include "modeltest-Debug.xcconfig"


RUN_CLANG_STATIC_ANALYZER = YES
GCC_OPTIMIZATION_LEVEL = 2

// Analyser Settings
// CCC_ANALYZER_OUTPUT_FORMAT = plist-html
// CCC_ANALYZER_ANALYSIS = -analyzer-opt-analyze-headers // need to find someplace that lists everything that could go here
40 changes: 40 additions & 0 deletions tests/configs/qslint-All.xcconfig
@@ -0,0 +1,40 @@
// qslint settings for all configurations

#include "Base-Tests.xcconfig"


PRODUCT_NAME = qslint

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(BUILD_PREPROCESSOR_DEFINITIONS)


OTHER_CFLAGS = $(FlagsForCandCpp) $(WarnForC) $(inherited)
OTHER_CFLAGS[arch=i386] = $(inherited) // intel 32 bit only
OTHER_CFLAGS[arch=x86_64] = $(inherited) // intel 64 bit only

OTHER_CPLUSPLUSFLAGS = $(FlagsForCandCpp) $(WarnForCpp)
OTHER_CPLUSPLUSFLAGS[arch=i386] = $(inherited) // intel 32 bit only
OTHER_CPLUSPLUSFLAGS[arch=x86_64] = $(inherited) // intel 64 bit only


// Warnings
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES // -Wswitch
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES // -Wmissing-braces
GCC_WARN_ABOUT_RETURN_TYPE = YES // -Wreturn-type
GCC_WARN_MISSING_PARENTHESES = YES // -Wparentheses
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES // -Wmissing-field-initializers
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO // FIXME: -Wno-format Hides some "format not a string literal and no format arguments" warnings; these should be fixed at some point
GCC_WARN_UNDECLARED_SELECTOR = YES // -Wundeclared-selector
GCC_WARN_UNUSED_FUNCTION = YES // -Wunused-function
GCC_WARN_UNUSED_LABEL = YES // -Wunused-label
GCC_WARN_UNUSED_VALUE = YES // -Wunused-value
GCC_WARN_UNUSED_VARIABLE = YES // -Wunused-variable

// Build setting dependent warnings
WarnForCandCpp = -Wall -Wextra -Wcast-align -Wwrite-strings -Wpointer-arith $(WarnForCandCppDep)
WarnForC = -Wstrict-prototypes -Wdeclaration-after-statement $(WarnForCDep)
WarnForCpp = $(WarnForCppDep)

// Additional build flags for both c and c++ files
FlagsForCandCpp = $(BuildDependentFlagsForCandCpp) $(WarnForCandCpp)
FlagsForCandCpp[arch=i386] = $(inherited) // Flags for intel 32 bit only
17 changes: 17 additions & 0 deletions tests/configs/qslint-Debug.xcconfig
@@ -0,0 +1,17 @@
// qslint settings for Debug configuration

#include "qslint-All.xcconfig"


GCC_ENABLE_FIX_AND_CONTINUE = YES
GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
BUILD_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG

// Additional build flags for both c and c++ files
BuildDependentFlagsForCandCpp = -Werror -fstack-protector-all

// Build setting dependent warnings
WarnForCandCppDep = -Wno-error=unused-parameter -Wno-error=format-security -Wno-sign-compare // -Wno-error=sign-compare // FIXME: For some reason these will be errors anyway, so off for now
WarnForCDep =
WarnForCppDep = // -Wno-error=enum-compare // not currently supported by compiler
14 changes: 14 additions & 0 deletions tests/configs/qslint-Release.xcconfig
@@ -0,0 +1,14 @@
// qslint settings for Release configuration

#include "qslint-All.xcconfig"


GCC_OPTIMIZATION_LEVEL = 2
BUILD_PREPROCESSOR_DEFINITIONS = $(inherited)

BuildDependentFlagsForCandCpp = -fstack-protector

// Build setting dependent warnings
WarnForCandCppDep = -Wno-unused-parameter -Wno-format-security -Wno-sign-compare
WarnForCDep =
WarnForCppDep = // -Wno-enum-compare // not currently supported by compiler
11 changes: 11 additions & 0 deletions tests/configs/qslint-StaticAnalyzer.xcconfig
@@ -0,0 +1,11 @@
// qslint settings for StaticAnalyzer configuration

#include "qslint-Debug.xcconfig"


RUN_CLANG_STATIC_ANALYZER = YES
GCC_OPTIMIZATION_LEVEL = 2

// Analyser Settings
// CCC_ANALYZER_OUTPUT_FORMAT = plist-html
// CCC_ANALYZER_ANALYSIS = -analyzer-opt-analyze-headers // need to find someplace that lists everything that could go here
40 changes: 40 additions & 0 deletions tests/configs/qtscripttest-All.xcconfig
@@ -0,0 +1,40 @@
// qtscripttest settings for all configurations

#include "Base-Tests.xcconfig"


PRODUCT_NAME = qtscripttest

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(BUILD_PREPROCESSOR_DEFINITIONS)


OTHER_CFLAGS = $(FlagsForCandCpp) $(WarnForC) $(inherited)
OTHER_CFLAGS[arch=i386] = $(inherited) // intel 32 bit only
OTHER_CFLAGS[arch=x86_64] = $(inherited) // intel 64 bit only

OTHER_CPLUSPLUSFLAGS = $(FlagsForCandCpp) $(WarnForCpp)
OTHER_CPLUSPLUSFLAGS[arch=i386] = $(inherited) // intel 32 bit only
OTHER_CPLUSPLUSFLAGS[arch=x86_64] = $(inherited) // intel 64 bit only


// Warnings
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES // -Wswitch
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES // -Wmissing-braces
GCC_WARN_ABOUT_RETURN_TYPE = YES // -Wreturn-type
GCC_WARN_MISSING_PARENTHESES = YES // -Wparentheses
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES // -Wmissing-field-initializers
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO // FIXME: -Wno-format Hides some "format not a string literal and no format arguments" warnings; these should be fixed at some point
GCC_WARN_UNDECLARED_SELECTOR = YES // -Wundeclared-selector
GCC_WARN_UNUSED_FUNCTION = YES // -Wunused-function
GCC_WARN_UNUSED_LABEL = YES // -Wunused-label
GCC_WARN_UNUSED_VALUE = YES // -Wunused-value
GCC_WARN_UNUSED_VARIABLE = YES // -Wunused-variable

// Build setting dependent warnings
WarnForCandCpp = -Wall -Wextra -Wcast-align -Wwrite-strings -Wpointer-arith $(WarnForCandCppDep)
WarnForC = -Wstrict-prototypes -Wdeclaration-after-statement $(WarnForCDep)
WarnForCpp = $(WarnForCppDep)

// Additional build flags for both c and c++ files
FlagsForCandCpp = $(BuildDependentFlagsForCandCpp) $(WarnForCandCpp)
FlagsForCandCpp[arch=i386] = $(inherited) // Flags for intel 32 bit only
17 changes: 17 additions & 0 deletions tests/configs/qtscripttest-Debug.xcconfig
@@ -0,0 +1,17 @@
// qtscripttest settings for Debug configuration

#include "qtscripttest-All.xcconfig"


GCC_ENABLE_FIX_AND_CONTINUE = YES
GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
BUILD_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG

// Additional build flags for both c and c++ files
BuildDependentFlagsForCandCpp = -Werror -fstack-protector-all

// Build setting dependent warnings
WarnForCandCppDep = -Wno-error=unused-parameter -Wno-error=format-security -Wno-sign-compare // -Wno-error=sign-compare // FIXME: For some reason these will be errors anyway, so off for now
WarnForCDep =
WarnForCppDep = // -Wno-error=enum-compare // not currently supported by compiler
14 changes: 14 additions & 0 deletions tests/configs/qtscripttest-Release.xcconfig
@@ -0,0 +1,14 @@
// qtscripttest settings for Release configuration

#include "qtscripttest-All.xcconfig"


GCC_OPTIMIZATION_LEVEL = 2
BUILD_PREPROCESSOR_DEFINITIONS = $(inherited)

BuildDependentFlagsForCandCpp = -fstack-protector

// Build setting dependent warnings
WarnForCandCppDep = -Wno-unused-parameter -Wno-format-security -Wno-sign-compare
WarnForCDep =
WarnForCppDep = // -Wno-enum-compare // not currently supported by compiler
11 changes: 11 additions & 0 deletions tests/configs/qtscripttest-StaticAnalyzer.xcconfig
@@ -0,0 +1,11 @@
// qtscripttest settings for StaticAnalyzer configuration

#include "qtscripttest-Debug.xcconfig"


RUN_CLANG_STATIC_ANALYZER = YES
GCC_OPTIMIZATION_LEVEL = 2

// Analyser Settings
// CCC_ANALYZER_OUTPUT_FORMAT = plist-html
// CCC_ANALYZER_ANALYSIS = -analyzer-opt-analyze-headers // need to find someplace that lists everything that could go here

0 comments on commit c91f51a

Please sign in to comment.