top Makefile: new target 'test'
authorAndrei Zavada <johnhommer@gmail.com>
Sat, 29 Nov 2014 15:07:18 +0000 (17:07 +0200)
committerAndrei Zavada <johnhommer@gmail.com>
Sat, 29 Nov 2014 15:07:18 +0000 (17:07 +0200)
upstream/Makefile.am

index 1b4d752ff8acafd117f51b6af859d6a67ddd2f4f..6d15c4c04b69862bd5a881f14147df998876ecd1 100644 (file)
@@ -17,3 +17,12 @@ endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libcnrun.pc
+
+test:
+       (cd doc/examples && \
+        _cwd=`pwd`; rm -rf _test && mkdir -p _test && cd _test && \
+        ln -s ../../../src/lua-cnrun/.libs/libcnrun-lua.so cnrun.so && \
+        ln -s ../m.nml . && \
+        LUA_CPATH="./?.so;$$LUA_CPATH" \
+        LD_PRELOAD=../../../src/libcnrun/.libs/libcnrun.so.2.0.0:$$LD_PRELOAD \
+         lua ../example1.lua; e=$$?; cd $$_cwd && rm -rf _test; exit $$e)