summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/CMakeLists.txt8
-rw-r--r--tests/OffscreenContextWGL.cc21
-rwxr-xr-xtests/ctest_pretty_print.py32
-rw-r--r--tests/fbo.cc15
4 files changed, 54 insertions, 22 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 5723344..85c4f21 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -75,9 +75,15 @@ if (NOT $ENV{MACOSX_DEPLOY_DIR} STREQUAL "")
set(BOOST_ROOT "$ENV{MACOSX_DEPLOY_DIR}")
endif()
+if (WIN32)
+ set(Boost_USE_STATIC_LIBS TRUE)
+ set(BOOST_STATIC TRUE)
+ set(BOOST_THREAD_USE_LIB TRUE)
+endif()
+
#set(Boost_DEBUG TRUE)
set(Boost_NO_SYSTEM_PATHS TRUE)
-set(Boost_ADDITIONAL_VERSIONS "1.47.0")
+set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.0")
find_package( Boost 1.35.0 COMPONENTS thread program_options )
if(Boost_FOUND)
message(STATUS "Boost includes found: " ${Boost_INCLUDE_DIRS})
diff --git a/tests/OffscreenContextWGL.cc b/tests/OffscreenContextWGL.cc
index 1aa99dc..3756a82 100644
--- a/tests/OffscreenContextWGL.cc
+++ b/tests/OffscreenContextWGL.cc
@@ -22,6 +22,7 @@ For more info:
#include <GL/gl.h> // must be included after glew.h
+#include <map>
#include <string>
#include <sstream>
@@ -57,14 +58,24 @@ string get_windows_info()
SYSTEM_INFO si;
GetSystemInfo(&si);
+ map<WORD,const char*> archs;
+ archs[PROCESSOR_ARCHITECTURE_AMD64] = "amd64";
+ archs[PROCESSOR_ARCHITECTURE_IA64] = "itanium";
+ archs[PROCESSOR_ARCHITECTURE_INTEL] = "x86";
+ archs[PROCESSOR_ARCHITECTURE_UNKNOWN] = "unknown";
stringstream out;
out << "OS info: "
- << "Microsoft(TM) Windows(TM) " << osvi.dwMajorVersion << " "
- << osvi.dwMinorVersion << " " << osvi.dwBuildNumber << " "
- << osvi.szCSDVersion << "\n";
+ << "Microsoft(TM) Windows(TM) " << osvi.dwMajorVersion << " "
+ << osvi.dwMinorVersion << " " << osvi.dwBuildNumber << " "
+ << osvi.szCSDVersion;
+ if (archs.find(si.wProcessorArchitecture) != archs.end())
+ out << " " << archs[si.wProcessorArchitecture];
+ out << "\n";
- out << "Machine: " << si.dwOemID << " " << si.dwProcessorType;
+ out << "Machine: " << si.dwProcessorType;
+
+ return out.str();
}
string offscreen_context_getinfo(OffscreenContext *ctx)
@@ -72,7 +83,7 @@ string offscreen_context_getinfo(OffscreenContext *ctx)
stringstream out;
out << glew_dump(false);
out << get_windows_info();
- return result;
+ return out.str();
}
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
diff --git a/tests/ctest_pretty_print.py b/tests/ctest_pretty_print.py
index 0b81f98..430f106 100755
--- a/tests/ctest_pretty_print.py
+++ b/tests/ctest_pretty_print.py
@@ -3,7 +3,7 @@ import string,platform,sys,re,os
wiki_basepath = 'OpenSCAD'
logfilename = 'LastTest.log'
-builddir = '.'
+builddir = os.getcwd()
logpath = os.path.join(builddir,'Testing','Temporary',logfilename)
NO_END = False
if logfilename.endswith('.tmp'): NO_END = True
@@ -18,11 +18,15 @@ def read_sysinfo():
machine = re.search('Machine:(.*?)\n',data)
osinfo = re.search('OS info:(.*?)\n',data)
renderer = re.search('GL Renderer:(.*?)\n',data)
- if machine: machine_str = machine.group(1).strip()
- if osinfo: osplain_str = osinfo.group(1).strip().split(' ')[0].strip()
+ if machine: machine_str = machine.group(1).strip().replace(' ','-').replace('/','-')
+ if osinfo:
+ osplain_str = osinfo.group(1).strip().split(' ')[0].strip().replace('/','-')
+ if 'windows' in osinfo.group(1).lower(): osplain_str = 'win'
if renderer:
tmp = renderer.group(1).strip().split(' ')
- renderer_str = string.join(tmp[0:3],'-')
+ tmp = string.join(tmp[0:3],'-')
+ if '/' in tmp: tmp = tmp.split('/')[0]
+ renderer_str = tmp
platform = osplain_str + '_' + machine_str + '_' + renderer_str
platform = platform.lower()
return data, platform
@@ -119,12 +123,11 @@ def parse(data):
def towiki(startdate, tests, enddate, sysinfo, platform):
def convert_path(fulltestname,platform,path):
# convert system path name (image file) to wiki path name
- testprogram = fulltestname[0:fulltestname.find('_')]
+ testprogram = fulltestname[0:fulltestname.rfind('_')]
testprogram = testprogram.replace('test','')
filename = os.path.basename(path)
- filename = filename.replace('-actual','')
- filename = filename.replace('-tests','')
- filename = filename.replace('-expected','')
+ filename = filename.replace('-tests-actual.png','.png')
+ filename = filename.replace('-tests-expected.png','.png')
try:
platform = platform[0].upper() + platform[1:]
except:
@@ -144,7 +147,8 @@ detailed system info:
SYSINFO
</pre>
-runtime: STARTDATE to ENDDATE
+start time: STARTDATE
+end time : ENDDATE
Failed tests
@@ -181,17 +185,25 @@ Passed tests
x = x.replace('PLATFORM',platform)
for t in tests:
+ print t.type, t.fullname, t.expectedfile, t.outputfile
if t.passed:
tmp = str(repeat2)
tmp = tmp.replace('PTESTNAME',t.fullname)
x = x.replace(repeat2,tmp + repeat2)
- else:
+ elif not t.passed and t.type=='png':
tmp = str(repeat1)
tmp = tmp.replace('FTESTNAME',t.fullname)
+
wiki_imgpath1 = convert_path(t.fullname,'expected',t.expectedfile)
+ if t.type!='png': wiki_imgpath1 = ''
+ if t.expectedfile=='': wiki_imgpath2 = ''
tmp = tmp.replace('EXPECTEDIMG',wiki_imgpath1)
+
wiki_imgpath2 = convert_path(t.fullname,platform,t.outputfile)
+ if t.type!='png': wiki_imgpath2 = ''
+ if t.outputfile=='': wiki_imgpath2 = ''
tmp = tmp.replace('ACTUALIMG',wiki_imgpath2)
+
x = x.replace(repeat1,tmp + repeat1)
x = x.replace(repeat1,'')
diff --git a/tests/fbo.cc b/tests/fbo.cc
index 2a3342d..2f933d7 100644
--- a/tests/fbo.cc
+++ b/tests/fbo.cc
@@ -93,6 +93,7 @@ bool fbo_ext_init(fbo_t *fbo, size_t width, size_t height)
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
GL_RENDERBUFFER_EXT, fbo->depthbuf_id);
if (report_glerror("specifying depth render buffer EXT")) return false;
+
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT,
GL_RENDERBUFFER_EXT, fbo->depthbuf_id);
if (report_glerror("specifying stencil render buffer EXT")) return false;
@@ -142,7 +143,8 @@ bool fbo_arb_init(fbo_t *fbo, size_t width, size_t height)
return false;
}
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
+ //glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER, fbo->depthbuf_id);
if (report_glerror("specifying depth stencil render buffer")) return false;
@@ -181,21 +183,22 @@ bool fbo_resize(fbo_t *fbo, size_t width, size_t height)
{
if (use_ext()) {
glBindRenderbufferEXT(GL_RENDERBUFFER, fbo->depthbuf_id);
- if (glewIsSupported("GL_EXT_packed_depth_stencil")) {
+ if (0) { // glewIsSupported("GL_EXT_packed_depth_stencil")) {
glRenderbufferStorageEXT(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, width, height);
- if (report_glerror("creating depth stencil render buffer")) return false;
+ if (report_glerror("creating EXT depth stencil render buffer")) return false;
}
else {
glRenderbufferStorageEXT(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, width, height);
- if (report_glerror("creating depth render buffer")) return false;
+ if (report_glerror("creating EXT depth render buffer")) return false;
}
glBindRenderbufferEXT(GL_RENDERBUFFER, fbo->renderbuf_id);
glRenderbufferStorageEXT(GL_RENDERBUFFER, GL_RGBA8, width, height);
- if (report_glerror("creating color render buffer")) return false;
+ if (report_glerror("creating EXT color render buffer")) return false;
} else {
glBindRenderbuffer(GL_RENDERBUFFER, fbo->depthbuf_id);
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, width, height);
+ //glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, width, height);
+ glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT32, width, height);
if (report_glerror("creating depth stencil render buffer")) return false;
glBindRenderbuffer(GL_RENDERBUFFER, fbo->renderbuf_id);
contact: Jan Huwald // Impressum