mirror of https://github.com/vitalif/openscad
deal with ctest CTEST_CUSTOM_POST_TEST argument bugs
parent
5b1cb69f59
commit
d0b5e193b8
|
@ -67,7 +67,7 @@ execute_process(COMMAND __openscad_binpath__ --info OUTPUT_FILE sysinfo.txt)
|
|||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS 2.8.12)
|
||||
set(CTEST_CUSTOM_POST_TEST ${CTEST_CUSTOM_POST_TEST} "__cmake_current_binary_dir__/test_pretty_print")
|
||||
else()
|
||||
set(CTEST_CUSTOM_POST_TEST ${CTEST_CUSTOM_POST_TEST} "__python__ __cmake_current_source_dir__/test_pretty_print.py --builddir=__cmake_current_binary_dir__ __openscad_upload_tests__")
|
||||
set(CTEST_CUSTOM_POST_TEST ${CTEST_CUSTOM_POST_TEST} "__python__ \"__cmake_current_source_dir__/test_pretty_print.py\" --builddir=__cmake_current_binary_dir__ __openscad_upload_tests__")
|
||||
endif()
|
||||
|
||||
if ( ${debug_openscad_template} )
|
||||
|
|
|
@ -70,14 +70,18 @@ linconv=mingw_cross_info.linux_convert #'/usr/bin/convert'
|
|||
list64=[]
|
||||
list32=[]
|
||||
imbase=''
|
||||
winconv=''
|
||||
for basedir in 'C:/Program Files','C:/Program Files (x86)':
|
||||
if os.path.isdir(basedir):
|
||||
pflist=os.listdir(basedir)
|
||||
for subdir in pflist:
|
||||
if 'ImageMagick' in subdir:
|
||||
imbase = basedir+'/'+subdir
|
||||
winconv=imbase+'/convert.exe'
|
||||
if not os.path.isfile(winconv):
|
||||
winconv = imbase+'/convert.exe'
|
||||
if os.path.isfile(winconv):
|
||||
break
|
||||
if winconv != '': break
|
||||
if winconv=='':
|
||||
print 'error, cant find convert.exe'
|
||||
|
||||
linoslib='OPENSCADPATH='+linbase+'/tests/../libraries'
|
||||
|
|
|
@ -11,11 +11,14 @@ not usable for cross-build situations.
|
|||
|
||||
#include <cstddef>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define PREQUOTE(x) #x
|
||||
#define QUOTE(x) PREQUOTE(x)
|
||||
int main( int argc, char * argv[] )
|
||||
{
|
||||
printf("test_pretty_print CTEST_CUSTOM_POST_TEST bug workaround\n");
|
||||
printf("attempting to run: %s %s %s\n",QUOTE(PYBIN),QUOTE(PYSRC),QUOTE(BUILDDIR));
|
||||
char *newargs[4];
|
||||
newargs[0] = const_cast<char *>(QUOTE( PYBIN ));
|
||||
newargs[1] = const_cast<char *>(QUOTE( PYSRC ));
|
||||
|
|
Loading…
Reference in New Issue