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)
|
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")
|
set(CTEST_CUSTOM_POST_TEST ${CTEST_CUSTOM_POST_TEST} "__cmake_current_binary_dir__/test_pretty_print")
|
||||||
else()
|
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()
|
endif()
|
||||||
|
|
||||||
if ( ${debug_openscad_template} )
|
if ( ${debug_openscad_template} )
|
||||||
|
|
|
@ -70,14 +70,18 @@ linconv=mingw_cross_info.linux_convert #'/usr/bin/convert'
|
||||||
list64=[]
|
list64=[]
|
||||||
list32=[]
|
list32=[]
|
||||||
imbase=''
|
imbase=''
|
||||||
|
winconv=''
|
||||||
for basedir in 'C:/Program Files','C:/Program Files (x86)':
|
for basedir in 'C:/Program Files','C:/Program Files (x86)':
|
||||||
if os.path.isdir(basedir):
|
if os.path.isdir(basedir):
|
||||||
pflist=os.listdir(basedir)
|
pflist=os.listdir(basedir)
|
||||||
for subdir in pflist:
|
for subdir in pflist:
|
||||||
if 'ImageMagick' in subdir:
|
if 'ImageMagick' in subdir:
|
||||||
imbase = basedir+'/'+subdir
|
imbase = basedir+'/'+subdir
|
||||||
winconv=imbase+'/convert.exe'
|
winconv = imbase+'/convert.exe'
|
||||||
if not os.path.isfile(winconv):
|
if os.path.isfile(winconv):
|
||||||
|
break
|
||||||
|
if winconv != '': break
|
||||||
|
if winconv=='':
|
||||||
print 'error, cant find convert.exe'
|
print 'error, cant find convert.exe'
|
||||||
|
|
||||||
linoslib='OPENSCADPATH='+linbase+'/tests/../libraries'
|
linoslib='OPENSCADPATH='+linbase+'/tests/../libraries'
|
||||||
|
|
|
@ -11,11 +11,14 @@ not usable for cross-build situations.
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#define PREQUOTE(x) #x
|
#define PREQUOTE(x) #x
|
||||||
#define QUOTE(x) PREQUOTE(x)
|
#define QUOTE(x) PREQUOTE(x)
|
||||||
int main( int argc, char * argv[] )
|
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];
|
char *newargs[4];
|
||||||
newargs[0] = const_cast<char *>(QUOTE( PYBIN ));
|
newargs[0] = const_cast<char *>(QUOTE( PYBIN ));
|
||||||
newargs[1] = const_cast<char *>(QUOTE( PYSRC ));
|
newargs[1] = const_cast<char *>(QUOTE( PYSRC ));
|
||||||
|
|
Loading…
Reference in New Issue