test_run fixed about variable LANG and profiling. 41/17141/2
Cedric Delamarre [Mon, 31 Aug 2015 10:33:57 +0000 (12:33 +0200)]
// a test with ENGLISH IMPOSED inside.
test_run ast library mode_nwni_profiling

Change-Id: Ied5063da2300d3eaa597efda1a35106858904fc7

scilab/modules/development_tools/macros/test_run.sci

index 98451de..676f755 100644 (file)
@@ -795,7 +795,6 @@ function status = test_single(_module, _testPath, _testName)
         winbin = "scilex.exe";
         mode_arg = "-nwni";
     elseif _module.wanted_mode == ["NWNI" "PROFILING"] && getos() == "Linux" then
-        winbin = "scilex.exe";
         mode_arg = "-nwni -profiling";
         valgrind_opt = "SCILAB_VALGRIND_OPT=""--log-file=" + tmp_prof + " """;
     else
@@ -819,10 +818,8 @@ function status = test_single(_module, _testPath, _testName)
     //language
     if language == "any" then
         language_arg = "";
-    elseif getos() == "Windows" then
-        language_arg = "-l "+ language;
     else
-        language_arg = "LANG=" + language + " ";
+        language_arg = "-l "+ language;
     end
 
     loader_path = pathconvert(fullfile(_module.moduleName, "loader.sce"), %f);
@@ -836,9 +833,9 @@ function status = test_single(_module, _testPath, _testName)
         end
     else
         if (isdir(_module.moduleName) & isfile(loader_path))
-            test_cmd = "( " + valgrind_opt + language_arg + " " + SCI_BIN + "/bin/scilab " + mode_arg + " -nb -e ""exec(''" + loader_path + "'');exec(''" + tmp_tst +"'');""" + " > " + tmp_res + " ) 2> " + tmp_err;
+            test_cmd = "( " + valgrind_opt + " " + SCI_BIN + "/bin/scilab " + mode_arg + " " + language_arg + " -nb -e ""exec(''" + loader_path + "'');exec(''" + tmp_tst +"'');""" + " > " + tmp_res + " ) 2> " + tmp_err;
         else
-            test_cmd = "( " + valgrind_opt + language_arg + " " + prefix_bin + " " + SCI_BIN + "/bin/scilab " + mode_arg + " -nb -f " + tmp_tst + " > " + tmp_res + " ) 2> " + tmp_err;
+            test_cmd = "( " + valgrind_opt + " " + prefix_bin + " " + SCI_BIN + "/bin/scilab " + mode_arg + " " + language_arg + " -nb -f " + tmp_tst + " > " + tmp_res + " ) 2> " + tmp_err;
         end
     end