2013-02-03 03:44:25 +04:00
|
|
|
/* Workaround for CTEST_CUSTOM_POST_TEST not allowing arguments
|
|
|
|
compile with
|
2013-02-03 04:39:43 +04:00
|
|
|
-DPYBIN=/usr/bin/python
|
2013-02-03 03:44:25 +04:00
|
|
|
-DPYSRC=/home/janedoe/openscad/tests/test_pretty_print.py
|
|
|
|
-DBUILDDIR=--builddir=/home/janedoe/openscad/tests/bin"
|
|
|
|
*/
|
|
|
|
|
2013-02-12 11:07:54 +04:00
|
|
|
#include <cstddef>
|
2013-02-03 03:44:25 +04:00
|
|
|
#include <unistd.h>
|
2013-02-03 04:39:43 +04:00
|
|
|
//#include <stdio.h>
|
2013-02-03 03:44:25 +04:00
|
|
|
|
|
|
|
#define PREQUOTE(x) #x
|
|
|
|
#define QUOTE(x) PREQUOTE(x)
|
|
|
|
int main( int argc, char * argv[] )
|
|
|
|
{
|
|
|
|
char *newargs[4];
|
|
|
|
newargs[0] = const_cast<char *>(QUOTE( PYBIN ));
|
|
|
|
newargs[1] = const_cast<char *>(QUOTE( PYSRC ));
|
|
|
|
newargs[2] = const_cast<char *>(QUOTE( BUILDDIR ));
|
|
|
|
newargs[3] = NULL;
|
2013-02-03 04:39:43 +04:00
|
|
|
//printf(":%s:%s:%s\n", newargs[0], newargs[1], newargs[2]);
|
2013-02-03 03:44:25 +04:00
|
|
|
return execv( newargs[0], newargs );
|
|
|
|
}
|
|
|
|
|
|
|
|
|