summaryrefslogtreecommitdiff
path: root/tests/test_pretty_print.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-02-03 02:13:37 (GMT)
committerMarius Kintel <marius@kintel.net>2013-02-03 02:13:37 (GMT)
commitd2d22503eb0e9b5cfe3846562aa84af18a044907 (patch)
tree536dc65cf43152e3934ac123086afa9d9d648483 /tests/test_pretty_print.cc
parente5448f5e69f6d59256ba1816acf2647e808e10db (diff)
parent44cddd0b3cf69b1e10811f0000c0ddef02c15d58 (diff)
Merge pull request #271 from openscad/cmake_workaround
Cmake workaround
Diffstat (limited to 'tests/test_pretty_print.cc')
-rw-r--r--tests/test_pretty_print.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_pretty_print.cc b/tests/test_pretty_print.cc
new file mode 100644
index 0000000..9959189
--- /dev/null
+++ b/tests/test_pretty_print.cc
@@ -0,0 +1,24 @@
+/* Workaround for CTEST_CUSTOM_POST_TEST not allowing arguments
+ compile with
+ -DPYBIN=/usr/bin/python
+ -DPYSRC=/home/janedoe/openscad/tests/test_pretty_print.py
+ -DBUILDDIR=--builddir=/home/janedoe/openscad/tests/bin"
+*/
+
+#include <unistd.h>
+//#include <stdio.h>
+
+#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;
+ //printf(":%s:%s:%s\n", newargs[0], newargs[1], newargs[2]);
+ return execv( newargs[0], newargs );
+}
+
+
contact: Jan Huwald // Impressum