jenkins.sh: make -j 4 can fail, fix for altosui-test
authorTom Marble <tmarble@info9.net>
Wed, 28 May 2014 19:08:02 +0000 (14:08 -0500)
committerTom Marble <tmarble@info9.net>
Wed, 28 May 2014 19:08:02 +0000 (14:08 -0500)
altosui/Makefile.am
jenkins.sh

index 0440b4afb479eae8a6ad55a591fa0359ac2095d8..df9fe5d158cb0380b6965b22bad773537c6243da 100644 (file)
@@ -263,8 +263,12 @@ altosui: Makefile
        chmod +x $@
 
 altosui-test: Makefile
        chmod +x $@
 
 altosui-test: Makefile
-       echo "#!/bin/sh" > $@
-       echo 'exec java -Djava.library.path="../libaltos/.libs" -jar altosui.jar "$$@"' >> $@
+       echo '#!/bin/sh' > $@
+       echo 'dir="$$(dirname $$0)"' >> $@
+       echo 'cd "$$dir"' >> $@
+       echo 'altosui="$$(pwd -P)"' >> $@
+       echo 'altos="$$(dirname $$altosui)"' >> $@
+       echo 'exec java -Djava.library.path="$$altos/libaltos/.libs" -jar "$$altosui/altosui.jar" "$$@"' >> $@
        chmod +x $@
 
 altosui-jdb: Makefile
        chmod +x $@
 
 altosui-jdb: Makefile
@@ -364,4 +368,3 @@ $(MACOSX_DIST): $(MACOSX_FILES) $(MACOSX_EXTRA) Makefile
 $(WINDOWS_DIST): $(WINDOWS_FILES) altos-windows.nsi
        -rm -f $@
        makensis -Oaltos-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" altos-windows.nsi
 $(WINDOWS_DIST): $(WINDOWS_FILES) altos-windows.nsi
        -rm -f $@
        makensis -Oaltos-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" altos-windows.nsi
-
index 74e48bd53ba350512e4f9f3a03b174797b586c7f..e6cc7da43fa21952955fe32249eadd34e9bfeb44 100755 (executable)
@@ -11,6 +11,9 @@ time=`which time`
 if [ -n "$time" ]; then
     time="$time -v"
 fi
 if [ -n "$time" ]; then
     time="$time -v"
 fi
+# NOTE: the build process may fail on multi-cpu systems. If it fails try setting cpus=1
+# cpus=$(nproc)
+cpus=1
 
 echo "=== starting altos build at $(date) ==="
 env
 
 echo "=== starting altos build at $(date) ==="
 env
@@ -18,5 +21,5 @@ echo "======================================="
 set -x
 
 ./autogen.sh $prefix $android
 set -x
 
 ./autogen.sh $prefix $android
-make -j $(nproc) clean
-$time make -j $(nproc) all fat
+make -j $cpus clean
+$time make -j $cpus all fat