* Bug #12624 fixed - In case of errors in Scilab macros, make sure that 44/11644/5
Sylvestre Ledru [Tue, 4 Jun 2013 12:39:02 +0000 (14:39 +0200)]
                     "make check-TESTS" fails correctly.

To reproduce it,
$ rm modules/umfpack/macros/lib
$ make check-TESTS

Change-Id: Ie8d20020715e2ed5e490ab5a60d9d5a5c018a4a8

scilab/etc/scilab.start
scilab/modules/core/locales/core.pot

index 399e2c5..61f9537 100644 (file)
@@ -89,9 +89,15 @@ load = %_load;
 warning("on");
 
 for i=1:size(modules,"*")
-  exec("SCI/modules/" + modules(i) + "/etc/" + modules(i) + ".start", -1);
+  startModule = "SCI/modules/" + modules(i) + "/etc/" + modules(i) + ".start";
+  ierr=exec(startModule, 'errcatch', -1);
+  if ierr <> 0 then
+     disp(msprintf(gettext("Failed to exec %s:"),startModule));
+     disp(lasterror());
+     exit(2);
+   end
 end
-clear modules i load;
+clear modules i load ierr startModule;
 
 // Create some configuration variables ================================
 home = getenv("HOME", SCI);
index 72832cc..b3fc4ce 100644 (file)
@@ -1799,7 +1799,13 @@ msgid "  loading initial environment"
 msgstr ""
 
 #
-# File: /home/couvert/git/scilab/scilab/etc/scilab.start, line: 157
+# File: /home/sylvestre/dev/git/scilab/scilab/etc/scilab.start, line: 95
+#, c-format
+msgid "Failed to exec %s:"
+msgstr ""
+
+#
+# File: /home/sylvestre/dev/git/scilab/scilab/etc/scilab.start, line: 163
 msgid "&File"
 msgstr ""