diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-05-21 11:21:44 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-05-23 07:49:38 (GMT) |
commit | b5f1a55c3112f46f27e2306fac7d93bde96152e6 (patch) | |
tree | 08cc007f5fafbe24374a03c1b54f03bc7712030e /tests | |
parent | 1ec8acd77b6c048f5a68887ac7750b0764ade598 (diff) | |
download | Qt-b5f1a55c3112f46f27e2306fac7d93bde96152e6.zip Qt-b5f1a55c3112f46f27e2306fac7d93bde96152e6.tar.gz Qt-b5f1a55c3112f46f27e2306fac7d93bde96152e6.tar.bz2 |
tst_bic: make it possible to test for cross-compilation
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/auto/bic/gen.sh | 2 | ||||
-rw-r--r-- | tests/auto/bic/tst_bic.cpp | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/tests/auto/bic/gen.sh b/tests/auto/bic/gen.sh index 8005880..7bcad24 100755 --- a/tests/auto/bic/gen.sh +++ b/tests/auto/bic/gen.sh @@ -56,7 +56,7 @@ fi for module in $modules; do echo "#include <$module/$module>" >test.cpp - g++ -c -I$QTDIR/include -DQT_NO_STL -DQT3_SUPPORT -fdump-class-hierarchy test.cpp + ${CXX-g++} $CXXFLAGS -c -I$QTDIR/include -DQT_NO_STL -DQT3_SUPPORT -fdump-class-hierarchy test.cpp mv test.cpp*.class $module.$2.txt # Remove template classes from the output perl -pi -e '$skip = 1 if (/^(Class|Vtable).*</); diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp index 400fcc1..504512d 100644 --- a/tests/auto/bic/tst_bic.cpp +++ b/tests/auto/bic/tst_bic.cpp @@ -178,13 +178,17 @@ void tst_Bic::sizesAndVTables_data() QSKIP("Test not implemented for this compiler/platform", SkipAll); #else -#if defined Q_OS_LINUX && defined Q_WS_X11 +#if defined(FILESUFFIX) + // cross-testing +#elif defined Q_OS_LINUX && defined Q_WS_X11 # if defined(__powerpc__) && !defined(__powerpc64__) # define FILESUFFIX "linux-gcc-ppc32" # elif defined(__amd64__) # define FILESUFFIX "linux-gcc-amd64" # elif defined(__i386__) # define FILESUFFIX "linux-gcc-ia32" +# elif defined(__ARMEL__) +# define FILESUFFIX "linux-gcc-armel" # endif #elif defined Q_OS_MAC && defined(__powerpc__) # define FILESUFFIX "macx-gcc-ppc32" @@ -233,9 +237,11 @@ QBic::Info tst_Bic::getCurrentInfo(const QString &libName) #ifdef Q_OS_WIN qtDir.replace('\\', '/'); #endif - QString compilerName = "g++"; + QString compilerName = QString::fromLocal8Bit(qgetenv("CXX")); + if (compilerName.isEmpty()) + compilerName = "g++"; - QStringList args; + QStringList args = QString::fromLocal8Bit(qgetenv("CXXFLAGS")).split(' '); args << "-c" << "-I" + qtDir + "/include" #ifdef Q_OS_MAC |