summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jamrules.jam149
-rw-r--r--tests/allocator.cpp7
-rw-r--r--tests/autotest-local.pl2
-rw-r--r--tests/autotest-report.pl11
-rw-r--r--tests/main.cpp9
-rw-r--r--tests/test_document.cpp6
6 files changed, 174 insertions, 10 deletions
diff --git a/Jamrules.jam b/Jamrules.jam
index 202d583..e3a76ce 100644
--- a/Jamrules.jam
+++ b/Jamrules.jam
@@ -411,6 +411,130 @@ else if ( $(toolset:I=^suncc) )
sunCC $(>) -o $(<) $(LDFLAGS)
}
}
+else if ( $(toolset:I=^xbox360) )
+{
+ rule GetCFlags CONFIG : DEFINES
+ {
+ local RESULT = /D$(DEFINES) ;
+
+ if ( $(CONFIG) = "debug" )
+ {
+ RESULT += /D_DEBUG /MTd ;
+ }
+ else
+ {
+ RESULT += /DNDEBUG /Ox /MT ;
+ }
+
+ RESULT += /W4 ;
+
+ if ( ! ( PUGIXML_NO_EXCEPTIONS in $(DEFINES) ) )
+ {
+ RESULT += /EHsc ;
+ }
+ else
+ {
+ RESULT += /D_HAS_EXCEPTIONS=0 ;
+ }
+
+ return $(RESULT) ;
+ }
+
+ actions ObjectAction
+ {
+ "%XEDK%\bin\win32\cl.exe" /WX /I"%XEDK%\include\xbox" /c $(>) /Fo$(<) /nologo $(CCFLAGS)
+ }
+
+ actions LibraryAction
+ {
+ "%XEDK%\bin\win32\lib.exe" /NOLOGO /OUT:$(<) $(>)
+ }
+
+ actions LinkAction
+ {
+ "%XEDK%\bin\win32\link.exe" /NOLOGO /OUT:$(<) /PDB:$(<:S=.pdb) $(>) /LIBPATH:"%XEDK%\lib\xbox" $(LDFLAGS)
+ }
+}
+else if ( $(toolset:I=^ps3_gcc) )
+{
+ rule GetCFlags CONFIG : DEFINES
+ {
+ local RESULT = -D$(DEFINES) ;
+
+ RESULT += -W -Wall -Wextra -Werror ;
+
+ if ( $(CONFIG) = "debug" )
+ {
+ RESULT += -D_DEBUG ;
+ }
+ else
+ {
+ RESULT += -DNDEBUG -O3 ;
+ }
+
+ if ( PUGIXML_NO_EXCEPTIONS in $(DEFINES) )
+ {
+ RESULT += -fno-exceptions ;
+ }
+
+ return $(RESULT) ;
+ }
+
+ actions ObjectAction
+ {
+ "%SCE_PS3_ROOT%\host-win32\ppu\bin\ppu-lv2-gcc" -c $(>) -o $(<) $(CCFLAGS)
+ }
+
+ actions LibraryAction
+ {
+ "%SCE_PS3_ROOT%\host-win32\ppu\bin\ppu-lv2-ar" rcs $(<) $(>)
+ }
+
+ actions LinkAction
+ {
+ "%SCE_PS3_ROOT%\host-win32\ppu\bin\ppu-lv2-g++" $(>) -o $(<) $(LDFLAGS)
+ }
+}
+else if ( $(toolset:I=^ps3_snc) )
+{
+ rule GetCFlags CONFIG : DEFINES
+ {
+ local RESULT = -D$(DEFINES) ;
+
+ RESULT += -Werror -Xuninitwarn=0 ;
+
+ if ( $(CONFIG) = "debug" )
+ {
+ RESULT += -D_DEBUG ;
+ }
+ else
+ {
+ RESULT += -DNDEBUG -O3 ;
+ }
+
+ if ! ( PUGIXML_NO_EXCEPTIONS in $(DEFINES) )
+ {
+ RESULT += -Xc+=exceptions ;
+ }
+
+ return $(RESULT) ;
+ }
+
+ actions ObjectAction
+ {
+ "%SCE_PS3_ROOT%\host-win32\sn\bin\ps3ppusnc" -c $(>) -o $(<) $(CCFLAGS)
+ }
+
+ actions LibraryAction
+ {
+ "%SCE_PS3_ROOT%\host-win32\sn\bin\ps3snarl" rcs $(<) $(>)
+ }
+
+ actions LinkAction
+ {
+ "%SCE_PS3_ROOT%\host-win32\sn\bin\ps3ppuld" $(>) -o $(<) $(LDFLAGS)
+ }
+}
else
{
exit "Unknown toolset $(toolset)!" ;
@@ -459,15 +583,28 @@ if ( $(UNIX) )
}
else
{
- actions screenoutput RunAction
+ if ( $(toolset:I=^(xbox360|ps3)) )
{
- $(>:\\)
- }
+ actions RunAction
+ {
+ }
- actions RunSampleAction
+ actions RunSampleAction
+ {
+ }
+ }
+ else
{
- cd docs\samples
- ..\..\$(>:\\)
+ actions screenoutput RunAction
+ {
+ $(>:\\)
+ }
+
+ actions RunSampleAction
+ {
+ cd docs\samples
+ ..\..\$(>:\\)
+ }
}
actions quietly ignore MakeDirAction
diff --git a/tests/allocator.cpp b/tests/allocator.cpp
index 7075194..e0efeef 100644
--- a/tests/allocator.cpp
+++ b/tests/allocator.cpp
@@ -9,7 +9,12 @@
# pragma cpp_extensions on // enable some extensions to include windows.h
# endif
-# include <windows.h>
+# ifdef _XBOX_VER
+# define NOD3D
+# include <xtl.h>
+# else
+# include <windows.h>
+# endif
namespace
{
diff --git a/tests/autotest-local.pl b/tests/autotest-local.pl
index 4893e27..86e5114 100644
--- a/tests/autotest-local.pl
+++ b/tests/autotest-local.pl
@@ -26,7 +26,7 @@ sub gcctoolset
}
$fast = (shift eq 'fast');
-@toolsets = ($^O =~ /MSWin/) ? (bcc, cw, dmc, ic8, ic9, ic9_x64, ic10, ic10_x64, ic11, ic11_x64, mingw34, mingw44, mingw45, mingw45_0x, mingw46_x64, msvc6, msvc7, msvc71, msvc8, msvc8_x64, msvc9, msvc9_x64, msvc10, msvc10_x64) : ($^O =~ /solaris/) ? (suncc, suncc_x64) : &gcctoolset();
+@toolsets = ($^O =~ /MSWin/) ? (bcc, cw, dmc, ic8, ic9, ic9_x64, ic10, ic10_x64, ic11, ic11_x64, mingw34, mingw44, mingw45, mingw45_0x, mingw46_x64, msvc6, msvc7, msvc71, msvc8, msvc8_x64, msvc9, msvc9_x64, msvc10, msvc10_x64, xbox360, ps3_gcc, ps3_snc) : ($^O =~ /solaris/) ? (suncc, suncc_x64) : &gcctoolset();
@configurations = (debug, release);
@defines = (PUGIXML_NO_XPATH, PUGIXML_NO_EXCEPTIONS, PUGIXML_NO_STL, PUGIXML_WCHAR_MODE);
$stddefine = 'PUGIXML_STANDARD';
diff --git a/tests/autotest-report.pl b/tests/autotest-report.pl
index 3a70b15..a01a907 100644
--- a/tests/autotest-report.pl
+++ b/tests/autotest-report.pl
@@ -27,12 +27,16 @@ sub prettytoolset
return "Microsoft Visual C++ $1.0" . prettysuffix($2) if ($toolset =~ /^msvc(\d+)(.*)$/);
return "GNU C++ Compiler $1" . prettysuffix($2) if ($toolset =~ /^gcc([\d.]*)(.*)$/);
+ return "Microsoft Xbox360 Compiler" if ($toolset =~ /^xbox360/);
+ return "Sony PlayStation3 GCC" if ($toolset =~ /^ps3_gcc/);
+ return "Sony PlayStation3 SNC" if ($toolset =~ /^ps3_snc/);
+
$toolset;
}
sub prettyplatform
{
- my $platform = shift;
+ my ($platform, $toolset) = @_;
return "solaris" if ($platform =~ /solaris/);
@@ -44,6 +48,9 @@ sub prettyplatform
return "fbsd64" if ($platform =~ /64-freebsd/);
return "fbsd32" if ($platform =~ /86-freebsd/);
+ return "x360" if ($toolset =~ /^xbox360/);
+ return "ps3" if ($toolset =~ /^ps3/);
+
return "win64" if ($platform =~ /MSWin32-x64/);
return "win32" if ($platform =~ /MSWin32/);
@@ -70,7 +77,7 @@ while (<>)
{
my ($platform, $toolset, $configuration, $defineset, $info) = ($1, $2, $3, $4, $5);
- my $fulltool = &prettyplatform($platform) . ' ' . &prettytoolset($toolset);
+ my $fulltool = &prettyplatform($platform, $toolset) . ' ' . &prettytoolset($toolset);
my $fullconf = "$configuration $defineset";
if ($info =~ /^prepare/)
diff --git a/tests/main.cpp b/tests/main.cpp
index b8d4e53..4330009 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -110,6 +110,15 @@ static bool run_test(test_runner* test)
#endif
}
+#if defined(__CELLOS_LV2__) && defined(PUGIXML_NO_EXCEPTIONS) && !defined(__SNC__)
+#include <stdlib.h>
+
+void std::exception::_Raise() const
+{
+ abort();
+}
+#endif
+
int main()
{
#ifdef __BORLANDC__
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index c40c14a..9a83a6d 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -19,6 +19,10 @@
# include <io.h> // for unlink in C++0x mode
#endif
+#if defined(__CELLOS_LV2__)
+# include <unistd.h> // for unlink
+#endif
+
TEST(document_create_empty)
{
pugi::xml_document doc;
@@ -253,6 +257,8 @@ TEST_XML(document_save_file, "<node/>")
int fd = mkstemp(path);
CHECK(fd != -1);
+#elif defined(__CELLOS_LV2__)
+ const char* path = ""; // no temporary file support
#else
const char* path = tmpnam(0);
#endif