fix module_manager tests 47/18847/4
Antoine ELIAS [Thu, 5 Jan 2017 13:10:26 +0000 (14:10 +0100)]
Change-Id: Idb6d2360dbeabb489a38560e9bfda41a05fc5b77

45 files changed:
scilab/contrib/toolbox_skeleton/builder.sce
scilab/modules/fileio/sci_gateway/cpp/sci_getlongpathname.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_getshortpathname.cpp
scilab/modules/modules_manager/tests/nonreg_tests/bug_9339.unix.dia.ref
scilab/modules/modules_manager/tests/tbx/foobox/etc/foobox.start [moved from scilab/modules/modules_manager/tests/unit_tests/foobox/etc/foobox.start with 100% similarity]
scilab/modules/modules_manager/tests/tbx/foobox/help/en_US/baz.xml [moved from scilab/modules/modules_manager/tests/unit_tests/foobox/help/en_US/baz.xml with 100% similarity]
scilab/modules/modules_manager/tests/tbx/foobox/help/en_US/foo.xml [moved from scilab/modules/modules_manager/tests/unit_tests/foobox/help/en_US/foo.xml with 100% similarity]
scilab/modules/modules_manager/tests/tbx/foobox/macros/baz.sci [moved from scilab/modules/modules_manager/tests/unit_tests/foobox/macros/baz.sci with 100% similarity]
scilab/modules/modules_manager/tests/tbx/foobox/macros/foo.sci [moved from scilab/modules/modules_manager/tests/unit_tests/foobox/macros/foo.sci with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/etc/testbox.quit [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/etc/testbox.quit with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/etc/testbox.start [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/etc/testbox.start with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/help/en_US/csub6.xml [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/help/en_US/csub6.xml with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/help/en_US/csum6.xml [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/help/en_US/csum6.xml with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/help/en_US/multiplybypi6.xml [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/help/en_US/multiplybypi6.xml with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/help/en_US/scilab_sum.xml [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/help/en_US/scilab_sum.xml with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/locales/en_US.po [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/locales/en_US.po with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/locales/en_US/LC_MESSAGES/toolbox_skeleton.mo [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/locales/en_US/LC_MESSAGES/toolbox_skeleton.mo with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/locales/en_US/LC_MESSAGES/toolbox_skeleton.po [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/locales/en_US/LC_MESSAGES/toolbox_skeleton.po with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/locales/fr_FR.po [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/locales/fr_FR.po with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/locales/fr_FR/LC_MESSAGES/toolbox_skeleton.mo [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/locales/fr_FR/LC_MESSAGES/toolbox_skeleton.mo with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/locales/fr_FR/LC_MESSAGES/toolbox_skeleton.po [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/locales/fr_FR/LC_MESSAGES/toolbox_skeleton.po with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/macros/scilab_error.sci [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/macros/scilab_error.sci with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/macros/scilab_sum.sci [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/macros/scilab_sum.sci with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/sci_gateway/c/sci_cerror6.c [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/sci_gateway/c/sci_cerror6.c with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/sci_gateway/c/sci_csub6.c [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/sci_gateway/c/sci_csub6.c with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/sci_gateway/c/sci_csum6.c [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/sci_gateway/c/sci_csum6.c with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/sci_gateway/c/sci_foo6.c [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/sci_gateway/c/sci_foo6.c with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/sci_gateway/c/sci_multiplybypi6.c [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/sci_gateway/c/sci_multiplybypi6.c with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/src/c/csub.c [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/src/c/csub.c with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/src/c/csub.h [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/src/c/csub.h with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/src/c/csum.c [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/src/c/csum.c with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/src/c/csum.h [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/src/c/csum.h with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/src/c/multiplybypi.c [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/src/c/multiplybypi.c with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/src/c/multiplybypi.h [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/src/c/multiplybypi.h with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/src/fortran/fsum.f [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/src/fortran/fsum.f with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/src/java/org/scilab/contrib/toolboxskeleton/Sum.java [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/src/java/org/scilab/contrib/toolboxskeleton/Sum.java with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/tests/unit_tests/c_sum.dia.ref [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/tests/unit_tests/c_sum.dia.ref with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/tests/unit_tests/c_sum.tst [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/tests/unit_tests/c_sum.tst with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/tests/unit_tests/scilab_sum.dia.ref [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/tests/unit_tests/scilab_sum.dia.ref with 100% similarity]
scilab/modules/modules_manager/tests/tbx/testbox/tests/unit_tests/scilab_sum.tst [moved from scilab/modules/modules_manager/tests/unit_tests/testbox/tests/unit_tests/scilab_sum.tst with 100% similarity]
scilab/modules/modules_manager/tests/unit_tests/tbx_make.dia.ref
scilab/modules/modules_manager/tests/unit_tests/tbx_make.tst
scilab/modules/modules_manager/tests/unit_tests/tbx_make.win.dia.ref [new file with mode: 0644]
scilab/modules/modules_manager/tests/unit_tests/toolbox_skeleton.win.dia.ref
scilab/modules/modules_manager/tests/unit_tests/xcos_toolbox_skeleton.win.dia.ref

index e41e110..f818934 100644 (file)
@@ -38,10 +38,10 @@ function main_builder()
     tbx_builder_macros(toolbox_dir);
     tbx_builder_src(toolbox_dir);
     tbx_builder_gateway(toolbox_dir);
-    tbx_build_localization(TOOLBOX_NAME, toolbox_dir);
+    tbx_build_localization(toolbox_dir);
     tbx_builder_help(toolbox_dir);
-    tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
-    tbx_build_cleaner(TOOLBOX_NAME, toolbox_dir);
+    tbx_build_loader(toolbox_dir);
+    tbx_build_cleaner(toolbox_dir);
 
 endfunction
 // =============================================================================
index d87e3ed..fab6a15 100644 (file)
@@ -56,7 +56,7 @@ types::Function::ReturnValue sci_getlongpathname(types::typed_list &in, int _iRe
     for (int i = 0 ; i < size; i++)
     {
         wchar_t* tmp = getlongpathnameW(p[i], (BOOL*)&pBool[i]);
-        wchar_t* pwstPath = pathconvertW(tmp, FALSE, FALSE, AUTO_STYLE);
+        wchar_t* pwstPath = pathconvertW(tmp, TRUE, FALSE, AUTO_STYLE);
         pOut1->set(i, pwstPath);
         FREE(pwstPath);
         FREE(tmp);
index aad5f1a..f6024a3 100644 (file)
@@ -59,7 +59,7 @@ types::Function::ReturnValue sci_getshortpathname(types::typed_list &in, int _iR
     for (int i = 0 ; i < size; i++)
     {
         wchar_t* tmp = getshortpathnameW(p[i], (BOOL*)&pBool[i]);
-        wchar_t* pwstPath = pathconvertW(tmp, FALSE, FALSE, AUTO_STYLE);
+        wchar_t* pwstPath = pathconvertW(tmp, TRUE, FALSE, AUTO_STYLE);
         pOut1->set(i, pwstPath);
         FREE(pwstPath);
         FREE(tmp);
index d7b070e..5f9712d 100644 (file)
@@ -26,8 +26,8 @@ ilib_verbose(0);
 exec('builder.sce');
 Building macros...
 -- Creation of [toolbox_skeletonlib] (Macros) --
-genlib: Processing file: scilab_sum.sci
 genlib: Processing file: scilab_error.sci
+genlib: Processing file: scilab_sum.sci
 Building sources...
 Building gateway...
 Generating loader_gateway.sce...
index f58a313..f069f59 100644 (file)
@@ -12,13 +12,13 @@ mytb_dir = TMPDIR + "/foobox";
 if isdir(mytb_dir)
     removedir(mytb_dir);
 end
-status = copyfile(SCI + "/modules/modules_manager/tests/unit_tests/foobox/", mytb_dir);
+status = copyfile(SCI + "/modules/modules_manager/tests/tbx/foobox/", mytb_dir);
 assert_checkequal(status, 1);
 tbx_make(mytb_dir);
 Building macros...
 -- Creation of [fooboxlib] (Macros) --
-genlib: Processing file: foo.sci
 genlib: Processing file: baz.sci
+genlib: Processing file: foo.sci
 Building help...
 Building the master document:
        TMPDIR/foobox/help/en_US
@@ -41,18 +41,20 @@ mytb_dir = TMPDIR + "/testbox";
 if isdir(mytb_dir)
     removedir(mytb_dir);
 end
-status = copyfile(SCI + "/modules/modules_manager/tests/unit_tests/testbox/", mytb_dir);
+status = copyfile(SCI + "/modules/modules_manager/tests/tbx/testbox/", mytb_dir);
 assert_checkequal(status, 1);
 tbx_make(mytb_dir);
 Building macros...
 -- Creation of [testboxlib] (Macros) --
+genlib: Processing file: scilab_error.sci
+genlib: Processing file: scilab_sum.sci
 Building sources...
    Generate a loader file
    Generate a Makefile
    ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy csub.c to TMPDIR
-   ilib_gen_Make: Copy csum.c to TMPDIR
    ilib_gen_Make: Copy multiplybypi.c to TMPDIR
+   ilib_gen_Make: Copy csum.c to TMPDIR
+   ilib_gen_Make: Copy csub.c to TMPDIR
    ilib_gen_Make: configure : Generate Makefile.
    ilib_gen_Make: Modification of the Makefile in TMPDIR.
    Running the Makefile
index 91748fa..d1d50bd 100644 (file)
@@ -15,7 +15,7 @@ mytb_dir = TMPDIR + "/foobox";
 if isdir(mytb_dir)
     removedir(mytb_dir);
 end
-status = copyfile(SCI + "/modules/modules_manager/tests/unit_tests/foobox/", mytb_dir);
+status = copyfile(SCI + "/modules/modules_manager/tests/tbx/foobox/", mytb_dir);
 assert_checkequal(status, 1);
 tbx_make(mytb_dir);
 
@@ -30,7 +30,7 @@ mytb_dir = TMPDIR + "/testbox";
 if isdir(mytb_dir)
     removedir(mytb_dir);
 end
-status = copyfile(SCI + "/modules/modules_manager/tests/unit_tests/testbox/", mytb_dir);
+status = copyfile(SCI + "/modules/modules_manager/tests/tbx/testbox/", mytb_dir);
 assert_checkequal(status, 1);
 tbx_make(mytb_dir);
 
diff --git a/scilab/modules/modules_manager/tests/unit_tests/tbx_make.win.dia.ref b/scilab/modules/modules_manager/tests/unit_tests/tbx_make.win.dia.ref
new file mode 100644 (file)
index 0000000..14f32cd
--- /dev/null
@@ -0,0 +1,104 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises - Pierre-Aimé AGNEL
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- NO CHECK ERROR OUTPUT -->
+// <-- ENGLISH IMPOSED -->
+// Test the compilation of a simple toolbox with tbx_make()
+// Copying the foobox from the test environment
+mytb_dir = TMPDIR + "/foobox";
+if isdir(mytb_dir)
+    removedir(mytb_dir);
+end
+status = copyfile(SCI + "/modules/modules_manager/tests/tbx/foobox/", mytb_dir);
+assert_checkequal(status, 1);
+tbx_make(mytb_dir);
+Building macros...
+-- Creation of [fooboxlib] (Macros) --
+genlib: Processing file: baz.sci
+genlib: Processing file: foo.sci
+Building help...
+Building the master document:
+       TMPDIR\foobox\help\en_US
+Building the manual file [javaHelp] in TMPDIR\foobox\help\en_US.
+Generating loader.sce...
+Generating unloader.sce...
+Generating cleaner.sce...
+exec(mytb_dir + "/loader.sce");
+Start foobox
+       Load macros
+       Load help
+b = foo("testing it works", 42);
+ testing it works
+   42.
+baz("World");
+ Hello World!
+assert_checktrue(b);
+// testing default compilation
+mytb_dir = TMPDIR + "/testbox";
+if isdir(mytb_dir)
+    removedir(mytb_dir);
+end
+status = copyfile(SCI + "/modules/modules_manager/tests/tbx/testbox/", mytb_dir);
+assert_checkequal(status, 1);
+tbx_make(mytb_dir);
+Building macros...
+-- Creation of [testboxlib] (Macros) --
+genlib: Processing file: scilab_error.sci
+genlib: Processing file: scilab_sum.sci
+Building sources...
+   Generate a loader file
+   Generate a Makefile
+   Running the Makefile
+   Compilation of csub.c
+   Compilation of csum.c
+   Compilation of multiplybypi.c
+   Building shared library (be patient)
+   Generate a cleaner file
+   Generate a loader file
+   Generate a Makefile
+   Running the Makefile
+   Compilation of fsum.f
+   Building shared library (be patient)
+   Generate a cleaner file
+   Building JAR library org.scilab.contrib.toolboxskeleton.jar
+   Compiling Java sources in TMPDIR\testbox\src\java
+   Creating JAR archive TMPDIR\testbox\jar\org.scilab.contrib.toolboxskeleton.jar
+   Create loader script for Java loader.sce
+   Create cleaner script for Java cleaner.sce
+Building gateway...
+   Generate a gateway file
+   Generate a loader file
+   Generate a Makefile
+   Running the makefile
+   Compilation of sci_cerror6.c
+   Compilation of sci_csub6.c
+   Compilation of sci_csum6.c
+   Compilation of sci_foo6.c
+   Compilation of sci_multiplybypi6.c
+   Compilation of testbox_c.cpp
+   Compilation of testbox_c.h
+   Compilation of testbox_c.hxx
+   Building shared library (be patient)
+   Generate a cleaner file
+Generating loader_gateway.sce...
+Generating cleaner_gateway.sce...
+Building help...
+Building the master document:
+       TMPDIR\testbox\help\en_US
+Building the manual file [javaHelp] in TMPDIR\testbox\help\en_US.
+Generate image ./csub6_1.png from Scilab code from file csub6.xml
+Generate image ./csub6_en_US_2.png from Scilab code from file csub6.xml
+Generating loader.sce...
+Generating unloader.sce...
+Generating cleaner.sce...
+exec(mytb_dir + "/loader.sce");
+Start testbox
+       Load macros
+       Load gateways
+       Load Java libraries
+       Load help
+b = csum6(2, 40);
+assert_checkequal(b, 42);
index 16e56e4..a330306 100644 (file)
@@ -16,6 +16,8 @@ assert_checkequal(status, 1);
 exec("TMPDIR/toolbox_skeleton/builder.sce");
 Building macros...
 -- Creation of [toolbox_skeletonlib] (Macros) --
+genlib: Processing file: scilab_error.sci
+genlib: Processing file: scilab_sum.sci
 Building sources...
    Generate a loader file
    Generate a Makefile
@@ -42,10 +44,15 @@ Building gateway...
    Generate a Makefile
    Running the makefile
    Compilation of sci_cerror.c
+   Compilation of sci_cerror6.c
    Compilation of sci_csub.c
+   Compilation of sci_csub6.c
    Compilation of sci_csum.c
+   Compilation of sci_csum6.c
    Compilation of sci_foo.c
+   Compilation of sci_foo6.c
    Compilation of sci_multiplybypi.c
+   Compilation of sci_multiplybypi6.c
    Compilation of skeleton_c.cpp
    Compilation of skeleton_c.h
    Compilation of skeleton_c.hxx
index ef0ff27..6374722 100644 (file)
@@ -24,7 +24,6 @@ genlib: Processing file: TBX_SUM_c.sci
 genlib: Processing file: TBX_SUM_modelica.sci
 genlib: Processing file: TBX_SUM_sci.sci
 genlib: Processing file: TBX_SUM_sim.sci
-genlib: Regenerate names and lib
 Building blocks...
 Building sources...
    Generate a loader file
@@ -41,16 +40,16 @@ Building gateway...
    Generate a Makefile
    Running the makefile
    Compilation of sci_tbx_sum.c
-   Compilation of xcos_toolbox_skeleton_c.c
+   Compilation of xcos_toolbox_skeleton_c.cpp
+   Compilation of xcos_toolbox_skeleton_c.h
+   Compilation of xcos_toolbox_skeleton_c.hxx
    Building shared library (be patient)
    Generate a cleaner file
 Generating loader_gateway.sce...
 Generating cleaner_gateway.sce...
 Building help...
-
 Building the master document:
        TMPDIR\xcos_toolbox_skeleton\help\en_US
-
 Building the manual file [javaHelp] in TMPDIR\xcos_toolbox_skeleton\help\en_US.
 Generating loader.sce...
 Generating unloader.sce...
@@ -65,10 +64,7 @@ Start Xcos toolbox skeleton
        Load demos
 test_run("TMPDIR/xcos_toolbox_skeleton/", [], "short_summary");
    001/001 - [TMPDIR/xcos_toolbox_skeleton/] : 
-
    001/001 - [TMPDIR/xcos_toolbox_skeleton/] tbx_sum............passed
-
-
    --------------------------------------------------------------------------
    Tests:    1,    Passed:    1,    Failed:    0,    Skipped:    0
    --------------------------------------------------------------------------