fix trouble on atoms tests since 5.4.0 without libscilab 27/10827/2
Antoine ELIAS [Thu, 14 Mar 2013 13:45:28 +0000 (14:45 +0100)]
Change-Id: I4d160401e10fbaf176e8d8a4b723112593920190

scilab/modules/atoms/tests/unit_tests/atomsIsLoaded.dia.ref
scilab/modules/atoms/tests/unit_tests/atomsIsLoaded.tst
scilab/modules/atoms/tests/unit_tests/atomsLoad.dia.ref
scilab/modules/atoms/tests/unit_tests/atomsLoad.tst
scilab/modules/atoms/tests/unit_tests/atomsRemove.dia.ref
scilab/modules/atoms/tests/unit_tests/atomsRemove.tst

index 04588f8..8d16ddd 100644 (file)
@@ -12,44 +12,41 @@ atomsSaveConfig();
 // Do not use the autoload system
 atomsSetConfig("autoloadAddAfterInstall","False");
 atomsSetConfig("Verbose" ,"False");
-// Load the 2nd scenario : See scene11.test.atoms.scilab.org.txt
-// =============================================================================
-atomsRepositorySetOfl("http://scene10.test.atoms.scilab.org");
+//force official ATOMS repository
+atomsRepositorySetOfl(mgetl(SCI+"/modules/atoms/tests/unit_tests/repositories.orig"));
 // Install toolbox N°2
-atomsInstall(["toolbox_2","2.0"],"user");
+atomsInstall(["toolbox_2","2.1"],"user");
 // Check installation
-if ~ atomsIsInstalled(["toolbox_1","1.0","user"]) then bugmes();quit;end
-if ~ atomsIsInstalled(["toolbox_2","2.0","user"]) then bugmes();quit;end
-atomsLoad(["toolbox_2","2.0","user"]);
+if ~ atomsIsInstalled(["toolbox_1","2.0","user"]) then bugmes();quit;end
+if ~ atomsIsInstalled(["toolbox_2","2.1","user"]) then bugmes();quit;end
+atomsLoad(["toolbox_2","2.1","user"]);
 
 Start Toolbox 1
        Load macros
-       Load gateways
 
 Start Toolbox 2
        Load macros
 
 if ~ atomsIsLoaded("toolbox_2")                  then bugmes();quit;end
-if ~ atomsIsLoaded(["toolbox_2","2.0"])          then bugmes();quit;end
-if ~ atomsIsLoaded(["toolbox_2","2.0","user"])   then bugmes();quit;end
+if ~ atomsIsLoaded(["toolbox_2","2.1"])          then bugmes();quit;end
+if ~ atomsIsLoaded(["toolbox_2","2.1","user"])   then bugmes();quit;end
 if ~ atomsIsLoaded("toolbox_1")                  then bugmes();quit;end
-if ~ atomsIsLoaded(["toolbox_1","1.0"])          then bugmes();quit;end
-if ~ atomsIsLoaded(["toolbox_1","1.0","user"])   then bugmes();quit;end
-if atomsIsLoaded(["toolbox_1","1.0","allusers"]) then bugmes();quit;end
-if atomsIsLoaded(["toolbox_2","2.0","allusers"]) then bugmes();quit;end
-A = [ "toolbox_1" "1.0" "user"     ; ..
-      "toolbox_2" "2.0" "user"     ; ..
+if ~ atomsIsLoaded(["toolbox_1","2.0"])          then bugmes();quit;end
+if ~ atomsIsLoaded(["toolbox_1","2.0","user"])   then bugmes();quit;end
+if atomsIsLoaded(["toolbox_1","2.0","allusers"]) then bugmes();quit;end
+if atomsIsLoaded(["toolbox_2","2.1","allusers"]) then bugmes();quit;end
+A = [ "toolbox_1" "2.0" "user"     ; ..
+      "toolbox_2" "2.1" "user"     ; ..
       "toolbox_2" ""    "user"     ; ..
-      "toolbox_2" "2.0" ""         ; ..
+      "toolbox_2" "2.1" ""         ; ..
       "toolbox_2" ""    ""         ; ..
-      "toolbox_2" "2.0" "allusers" ];
+      "toolbox_2" "2.1" "allusers" ];
 if or(atomsIsLoaded(A) <> [%T ; %T ; %T ; %T ; %T ; %F]) then bugmes();quit;end
 // Remove toolbox_2
 // =============================================================================
 atomsRemove("toolbox_2","user");
-       the package toolbox_2 (2.0-1) is currently loaded, It will be removed at next Scilab start
-       the package toolbox_1 (1.0-1) is currently loaded, It will be removed at next Scilab start
+       the package toolbox_2 (2.1-2) is currently loaded, It will be removed at next Scilab start
+       the package toolbox_1 (2.0-2) is currently loaded, It will be removed at next Scilab start
 // Restore original values
 // =============================================================================
 atomsRestoreConfig(%T);
-atomsRepositorySetOfl(mgetl(SCI+"/modules/atoms/tests/unit_tests/repositories.orig"));
index 0876923..e50ec47 100644 (file)
@@ -18,36 +18,35 @@ atomsSaveConfig();
 atomsSetConfig("autoloadAddAfterInstall","False");
 atomsSetConfig("Verbose" ,"False");
 
-// Load the 2nd scenario : See scene11.test.atoms.scilab.org.txt
-// =============================================================================
-atomsRepositorySetOfl("http://scene10.test.atoms.scilab.org");
+//force official ATOMS repository
+atomsRepositorySetOfl(mgetl(SCI+"/modules/atoms/tests/unit_tests/repositories.orig"));
 
 // Install toolbox N°2
-atomsInstall(["toolbox_2","2.0"],"user");
+atomsInstall(["toolbox_2","2.1"],"user");
 
 // Check installation
-if ~ atomsIsInstalled(["toolbox_1","1.0","user"]) then pause, end
-if ~ atomsIsInstalled(["toolbox_2","2.0","user"]) then pause, end
+if ~ atomsIsInstalled(["toolbox_1","2.0","user"]) then pause, end
+if ~ atomsIsInstalled(["toolbox_2","2.1","user"]) then pause, end
 
-atomsLoad(["toolbox_2","2.0","user"]);
+atomsLoad(["toolbox_2","2.1","user"]);
 
 if ~ atomsIsLoaded("toolbox_2")                  then pause, end
-if ~ atomsIsLoaded(["toolbox_2","2.0"])          then pause, end
-if ~ atomsIsLoaded(["toolbox_2","2.0","user"])   then pause, end
+if ~ atomsIsLoaded(["toolbox_2","2.1"])          then pause, end
+if ~ atomsIsLoaded(["toolbox_2","2.1","user"])   then pause, end
 
 if ~ atomsIsLoaded("toolbox_1")                  then pause, end
-if ~ atomsIsLoaded(["toolbox_1","1.0"])          then pause, end
-if ~ atomsIsLoaded(["toolbox_1","1.0","user"])   then pause, end
+if ~ atomsIsLoaded(["toolbox_1","2.0"])          then pause, end
+if ~ atomsIsLoaded(["toolbox_1","2.0","user"])   then pause, end
 
-if atomsIsLoaded(["toolbox_1","1.0","allusers"]) then pause, end
-if atomsIsLoaded(["toolbox_2","2.0","allusers"]) then pause, end
+if atomsIsLoaded(["toolbox_1","2.0","allusers"]) then pause, end
+if atomsIsLoaded(["toolbox_2","2.1","allusers"]) then pause, end
 
-A = [ "toolbox_1" "1.0" "user"     ; ..
-      "toolbox_2" "2.0" "user"     ; ..
+A = [ "toolbox_1" "2.0" "user"     ; ..
+      "toolbox_2" "2.1" "user"     ; ..
       "toolbox_2" ""    "user"     ; ..
-      "toolbox_2" "2.0" ""         ; ..
+      "toolbox_2" "2.1" ""         ; ..
       "toolbox_2" ""    ""         ; ..
-      "toolbox_2" "2.0" "allusers" ];
+      "toolbox_2" "2.1" "allusers" ];
 
 if or(atomsIsLoaded(A) <> [%T ; %T ; %T ; %T ; %T ; %F]) then pause, end
 
@@ -58,5 +57,3 @@ atomsRemove("toolbox_2","user");
 // Restore original values
 // =============================================================================
 atomsRestoreConfig(%T);
-
-atomsRepositorySetOfl(mgetl(SCI+"/modules/atoms/tests/unit_tests/repositories.orig"));
\ No newline at end of file
index 1fa5f87..9714a2c 100644 (file)
@@ -13,25 +13,24 @@ if ~isempty( atomsGetInstalled() ) then bugmes();quit;end
 // If previous test did not end properly, restore, else backup config file
 atomsRestoreConfig(%T);
 atomsSaveConfig();
+//force official ATOMS repository
+atomsRepositorySetOfl(mgetl(SCI+"/modules/atoms/tests/unit_tests/repositories.orig"));
 // Set some parameters for the test
 // =============================================================================
 atomsSetConfig("autoloadAddAfterInstall","False");
 atomsSetConfig("Verbose" ,"False");
 // 1st test-case : Just install the toolbox 5
 // =============================================================================
-// Load the 1st scenario : See scene10.test.atoms.scilab.org.txt
-atomsRepositorySetOfl("http://scene10.test.atoms.scilab.org");
 atomsInstall("toolbox_5");
 // Check if the module is really installed
-if ~ and( atomsIsInstalled( ["toolbox_5" "1.0" ; ..
-                             "toolbox_4" "1.0" ; ..
+if ~ and( atomsIsInstalled( ["toolbox_5" "1.2" ; ..
+                             "toolbox_4" "1.1" ; ..
                              "toolbox_2" "1.0" ; ..
-                             "toolbox_1" "1.0"])) then bugmes();quit;end
+                             "toolbox_1" "2.0"])) then bugmes();quit;end
 atomsLoad("toolbox_5");
 
 Start Toolbox 1
        Load macros
-       Load gateways
 
 Start Toolbox 2
        Load macros
@@ -43,25 +42,24 @@ Start Toolbox 5
        Load macros
 
 if ~ atomsIsLoaded("toolbox_5") then bugmes();quit;end
-if ~ atomsIsLoaded(["toolbox_5" "1.0"]) then bugmes();quit;end
+if ~ atomsIsLoaded(["toolbox_5" "1.2"]) then bugmes();quit;end
 if ~ and(atomsIsLoaded(["toolbox_5"; ..
                         "toolbox_2"; ..
                         "toolbox_1"; ..
                         "toolbox_4"])) then bugmes();quit;end
-if ~ and(atomsIsLoaded(["toolbox_5" "1.0"; ..
+if ~ and(atomsIsLoaded(["toolbox_5" "1.2"; ..
                         "toolbox_2" "1.0"; ..
-                        "toolbox_1" "1.0"; ..
-                        "toolbox_4" "1.0"])) then bugmes();quit;end
-if or( t5_version() <> ["Toolbox 5 -> version = 1.0"; ..
-                        "Toolbox 4 -> version = 1.0"; ..
+                        "toolbox_1" "2.0"; ..
+                        "toolbox_4" "1.1"])) then bugmes();quit;end
+if or( t5_version() <> ["Toolbox 5 -> version = 1.2"; ..
+                        "Toolbox 4 -> version = 1.1"; ..
                         "Toolbox 2 -> version = 1.0"; ..
-                        "Toolbox 1 -> version = 1.0" ] ) then bugmes();quit;end
+                        "Toolbox 1 -> version = 2.0" ] ) then bugmes();quit;end
 atomsRemove("toolbox_5");
-       the package toolbox_5 (1.0-1) is currently loaded, It will be removed at next Scilab start
-       the package toolbox_4 (1.0-1) is currently loaded, It will be removed at next Scilab start
-       the package toolbox_2 (1.0-1) is currently loaded, It will be removed at next Scilab start
-       the package toolbox_1 (1.0-1) is currently loaded, It will be removed at next Scilab start
+       the package toolbox_5 (1.2-2) is currently loaded, It will be removed at next Scilab start
+       the package toolbox_4 (1.1-2) is currently loaded, It will be removed at next Scilab start
+       the package toolbox_2 (1.0-2) is currently loaded, It will be removed at next Scilab start
+       the package toolbox_1 (2.0-2) is currently loaded, It will be removed at next Scilab start
 // Restore original values
 // =============================================================================
 atomsRestoreConfig(%T);
-atomsRepositorySetOfl(mgetl(SCI+"/modules/atoms/tests/unit_tests/repositories.orig"));
index 0d56c95..b89bb78 100644 (file)
@@ -18,6 +18,9 @@ if ~isempty( atomsGetInstalled() ) then pause, end
 atomsRestoreConfig(%T);
 atomsSaveConfig();
 
+//force official ATOMS repository
+atomsRepositorySetOfl(mgetl(SCI+"/modules/atoms/tests/unit_tests/repositories.orig"));
+
 // Set some parameters for the test
 // =============================================================================
 atomsSetConfig("autoloadAddAfterInstall","False");
@@ -25,43 +28,37 @@ atomsSetConfig("Verbose" ,"False");
 
 // 1st test-case : Just install the toolbox 5
 // =============================================================================
-
-// Load the 1st scenario : See scene10.test.atoms.scilab.org.txt
-atomsRepositorySetOfl("http://scene10.test.atoms.scilab.org");
-
 atomsInstall("toolbox_5");
 
 // Check if the module is really installed
 
-if ~ and( atomsIsInstalled( ["toolbox_5" "1.0" ; ..
-                             "toolbox_4" "1.0" ; ..
+if ~ and( atomsIsInstalled( ["toolbox_5" "1.2" ; ..
+                             "toolbox_4" "1.1" ; ..
                              "toolbox_2" "1.0" ; ..
-                             "toolbox_1" "1.0"])) then pause, end
+                             "toolbox_1" "2.0"])) then pause, end
 
 atomsLoad("toolbox_5");
 
 if ~ atomsIsLoaded("toolbox_5") then pause, end
-if ~ atomsIsLoaded(["toolbox_5" "1.0"]) then pause, end
+if ~ atomsIsLoaded(["toolbox_5" "1.2"]) then pause, end
 
 if ~ and(atomsIsLoaded(["toolbox_5"; ..
                         "toolbox_2"; ..
                         "toolbox_1"; ..
                         "toolbox_4"])) then pause, end
 
-if ~ and(atomsIsLoaded(["toolbox_5" "1.0"; ..
+if ~ and(atomsIsLoaded(["toolbox_5" "1.2"; ..
                         "toolbox_2" "1.0"; ..
-                        "toolbox_1" "1.0"; ..
-                        "toolbox_4" "1.0"])) then pause, end
+                        "toolbox_1" "2.0"; ..
+                        "toolbox_4" "1.1"])) then pause, end
 
-if or( t5_version() <> ["Toolbox 5 -> version = 1.0"; ..
-                        "Toolbox 4 -> version = 1.0"; ..
+if or( t5_version() <> ["Toolbox 5 -> version = 1.2"; ..
+                        "Toolbox 4 -> version = 1.1"; ..
                         "Toolbox 2 -> version = 1.0"; ..
-                        "Toolbox 1 -> version = 1.0" ] ) then pause, end
+                        "Toolbox 1 -> version = 2.0" ] ) then pause, end
 
 atomsRemove("toolbox_5");
 
 // Restore original values
 // =============================================================================
 atomsRestoreConfig(%T);
-
-atomsRepositorySetOfl(mgetl(SCI+"/modules/atoms/tests/unit_tests/repositories.orig"));
index 81b1b21..32f3b4f 100644 (file)
@@ -5,6 +5,13 @@
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
 // <-- CLI SHELL MODE -->
+//detect scilab arch
+[version, opts] = getversion();
+if opts(2) == "x64" & getos() == "Windows" then
+    arch = "x64/";
+else
+    arch = "";
+end
 load("SCI/modules/atoms/macros/atoms_internals/lib");
 // If previous test did not end properly, restore, else backup config file
 atomsRestoreConfig(%T);
@@ -38,10 +45,10 @@ end
 // installed by
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -52,12 +59,12 @@ assert_checkequal(removed(b,:),ref);
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_3" "1.0"],"user");
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/toolbox_2/2.0-1"  "A" ;
-        "toolbox_3"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_3/1.0-1"  "I" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/2.0-1"  "A" ;
+        "toolbox_3"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_3/1.0-1"  "I" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -70,8 +77,8 @@ assert_checkequal(removed(b,:),ref);
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_3" "1.0"],"user");
-ref = [ "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/toolbox_2/2.0-1"  "A" ;
-        "toolbox_3"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_3/1.0-1"  "I" ];
+ref = [ "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/2.0-1"  "A" ;
+        "toolbox_3"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_3/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -82,10 +89,10 @@ assert_checkequal(removed(b,:),ref);
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_5" "1.0"],"allusers");
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -108,13 +115,13 @@ assert_checkequal(removed(b,:),ref_all);
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_5" "1.0"],"allusers");
 ref = [ "toolbox_1"  "1.0-1"  "allusers"  "SCI/contrib/toolbox_1/1.0-1"  "A" ;
-        "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
+        "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
         "toolbox_2"  "1.0-1"  "allusers"  "SCI/contrib/toolbox_2/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
         "toolbox_4"  "1.0-1"  "allusers"  "SCI/contrib/toolbox_4/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
         "toolbox_5"  "1.0-1"  "allusers"  "SCI/contrib/toolbox_5/1.0-1"  "I" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -128,10 +135,10 @@ assert_checkequal(removed(b,:),ref);
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 ref_empty = [];
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -141,19 +148,19 @@ removed=atomsRemove(["toolbox_5" "1.0"],"user");
 assert_checkequal(removed(b,:),ref);
 // ============================================================================
 // DELETING PART
-rmdir(SCIHOME+"/atoms/archives/",'s');
-mkdir(SCIHOME+"/atoms/archives");
-rmdir(SCI+"/contrib/archives/",'s');
-mkdir(SCI+"/contrib/archives");
+rmdir(atomsPath("install","user")+'archives/','s');
+mkdir(atomsPath("install","user")+'archives/');
+rmdir(atomsPath("install","allusers")+'archives/','s');
+mkdir(atomsPath("install","allusers")+'archives/');
 // ============================================================================
 // REMOVING AND DELETING a toolbox will delete its archives and archives of the
 // toolboxes it depends on
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -166,23 +173,22 @@ if getos()=="Windows" then
 else
     assert_checkequal(ls(atomsPath("install","user")+'archives/'),ref_empty);
 end
-rmdir(SCIHOME+"/atoms/archives/",'s');
-mkdir(SCIHOME+"/atoms/archives");
-rmdir(SCI+"/contrib/archives/",'s');
-mkdir(SCI+"/contrib/archives");
+rmdir(atomsPath("install","user")+'archives/','s');
+mkdir(atomsPath("install","user")+'archives/');
+rmdir(atomsPath("install","allusers")+'archives/','s');
+mkdir(atomsPath("install","allusers")+'archives/');
 // REMOVING AND DELETING a toolbox will not delete other archives than the ones
 // it depends on
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_6" "1.0"],"user");
-ref = [ "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 [version, opts] = getversion();
-arch = opts(2);
 if getos()=="Windows" then
     ref=strsubst(ref,"/","\");
-       if arch == "x86" then
+       if opts(2) == "x86" then
 ref_ls = [ "toolbox_1_1.0-1.bin.windows.zip";
            "toolbox_2_2.0-1.bin.windows.zip";
            "toolbox_6_1.0-1.bin.windows.zip"];
@@ -192,7 +198,7 @@ ref_ls = [ "toolbox_1_1.0-1.bin.x64.windows.zip";
            "toolbox_6_1.0-1.bin.x64.windows.zip"];
        end
 elseif getos()=="Linux" then
-       if arch == "x86" then
+       if opts(2) == "x86" then
 ref_ls = [ "toolbox_1_1.0-1.bin.i686.linux.tar.gz";
            "toolbox_2_2.0-1.bin.i686.linux.tar.gz";
            "toolbox_6_1.0-1.bin.i686.linux.tar.gz"];   
@@ -206,9 +212,9 @@ ref_ls = [ "toolbox_1_1.0-1.bin.x86_64.darwin.tar.gz";
            "toolbox_2_2.0-1.bin.x86_64.darwin.tar.gz";
            "toolbox_6_1.0-1.bin.x86_64.darwin.tar.gz"];        
 end
-ref_rem_6 = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-              "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/toolbox_2/2.0-1"  "A" ;
-              "toolbox_6"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_6/1.0-1"  "I" ];
+ref_rem_6 = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+              "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/2.0-1"  "A" ;
+              "toolbox_6"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_6/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref_rem_6=strsubst(ref_rem_6,"/","\");
 end
index c4b377d..07135a8 100644 (file)
@@ -8,6 +8,14 @@
 // <-- CLI SHELL MODE -->
 
 
+//detect scilab arch
+[version, opts] = getversion();
+if opts(2) == "x64" & getos() == "Windows" then
+    arch = "x64/";
+else
+    arch = "";
+end
+
 load("SCI/modules/atoms/macros/atoms_internals/lib");
 
 // If previous test did not end properly, restore, else backup config file
@@ -45,10 +53,10 @@ end
 // installed by
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
         
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
@@ -61,12 +69,12 @@ assert_checkequal(removed(b,:),ref);
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_3" "1.0"],"user");
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/toolbox_2/2.0-1"  "A" ;
-        "toolbox_3"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_3/1.0-1"  "I" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/2.0-1"  "A" ;
+        "toolbox_3"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_3/1.0-1"  "I" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -80,8 +88,8 @@ assert_checkequal(removed(b,:),ref);
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_3" "1.0"],"user");
-ref = [ "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/toolbox_2/2.0-1"  "A" ;
-        "toolbox_3"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_3/1.0-1"  "I" ];
+ref = [ "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/2.0-1"  "A" ;
+        "toolbox_3"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_3/1.0-1"  "I" ];
         
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
@@ -94,10 +102,10 @@ assert_checkequal(removed(b,:),ref);
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_5" "1.0"],"allusers");
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -121,13 +129,13 @@ assert_checkequal(removed(b,:),ref_all);
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_5" "1.0"],"allusers");
 ref = [ "toolbox_1"  "1.0-1"  "allusers"  "SCI/contrib/toolbox_1/1.0-1"  "A" ;
-        "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
+        "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
         "toolbox_2"  "1.0-1"  "allusers"  "SCI/contrib/toolbox_2/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
         "toolbox_4"  "1.0-1"  "allusers"  "SCI/contrib/toolbox_4/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
         "toolbox_5"  "1.0-1"  "allusers"  "SCI/contrib/toolbox_5/1.0-1"  "I" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -142,10 +150,10 @@ assert_checkequal(removed(b,:),ref);
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 ref_empty = [];
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -156,20 +164,20 @@ assert_checkequal(removed(b,:),ref);
 
 // ============================================================================
 // DELETING PART
-rmdir(SCIHOME+"/atoms/archives/",'s');
-mkdir(SCIHOME+"/atoms/archives");
-rmdir(SCI+"/contrib/archives/",'s');
-mkdir(SCI+"/contrib/archives");
+rmdir(atomsPath("install","user")+'archives/','s');
+mkdir(atomsPath("install","user")+'archives/');
+rmdir(atomsPath("install","allusers")+'archives/','s');
+mkdir(atomsPath("install","allusers")+'archives/');
 // ============================================================================
 
 // REMOVING AND DELETING a toolbox will delete its archives and archives of the
 // toolboxes it depends on
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
-ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+        "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref=strsubst(ref,"/","\");
 end
@@ -182,24 +190,24 @@ if getos()=="Windows" then
 else
     assert_checkequal(ls(atomsPath("install","user")+'archives/'),ref_empty);
 end
-rmdir(SCIHOME+"/atoms/archives/",'s');
-mkdir(SCIHOME+"/atoms/archives");
-rmdir(SCI+"/contrib/archives/",'s');
-mkdir(SCI+"/contrib/archives");
+rmdir(atomsPath("install","user")+'archives/','s');
+mkdir(atomsPath("install","user")+'archives/');
+rmdir(atomsPath("install","allusers")+'archives/','s');
+mkdir(atomsPath("install","allusers")+'archives/');
 
 // REMOVING AND DELETING a toolbox will not delete other archives than the ones
 // it depends on
 // -----------------------------------------------------------------------------
 atomsInstall(["toolbox_5" "1.0"],"user");
 atomsInstall(["toolbox_6" "1.0"],"user");
-ref = [ "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_2/1.0-1"  "A" ;
-        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_4/1.0-1"  "A" ;
-        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_5/1.0-1"  "I" ];
+ref = [ "toolbox_2"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/1.0-1"  "A" ;
+        "toolbox_4"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_4/1.0-1"  "A" ;
+        "toolbox_5"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_5/1.0-1"  "I" ];
 [version, opts] = getversion();
-arch = opts(2);
+
 if getos()=="Windows" then
     ref=strsubst(ref,"/","\");
-       if arch == "x86" then
+       if opts(2) == "x86" then
 ref_ls = [ "toolbox_1_1.0-1.bin.windows.zip";
            "toolbox_2_2.0-1.bin.windows.zip";
            "toolbox_6_1.0-1.bin.windows.zip"];
@@ -209,7 +217,7 @@ ref_ls = [ "toolbox_1_1.0-1.bin.x64.windows.zip";
            "toolbox_6_1.0-1.bin.x64.windows.zip"];
        end
 elseif getos()=="Linux" then
-       if arch == "x86" then
+       if opts(2) == "x86" then
 ref_ls = [ "toolbox_1_1.0-1.bin.i686.linux.tar.gz";
            "toolbox_2_2.0-1.bin.i686.linux.tar.gz";
            "toolbox_6_1.0-1.bin.i686.linux.tar.gz"];   
@@ -223,9 +231,9 @@ ref_ls = [ "toolbox_1_1.0-1.bin.x86_64.darwin.tar.gz";
            "toolbox_2_2.0-1.bin.x86_64.darwin.tar.gz";
            "toolbox_6_1.0-1.bin.x86_64.darwin.tar.gz"];        
 end
-ref_rem_6 = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_1/1.0-1"  "A" ;
-              "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/toolbox_2/2.0-1"  "A" ;
-              "toolbox_6"  "1.0-1"  "user"  "SCIHOME/atoms/toolbox_6/1.0-1"  "I" ];
+ref_rem_6 = [ "toolbox_1"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_1/1.0-1"  "A" ;
+              "toolbox_2"  "2.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_2/2.0-1"  "A" ;
+              "toolbox_6"  "1.0-1"  "user"  "SCIHOME/atoms/" + arch + "toolbox_6/1.0-1"  "I" ];
 if getos()=="Windows" then
    ref_rem_6=strsubst(ref_rem_6,"/","\");
 end