summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPierre Marechal <pierre.marechal@scilab.org>2007-01-30 20:17:19 +0000
committerPierre Marechal <pierre.marechal@scilab.org>2007-01-30 20:17:19 +0000
commit9e1c1785587d2a55a4345d4dfd6cfd511552fb1c (patch)
tree7c7978733d65ee9a1e5c4ab147beb6579d64b7d5 /tests
parent270cd67c45146f4ae88352acf456752f1aeb7b8c (diff)
downloadscilab-9e1c1785587d2a55a4345d4dfd6cfd511552fb1c.zip
scilab-9e1c1785587d2a55a4345d4dfd6cfd511552fb1c.tar.gz
set svn:eol-style to native
Diffstat (limited to 'tests')
-rw-r--r--tests/C/Test1.dia.ref16
-rw-r--r--tests/automatic_tests/maketests.sce8
-rw-r--r--tests/graphical_tests/maketests.sce8
-rw-r--r--tests/java/Boolean.dia.ref22
-rw-r--r--tests/java/Boolean.java58
-rw-r--r--tests/java/BooleanArray.dia.ref40
-rw-r--r--tests/java/BooleanArray.java98
-rw-r--r--tests/java/Strings2.dia.ref16
-rw-r--r--tests/java/Strings2.java120
-rw-r--r--tests/m2sci_tests/proc/scilab/testgenfiles.sci590
-rwxr-xr-xtests/nonRegression/Qualif/Benchmark/bench_scilab.sce626
-rwxr-xr-xtests/nonRegression/Qualif/Log/copyftp.log184
-rwxr-xr-xtests/nonRegression/Qualif/Proc/aide.bat44
-rwxr-xr-xtests/nonRegression/Qualif/Proc/checklog.bat68
-rwxr-xr-xtests/nonRegression/Qualif/Proc/clearlog.bat82
-rwxr-xr-xtests/nonRegression/Qualif/Proc/clearwork.bat84
-rwxr-xr-xtests/nonRegression/Qualif/Proc/copyftp.bat64
-rwxr-xr-xtests/nonRegression/Qualif/Proc/copyrun.bat56
-rwxr-xr-xtests/nonRegression/Qualif/Proc/demarrage_qualif.bat46
-rwxr-xr-xtests/nonRegression/Qualif/Proc/fonct_qualif.sci1146
-rwxr-xr-xtests/nonRegression/Qualif/Proc/fonct_qualif.sci.sav.txt1084
-rwxr-xr-xtests/nonRegression/Qualif/Proc/fonct_qualif_autre.sci1484
-rwxr-xr-xtests/nonRegression/Qualif/Proc/fonct_qualif_sav1.sci924
-rwxr-xr-xtests/nonRegression/Qualif/Proc/frioul_tests_suite_list.bat16
-rwxr-xr-xtests/nonRegression/Qualif/Proc/init_qualif.bat60
-rwxr-xr-xtests/nonRegression/Qualif/Proc/init_qualif_2.8.2.bat60
-rwxr-xr-xtests/nonRegression/Qualif/Proc/init_version_and_path.bat12
-rwxr-xr-xtests/nonRegression/Qualif/Proc/listfrioul.bat46
-rwxr-xr-xtests/nonRegression/Qualif/Proc/login.cfg.txt2
-rwxr-xr-xtests/nonRegression/Qualif/Proc/menu_qualif.txt82
-rwxr-xr-xtests/nonRegression/Qualif/Proc/modele.sci28
-rwxr-xr-xtests/nonRegression/Qualif/Proc/ncftp.cfg10
-rwxr-xr-xtests/nonRegression/Qualif/Proc/old_clearwork.bat74
-rwxr-xr-xtests/nonRegression/Qualif/Proc/run_qualif_cmd.bat16
-rwxr-xr-xtests/nonRegression/Qualif/Proc/runtest.bat130
-rwxr-xr-xtests/nonRegression/Qualif/Proc/showlog.bat54
-rwxr-xr-xtests/nonRegression/Qualif/Proc/template_run_qualif_cmd.bat16
-rwxr-xr-xtests/nonRegression/Qualif/Proc/test.bat20
-rwxr-xr-xtests/nonRegression/Qualif/Proc/test2.bat42
-rwxr-xr-xtests/nonRegression/Qualif/Proc/travail/help_for.txt318
-rwxr-xr-xtests/nonRegression/Qualif/Proc/travail/helpset.txt344
-rwxr-xr-xtests/nonRegression/Qualif/Proc/travail/suite.bat6
-rwxr-xr-xtests/nonRegression/Qualif/Proc/travail/test.sci14
-rwxr-xr-xtests/nonRegression/Qualif/Proc/viaftp.bat66
-rwxr-xr-xtests/nonRegression/Qualif/Work/autrerep/autrerep.sce46
-rwxr-xr-xtests/nonRegression/Qualif/Work/autrerep/bug21.sci54
-rwxr-xr-xtests/nonRegression/Qualif/Work/autrerep/bug22.sci56
-rwxr-xr-xtests/nonRegression/Qualif/Work/autrerep/bug24.sci38
-rwxr-xr-xtests/nonRegression/Qualif/Work/autrerep/bug25.sci48
-rwxr-xr-xtests/nonRegression/Qualif/Work/autrerep/bug6.sci32
-rwxr-xr-xtests/nonRegression/Qualif/Work/autrerep/bug71.sci48
-rwxr-xr-xtests/nonRegression/Qualif/Work/bench_sciviews_v2/bench_sciviews_v2.sce662
-rwxr-xr-xtests/nonRegression/Qualif/Work/bug0/bug0.sce52
-rwxr-xr-xtests/nonRegression/Qualif/Work/existepas/existepas.sce58
-rwxr-xr-xtests/nonRegression/Qualif/Work/nonreg_2-7-1/bug1.sci48
-rwxr-xr-xtests/nonRegression/Qualif/Work/nonreg_2-7-1/bug21.sci54
-rwxr-xr-xtests/nonRegression/Qualif/Work/nonreg_2-7-1/bug22.sci56
-rwxr-xr-xtests/nonRegression/Qualif/Work/nonreg_2-7-1/bug24.sci38
-rwxr-xr-xtests/nonRegression/Qualif/Work/nonreg_2-7-1/bug25.sci48
-rwxr-xr-xtests/nonRegression/Qualif/Work/nonreg_2-7-1/bug6.sci32
-rwxr-xr-xtests/nonRegression/Qualif/Work/nonreg_2-7-1/nonreg_2-7-1.sce46
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/autrerep/autrerep.sci50
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/autrerep/bug1.sci48
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/autrerep/bug21.sci54
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/autrerep/bug22.sci56
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/autrerep/bug24.sci38
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/autrerep/bug25.sci48
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/autrerep/bug6.sci32
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/nonreg/nonreg.sci38
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/nonreg_2-7-1/bug1.sci48
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/nonreg_2-7-1/bug21.sci54
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/nonreg_2-7-1/bug22.sci56
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/nonreg_2-7-1/bug24.sci38
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/nonreg_2-7-1/bug25.sci48
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/nonreg_2-7-1/bug6.sci32
-rwxr-xr-xtests/nonRegression/Qualif/save tests_suites/nonreg_2-7-1/nonreg_2-7-1.sci54
-rwxr-xr-xtests/nonRegression/Qualif/save/autrerep/autrerep.sce46
-rwxr-xr-xtests/nonRegression/Qualif/save/autrerep/bug1.sci48
-rwxr-xr-xtests/nonRegression/Qualif/save/autrerep/bug21.sci54
-rwxr-xr-xtests/nonRegression/Qualif/save/autrerep/bug22.sci56
-rwxr-xr-xtests/nonRegression/Qualif/save/autrerep/bug24.sci38
-rwxr-xr-xtests/nonRegression/Qualif/save/autrerep/bug25.sci48
-rwxr-xr-xtests/nonRegression/Qualif/save/autrerep/bug6.sci32
-rwxr-xr-xtests/nonRegression/Qualif/save/bench_sciviews_v2/bench_sciviews_v2.sce662
-rwxr-xr-xtests/nonRegression/Qualif/save/bug0/bug0.sce52
-rwxr-xr-xtests/nonRegression/Qualif/save/existepas/existepas.sce58
-rwxr-xr-xtests/nonRegression/Qualif/save/frioul_tests_suite_list.txt12
-rwxr-xr-xtests/nonRegression/Qualif/save/nonreg_2-7-1/bug1.sci48
-rwxr-xr-xtests/nonRegression/Qualif/save/nonreg_2-7-1/bug21.sci54
-rwxr-xr-xtests/nonRegression/Qualif/save/nonreg_2-7-1/bug22.sci56
-rwxr-xr-xtests/nonRegression/Qualif/save/nonreg_2-7-1/bug24.sci38
-rwxr-xr-xtests/nonRegression/Qualif/save/nonreg_2-7-1/bug25.sci48
-rwxr-xr-xtests/nonRegression/Qualif/save/nonreg_2-7-1/bug6.sci32
-rwxr-xr-xtests/nonRegression/Qualif/save/nonreg_2-7-1/nonreg_2-7-1.sce46
-rwxr-xr-xtests/nonRegression/Qualif/save/nonreg_2-7-1/nonreg_2-7-1.sci54
-rwxr-xr-xtests/nonRegression/Qualif/save/t.log2
-rwxr-xr-xtests/nonRegression/Qualif/save/ttt.log2
-rwxr-xr-xtests/nonRegression/Qualif/save/tttt.log2
-rwxr-xr-xtests/nonRegression/Qualif/save/ttttt.log2
-rwxr-xr-xtests/nonRegression/Qualif/save/ttttttttt.log2
-rwxr-xr-xtests/nonRegression/Qualif/save/ttttttttttttttt.log2
-rwxr-xr-xtests/nonRegression/Qualif/scilab.ini222
-rwxr-xr-xtests/nonRegression/bench_sciviews_v2/bench_sciviews_v2.sce662
-rw-r--r--tests/nonRegression/bug2038.sci64
-rw-r--r--tests/nonRegression/bug464.sci40
-rw-r--r--tests/nonRegression/bug467.sci62
-rw-r--r--tests/nonRegression/bug470.sci50
-rw-r--r--tests/nonRegression/bug474.sci56
-rw-r--r--tests/nonRegression/bug475.sci44
-rw-r--r--tests/nonRegression/bug476.sci38
-rw-r--r--tests/nonRegression/bug477.sci52
-rw-r--r--tests/nonRegression/bug480.sci40
-rw-r--r--tests/nonRegression/bug488.sci54
-rw-r--r--tests/nonRegression/bug55.sci32
-rw-r--r--tests/nonRegression/bug562.sci22
-rw-r--r--tests/nonRegression/bug567.sci22
-rw-r--r--tests/nonRegression/bug573.sci16
-rw-r--r--tests/nonRegression/bug629.sci32
-rw-r--r--tests/nonRegression/bug654.sci18
-rw-r--r--tests/nonRegression/bug656.sci18
-rw-r--r--tests/nonRegression/bug71.sci44
-rw-r--r--tests/nonRegression/nonRegression_tests_version_27/before_nonreg_3.sce326
-rw-r--r--tests/nonRegression/nonreg_3_Olivier/bug557.ref2
-rw-r--r--tests/nonRegression/nonreg_3_Olivier/bug562.sce22
-rw-r--r--tests/nonRegression/nonreg_3_Olivier/bug567.sce22
-rw-r--r--tests/nonRegression/nonreg_3_Olivier/bug569.sci26
-rw-r--r--tests/nonRegression/nonreg_3_Olivier/bug573.sce16
-rw-r--r--tests/nonRegression/nonreg_3_Olivier/bug625.sci24
-rw-r--r--tests/nonRegression/nonreg_3_Olivier/bug629.sce32
-rw-r--r--tests/nonRegression/nonreg_3_Olivier/bug629.sci32
130 files changed, 6989 insertions, 6989 deletions
diff --git a/tests/C/Test1.dia.ref b/tests/C/Test1.dia.ref
index 435031b..359f19f 100644
--- a/tests/C/Test1.dia.ref
+++ b/tests/C/Test1.dia.ref
@@ -1,8 +1,8 @@
1 1
2 1. 3. 2 1. 3.
3 2. 4. 3 2. 4.
4 4
5 4. 5 4.
6 5. 6 5.
7x[0] = -0.50 7x[0] = -0.50
8x[1] = 1.50 8x[1] = 1.50
diff --git a/tests/automatic_tests/maketests.sce b/tests/automatic_tests/maketests.sce
index d2605a9..bd5fb5f 100644
--- a/tests/automatic_tests/maketests.sce
+++ b/tests/automatic_tests/maketests.sce
@@ -1,4 +1,4 @@
1exec('maketests.sci',-1); 1exec('maketests.sci',-1);
2maketests('test'); 2maketests('test');
3quit 3quit
4 4
diff --git a/tests/graphical_tests/maketests.sce b/tests/graphical_tests/maketests.sce
index d2605a9..bd5fb5f 100644
--- a/tests/graphical_tests/maketests.sce
+++ b/tests/graphical_tests/maketests.sce
@@ -1,4 +1,4 @@
1exec('maketests.sci',-1); 1exec('maketests.sci',-1);
2maketests('test'); 2maketests('test');
3quit 3quit
4 4
diff --git a/tests/java/Boolean.dia.ref b/tests/java/Boolean.dia.ref
index fd38dc7..46d1780 100644
--- a/tests/java/Boolean.dia.ref
+++ b/tests/java/Boolean.dia.ref
@@ -1,11 +1,11 @@
1---------------------------------------------------- 1----------------------------------------------------
2boolean A= 2boolean A=
3 3
4 T 4 T
5---------------------------------------------------- 5----------------------------------------------------
6true 6true
7---------------------------------------------------- 7----------------------------------------------------
8boolean P= 8boolean P=
9 9
10 F 10 F
11---------------------------------------------------- 11----------------------------------------------------
diff --git a/tests/java/Boolean.java b/tests/java/Boolean.java
index 2635b11..3562377 100644
--- a/tests/java/Boolean.java
+++ b/tests/java/Boolean.java
@@ -1,29 +1,29 @@
1import javasci.* ; 1import javasci.* ;
2 2
3 3
4class Boolean { 4class Boolean {
5 5
6 public static void main(String[] args) { 6 public static void main(String[] args) {
7 7
8 boolean b; 8 boolean b;
9 9
10 SciBoolean a = new SciBoolean("A"); 10 SciBoolean a = new SciBoolean("A");
11 Scilab.Exec("A=%t;"); 11 Scilab.Exec("A=%t;");
12 System.out.println("----------------------------------------------------"); 12 System.out.println("----------------------------------------------------");
13 a.disp(); 13 a.disp();
14 System.out.println("----------------------------------------------------"); 14 System.out.println("----------------------------------------------------");
15 b=a.getData(); 15 b=a.getData();
16 16
17 System.out.println(b); 17 System.out.println(b);
18 18
19 System.out.println("----------------------------------------------------"); 19 System.out.println("----------------------------------------------------");
20 SciBoolean d = new SciBoolean("D",true); 20 SciBoolean d = new SciBoolean("D",true);
21 d.Send(); 21 d.Send();
22 SciBoolean p = new SciBoolean("P"); 22 SciBoolean p = new SciBoolean("P");
23 Scilab.Exec("P=~D;"); 23 Scilab.Exec("P=~D;");
24 p.disp(); 24 p.disp();
25 System.out.println("----------------------------------------------------"); 25 System.out.println("----------------------------------------------------");
26 Scilab.Finish(); 26 Scilab.Finish();
27 } 27 }
28} 28}
29 29
diff --git a/tests/java/BooleanArray.dia.ref b/tests/java/BooleanArray.dia.ref
index 2e1655a..6b18b11 100644
--- a/tests/java/BooleanArray.dia.ref
+++ b/tests/java/BooleanArray.dia.ref
@@ -1,20 +1,20 @@
1---------------------------------------------------- 1----------------------------------------------------
2Matrix A= 2Matrix A=
3 3
4 T T T F 4 T T T F
5 F T T T 5 F T T T
6---------------------------------------------------- 6----------------------------------------------------
7A(1,1)=true A(1,2)=true A(1,3)=true A(1,4)=false 7A(1,1)=true A(1,2)=true A(1,3)=true A(1,4)=false
8A(2,1)=false A(2,2)=true A(2,3)=true A(2,4)=true 8A(2,1)=false A(2,2)=true A(2,3)=true A(2,4)=true
9---------------------------------------------------- 9----------------------------------------------------
10b(0,0)=true b(0,1)=true b(0,2)=true b(0,3)=false 10b(0,0)=true b(0,1)=true b(0,2)=true b(0,3)=false
11b(1,0)=false b(1,1)=true b(1,2)=true b(1,3)=true 11b(1,0)=false b(1,1)=true b(1,2)=true b(1,3)=true
12---------------------------------------------------- 12----------------------------------------------------
13Matrix B= 13Matrix B=
14 14
15 F F F T 15 F F F T
16 T F F F 16 T F F F
17---------------------------------------------------- 17----------------------------------------------------
18A ScilabType : 4 18A ScilabType : 4
19B ScilabType : 4 19B ScilabType : 4
20---------------------------------------------------- 20----------------------------------------------------
diff --git a/tests/java/BooleanArray.java b/tests/java/BooleanArray.java
index b16d065..031df64 100644
--- a/tests/java/BooleanArray.java
+++ b/tests/java/BooleanArray.java
@@ -1,49 +1,49 @@
1import javasci.* ; 1import javasci.* ;
2 2
3 3
4class BooleanArray { 4class BooleanArray {
5 5
6 public static void main(String[] args) { 6 public static void main(String[] args) {
7 int col=4; 7 int col=4;
8 int row=2; 8 int row=2;
9 int r,c; 9 int r,c;
10 boolean [] b=new boolean[row*col]; 10 boolean [] b=new boolean[row*col];
11 11
12 SciBooleanArray a = new SciBooleanArray("A",row,col); 12 SciBooleanArray a = new SciBooleanArray("A",row,col);
13 SciBooleanArray bsci = new SciBooleanArray("B",row,col); 13 SciBooleanArray bsci = new SciBooleanArray("B",row,col);
14 14
15 Scilab.Exec("A=[%t,%t,%t,%f;%f %t %t %t];"); 15 Scilab.Exec("A=[%t,%t,%t,%f;%f %t %t %t];");
16 System.out.println("----------------------------------------------------"); 16 System.out.println("----------------------------------------------------");
17 a.disp(); 17 a.disp();
18 System.out.println("----------------------------------------------------"); 18 System.out.println("----------------------------------------------------");
19 for(r=1;r<=a.getRow();r++) 19 for(r=1;r<=a.getRow();r++)
20 { 20 {
21 for(c=1;c<=a.getCol();c++) 21 for(c=1;c<=a.getCol();c++)
22 { 22 {
23 System.out.print("A("+(r)+","+(c)+")="+a.GetElement(r,c)+" "); 23 System.out.print("A("+(r)+","+(c)+")="+a.GetElement(r,c)+" ");
24 } 24 }
25 System.out.println(" "); 25 System.out.println(" ");
26 } 26 }
27 System.out.println("----------------------------------------------------"); 27 System.out.println("----------------------------------------------------");
28 28
29 b=a.getData(); 29 b=a.getData();
30 30
31 for(r=0;r<row;r++) 31 for(r=0;r<row;r++)
32 { 32 {
33 for(c=0;c<col;c++) 33 for(c=0;c<col;c++)
34 { 34 {
35 System.out.print("b("+r+","+(c)+")="+ b[c*row+r] +" "); 35 System.out.print("b("+r+","+(c)+")="+ b[c*row+r] +" ");
36 } 36 }
37 System.out.println(" "); 37 System.out.println(" ");
38 } 38 }
39 System.out.println("----------------------------------------------------"); 39 System.out.println("----------------------------------------------------");
40 Scilab.Exec("B=~A;"); 40 Scilab.Exec("B=~A;");
41 bsci.disp(); 41 bsci.disp();
42 System.out.println("----------------------------------------------------"); 42 System.out.println("----------------------------------------------------");
43 System.out.println("A ScilabType : "+Scilab.TypeVar("A")); 43 System.out.println("A ScilabType : "+Scilab.TypeVar("A"));
44 System.out.println("B ScilabType : "+Scilab.TypeVar("B")); 44 System.out.println("B ScilabType : "+Scilab.TypeVar("B"));
45 System.out.println("----------------------------------------------------"); 45 System.out.println("----------------------------------------------------");
46 Scilab.Finish(); 46 Scilab.Finish();
47 } 47 }
48} 48}
49 49
diff --git a/tests/java/Strings2.dia.ref b/tests/java/Strings2.dia.ref
index 1219f0a..67c75c1 100644
--- a/tests/java/Strings2.dia.ref
+++ b/tests/java/Strings2.dia.ref
@@ -1,8 +1,8 @@
1 1
2 1. 1000. 2 1. 1000.
3 3
4 1. 1000. 4 1. 1000.
5 5
6 3104. 6 3104.
7 7
8 PSAP1000 8 PSAP1000
diff --git a/tests/java/Strings2.java b/tests/java/Strings2.java
index 599a947..161b0a9 100644
--- a/tests/java/Strings2.java
+++ b/tests/java/Strings2.java
@@ -1,60 +1,60 @@
1import javasci.*; 1import javasci.*;
2 2
3public class Strings2 3public class Strings2
4{ 4{
5 public static void main(String[] args) 5 public static void main(String[] args)
6 { 6 {
7 String[] s=new String[1000]; 7 String[] s=new String[1000];
8 char[] ch=new char[3100]; 8 char[] ch=new char[3100];
9 int r,c,k; 9 int r,c,k;
10 k=0; 10 k=0;
11 for(int i=0;i<s.length;i++) 11 for(int i=0;i<s.length;i++)
12 { 12 {
13 for(int j=0;j<ch.length;j++) 13 for(int j=0;j<ch.length;j++)
14 { 14 {
15 if (k == 0) 15 if (k == 0)
16 { 16 {
17 ch[j]='P'; 17 ch[j]='P';
18 k++; 18 k++;
19 } 19 }
20 else if (k == 1) 20 else if (k == 1)
21 { 21 {
22 ch[j]='S'; 22 ch[j]='S';
23 k++; 23 k++;
24 } 24 }
25 else 25 else
26 { 26 {
27 ch[j]='A'; 27 ch[j]='A';
28 k=0; 28 k=0;
29 } 29 }
30 30
31 } 31 }
32 s[i]=new String(ch); 32 s[i]=new String(ch);
33 } 33 }
34 34
35 SciStringArray sSA=new SciStringArray("A",s.length,1,s); 35 SciStringArray sSA=new SciStringArray("A",s.length,1,s);
36 //sSA.disp(); 36 //sSA.disp();
37 Scilab.Exec("Sa=size(A);"); 37 Scilab.Exec("Sa=size(A);");
38 Scilab.Exec("disp(Sa);"); 38 Scilab.Exec("disp(Sa);");
39 39
40 SciStringArray ssB = new SciStringArray("B",s.length,1); 40 SciStringArray ssB = new SciStringArray("B",s.length,1);
41 Scilab.Exec("B=A+string([1:"+s.length+"]);"); 41 Scilab.Exec("B=A+string([1:"+s.length+"]);");
42 42
43 ssB.Get(); 43 ssB.Get();
44 //ssB.disp(); 44 //ssB.disp();
45 45
46 46
47 Scilab.Exec("Sb=size(B);"); 47 Scilab.Exec("Sb=size(B);");
48 Scilab.Exec("disp(Sb);"); 48 Scilab.Exec("disp(Sb);");
49 // 1 1000 taille matrice de chaines 49 // 1 1000 taille matrice de chaines
50 50
51 Scilab.Exec("len=length(B(Sb(2)));"); 51 Scilab.Exec("len=length(B(Sb(2)));");
52 Scilab.Exec("disp(len);"); 52 Scilab.Exec("disp(len);");
53 // 3104 caracteres 53 // 3104 caracteres
54 54
55 Scilab.Exec("TEST=part(B(Sb(2)),len-7:len);"); 55 Scilab.Exec("TEST=part(B(Sb(2)),len-7:len);");
56 // PSAP1000 56 // PSAP1000
57 Scilab.Exec("disp(TEST);"); 57 Scilab.Exec("disp(TEST);");
58 58
59 } 59 }
60} 60}
diff --git a/tests/m2sci_tests/proc/scilab/testgenfiles.sci b/tests/m2sci_tests/proc/scilab/testgenfiles.sci
index b6af550..e53ff1f 100644
--- a/tests/m2sci_tests/proc/scilab/testgenfiles.sci
+++ b/tests/m2sci_tests/proc/scilab/testgenfiles.sci
@@ -1,295 +1,295 @@
1function []=testgenfiles(test_files,opt) 1function []=testgenfiles(test_files,opt)
2 2
3 // Copyright INRIA 3 // Copyright INRIA
4 // Function which can generate: 4 // Function which can generate:
5 // - reference files for M2SCI tests 5 // - reference files for M2SCI tests
6 // - diary files for M2SCI tests 6 // - diary files for M2SCI tests
7 // Input description: 7 // Input description:
8 // - test_files: names of files to test ('all' for all files in generated_files/ directory) 8 // - test_files: names of files to test ('all' for all files in generated_files/ directory)
9 // - opt: 'ref' if we want to build reference files 9 // - opt: 'ref' if we want to build reference files
10 10
11 ieee(1) 11 ieee(1)
12 global("failed_fun") 12 global("failed_fun")
13 failed_fun=[] 13 failed_fun=[]
14 // Default arguments 14 // Default arguments
15 rhs=argn(2); 15 rhs=argn(2);
16 // If no file of GEN_FILES_DIR is given, all files of this directory are created 16 // If no file of GEN_FILES_DIR is given, all files of this directory are created
17 17
18 if rhs<1 then 18 if rhs<1 then
19 test_files=[] 19 test_files=[]
20 else 20 else
21 if test_files=="all" then 21 if test_files=="all" then
22 test_files=[] 22 test_files=[]
23 else 23 else
24 test_files=GEN_FILES_DIR+test_files 24 test_files=GEN_FILES_DIR+test_files
25 end 25 end
26 end 26 end
27 27
28 if isempty(test_files) then 28 if isempty(test_files) then
29 test_files=listfiles(GEN_FILES_DIR+"*.m"); 29 test_files=listfiles(GEN_FILES_DIR+"*.m");
30 // Ref files are ignored 30 // Ref files are ignored
31 file_ind=1 31 file_ind=1
32 while file_ind<=size(test_files,1) 32 while file_ind<=size(test_files,1)
33 if strindex(test_files(file_ind),"_ref.m")<>[] then 33 if strindex(test_files(file_ind),"_ref.m")<>[] then
34 test_files(file_ind)=[] 34 test_files(file_ind)=[]
35 file_ind=file_ind-1 35 file_ind=file_ind-1
36 end 36 end
37 file_ind=file_ind+1 37 file_ind=file_ind+1
38 end 38 end
39 test_files=gsort(test_files,"r","i"); 39 test_files=gsort(test_files,"r","i");
40 end 40 end
41 41
42 // If option is not given, test is made not ref 42 // If option is not given, test is made not ref
43 if rhs<2 then 43 if rhs<2 then
44 opt="" 44 opt=""
45 end 45 end
46 46
47 // Same format as Matlab mat2str() 47 // Same format as Matlab mat2str()
48 format(16) 48 format(16)
49 49
50 // For all files listed, a .dia or a .dia.ref file is created 50 // For all files listed, a .dia or a .dia.ref file is created
51 for file_ind=1:size(test_files,1) 51 for file_ind=1:size(test_files,1)
52 52
53 if opt=="ref" & ~isempty(fileinfo(GEN_FILES_DIR+basename(test_files(file_ind))+".dia.ref")) then 53 if opt=="ref" & ~isempty(fileinfo(GEN_FILES_DIR+basename(test_files(file_ind))+".dia.ref")) then
54 write(%io(2),"File "+basename(test_files(file_ind))+".dia.ref already exists") 54 write(%io(2),"File "+basename(test_files(file_ind))+".dia.ref already exists")
55 //continue 55 //continue
56 else 56 else
57 57
58 end 58 end
59 // Convert test file (ex: ABS.m) 59 // Convert test file (ex: ABS.m)
60 if opt=="ref" then 60 if opt=="ref" then
61 write(%io(2),"****** Beginning of generation of "+basename(test_files(file_ind))+".dia.ref file ******") 61 write(%io(2),"****** Beginning of generation of "+basename(test_files(file_ind))+".dia.ref file ******")
62 else 62 else
63 write(%io(2),"****** Beginning of test of "+basename(test_files(file_ind))+" ******") 63 write(%io(2),"****** Beginning of test of "+basename(test_files(file_ind))+" ******")
64 end 64 end
65 mfile=basename(test_files(file_ind))+".m" 65 mfile=basename(test_files(file_ind))+".m"
66 66
67 write(%io(2),"Conversion of "+basename(test_files(file_ind))+".m file...") 67 write(%io(2),"Conversion of "+basename(test_files(file_ind))+".m file...")
68 mfile2sci(GEN_FILES_DIR+mfile,GEN_FILES_DIR,%F,%F,-1,%T) 68 mfile2sci(GEN_FILES_DIR+mfile,GEN_FILES_DIR,%F,%F,-1,%T)
69 69
70 // Convert Matlab ref file 70 // Convert Matlab ref file
71 mdiafile=basename(test_files(file_ind))+"_ref.m" 71 mdiafile=basename(test_files(file_ind))+"_ref.m"
72 write(%io(2),"Conversion of "+basename(test_files(file_ind))+"_ref.m file...") 72 write(%io(2),"Conversion of "+basename(test_files(file_ind))+"_ref.m file...")
73 mfile2sci(GEN_FILES_DIR+mdiafile,GEN_FILES_DIR,%F,%F,3,%T) 73 mfile2sci(GEN_FILES_DIR+mdiafile,GEN_FILES_DIR,%F,%F,3,%T)
74 74
75 // Grep Matlab version in cat file 75 // Grep Matlab version in cat file
76 catfilename=basename(test_files(file_ind))+"_ref.cat" 76 catfilename=basename(test_files(file_ind))+"_ref.cat"
77 catfile=mopen(GEN_FILES_DIR+catfilename); 77 catfile=mopen(GEN_FILES_DIR+catfilename);
78 catfiletxt=mgetl(catfile); 78 catfiletxt=mgetl(catfile);
79 mclose(catfile); 79 mclose(catfile);
80 for k=1:size(catfiletxt,"*") 80 for k=1:size(catfiletxt,"*")
81 if strindex(catfiletxt(k),"Matlab version") then 81 if strindex(catfiletxt(k),"Matlab version") then
82 matvers=catfiletxt(k); 82 matvers=catfiletxt(k);
83 end 83 end
84 end 84 end
85 85
86 // Open testfile 86 // Open testfile
87 testfilename=basename(test_files(file_ind))+".sci"; 87 testfilename=basename(test_files(file_ind))+".sci";
88 testfile=mopen(GEN_FILES_DIR+testfilename); 88 testfile=mopen(GEN_FILES_DIR+testfilename);
89 89
90 // Read testfile data 90 // Read testfile data
91 testfiletxt=mgetl(testfile); 91 testfiletxt=mgetl(testfile);
92 mclose(testfile); 92 mclose(testfile);
93 // Kill useless lines (empty lines, comments which do not give test number...) 93 // Kill useless lines (empty lines, comments which do not give test number...)
94 lind=1 94 lind=1
95 while lind<=size(testfiletxt,"*") 95 while lind<=size(testfiletxt,"*")
96 testline=testfiletxt(lind) 96 testline=testfiletxt(lind)
97 if ~isempty(strindex(testline,"//")) & isempty(strindex(testline,"TEST")) then 97 if ~isempty(strindex(testline,"//")) & isempty(strindex(testline,"TEST")) then
98 testfiletxt(lind)=[] 98 testfiletxt(lind)=[]
99 elseif or(stripblanks(testline)==["",";"]) 99 elseif or(stripblanks(testline)==["",";"])
100 testfiletxt(lind)=[] 100 testfiletxt(lind)=[]
101 elseif strindex(testline,"function") // Should be removed if batch file correcty translated... 101 elseif strindex(testline,"function") // Should be removed if batch file correcty translated...
102 testfiletxt(lind)=[] 102 testfiletxt(lind)=[]
103 elseif strindex(testline,"ieee") // Should be removed if batch file correcty translated... 103 elseif strindex(testline,"ieee") // Should be removed if batch file correcty translated...
104 testfiletxt(lind)=[] 104 testfiletxt(lind)=[]
105 elseif strindex(testline,"mode(0);") // Should be removed if batch file correcty translated... 105 elseif strindex(testline,"mode(0);") // Should be removed if batch file correcty translated...
106 testfiletxt(lind)=[] 106 testfiletxt(lind)=[]
107 else 107 else
108 lind=lind+1 108 lind=lind+1
109 end 109 end
110 end 110 end
111 111
112 // Write header 112 // Write header
113 write(%io(2),"Creation of "+basename(test_files(file_ind))+".dia ...") 113 write(%io(2),"Creation of "+basename(test_files(file_ind))+".dia ...")
114 diafiletxt="// Results of execution of "+testfilename; 114 diafiletxt="// Results of execution of "+testfilename;
115 diafiletxt=[diafiletxt;"// Copyright INRIA"]; 115 diafiletxt=[diafiletxt;"// Copyright INRIA"];
116 diafiletxt=[diafiletxt;"// File generated by Scilab: PLEASE DO NOT EDIT !"]; 116 diafiletxt=[diafiletxt;"// File generated by Scilab: PLEASE DO NOT EDIT !"];
117 diafiletxt=[diafiletxt;"// Scilab qualif version: "+getversion()]; 117 diafiletxt=[diafiletxt;"// Scilab qualif version: "+getversion()];
118 diafiletxt=[diafiletxt;"//"+matvers]; 118 diafiletxt=[diafiletxt;"//"+matvers];
119 119
120 lind=1 120 lind=1
121 121
122 while lind<=size(testfiletxt,"*") 122 while lind<=size(testfiletxt,"*")
123 123
124 // Get first test number line 124 // Get first test number line
125 testnbline=testfiletxt(lind); 125 testnbline=testfiletxt(lind);
126 lind=lind+1 126 lind=lind+1
127 diafiletxt=[diafiletxt;testnbline]; 127 diafiletxt=[diafiletxt;testnbline];
128 // Get line to eval 128 // Get line to eval
129 evalline=testfiletxt(lind); 129 evalline=testfiletxt(lind);
130 lind=lind+1 130 lind=lind+1
131 offset=1 131 offset=1
132 if lind<=size(testfiletxt,"*") then 132 if lind<=size(testfiletxt,"*") then
133 while isempty(strindex(testfiletxt(lind),"TEST")) 133 while isempty(strindex(testfiletxt(lind),"TEST"))
134 lind=lind+1 134 lind=lind+1
135 if lind>size(testfiletxt,"*")+1 then 135 if lind>size(testfiletxt,"*")+1 then
136 break 136 break
137 end 137 end
138 offset=length(evalline)+2 138 offset=length(evalline)+2
139 evalline=evalline+";"+testfiletxt(lind-1) 139 evalline=evalline+";"+testfiletxt(lind-1)
140 if lind>size(testfiletxt,"*") then 140 if lind>size(testfiletxt,"*") then
141 break 141 break
142 end 142 end
143 end 143 end
144 end 144 end
145 145
146 // Eval test line 146 // Eval test line
147 execstr(evalline); 147 execstr(evalline);
148 148
149 // Search output variable names 149 // Search output variable names
150 outvars=stripblanks(part(evalline,offset:max(strindex(evalline,"= "))-1)) 150 outvars=stripblanks(part(evalline,offset:max(strindex(evalline,"= "))-1))
151 if strindex(outvars,"[")==[] then 151 if strindex(outvars,"[")==[] then
152 beg=1 152 beg=1
153 closebracket=length(outvars)+1 153 closebracket=length(outvars)+1
154 else 154 else
155 beg=2 155 beg=2
156 closebracket=strindex(outvars,"]"); 156 closebracket=strindex(outvars,"]");
157 end 157 end
158 158
159 comma=strindex(outvars,","); 159 comma=strindex(outvars,",");
160 comma=[beg-1,comma,closebracket]; 160 comma=[beg-1,comma,closebracket];
161 161
162 // For all outputs 162 // For all outputs
163 for k=1:size(comma,"*")-1 163 for k=1:size(comma,"*")-1
164 164
165 // Name 165 // Name
166 resname=part(outvars,comma(k)+1:comma(k+1)-1); 166 resname=part(outvars,comma(k)+1:comma(k+1)-1);
167 167
168 // Value 168 // Value
169 resval=evstr(resname); 169 resval=evstr(resname);
170 170
171 // Size 171 // Size
172 ressize=strcat(string(size(resval))," "); 172 ressize=strcat(string(size(resval))," ");
173 173
174 infos="//"+resname+"|"+ressize+"|"+type_infos(resval); 174 infos="//"+resname+"|"+ressize+"|"+type_infos(resval);
175 diafiletxt=[diafiletxt;infos]; 175 diafiletxt=[diafiletxt;infos];
176 176
177 // Make string from result value 177 // Make string from result value
178 if resval=="" 178 if resval==""
179 resvalstr = """"""; 179 resvalstr = """""";
180 else 180 else
181 f_sav=format() 181 f_sav=format()
182 format("v",16) // To write same precision as Matlab mat2str() 182 format("v",16) // To write same precision as Matlab mat2str()
183 resvalstr=sci2exp(resval) 183 resvalstr=sci2exp(resval)
184 if size(resvalstr,1)>1 then 184 if size(resvalstr,1)>1 then
185 if strindex(resvalstr(1),"..")==[] & part(resvalstr(1),length(resvalstr(1)))<>";" then 185 if strindex(resvalstr(1),"..")==[] & part(resvalstr(1),length(resvalstr(1)))<>";" then
186 resvalstr = strcat(resvalstr,";"); 186 resvalstr = strcat(resvalstr,";");
187 else 187 else
188 resvalstr = strsubst(strcat(resvalstr),"..",""); 188 resvalstr = strsubst(strcat(resvalstr),"..","");
189 end 189 end
190 end 190 end
191 format(f_sav(2)) 191 format(f_sav(2))
192 end 192 end
193 // Write result value in ref file 193 // Write result value in ref file
194 diafiletxt=[diafiletxt;resname+" = "+resvalstr]; 194 diafiletxt=[diafiletxt;resname+" = "+resvalstr];
195 end 195 end
196 end 196 end
197 197
198 // Generate output file name 198 // Generate output file name
199 if opt=="ref" then 199 if opt=="ref" then
200 diafilename=basename(test_files(file_ind))+".dia.ref"; 200 diafilename=basename(test_files(file_ind))+".dia.ref";
201 else 201 else
202 diafilename=basename(test_files(file_ind))+".dia"; 202 diafilename=basename(test_files(file_ind))+".dia";
203 end 203 end
204 204
205 mputl(diafiletxt,GEN_FILES_DIR+diafilename); 205 mputl(diafiletxt,GEN_FILES_DIR+diafilename);
206 206
207 207
208 funname=basename(test_files(file_ind)) 208 funname=basename(test_files(file_ind))
209 209
210 210
211 if opt=="ref" then 211 if opt=="ref" then
212 // Now Scilab reference file is created, it has to be validated 212 // Now Scilab reference file is created, it has to be validated
213 write(%io(2),"Validation of "+funname+".dia.ref file...") 213 write(%io(2),"Validation of "+funname+".dia.ref file...")
214 passed=validref(funname) 214 passed=validref(funname)
215 if passed then 215 if passed then
216 write(%io(2),"---> Validation of "+funname+".dia.ref: PASSED !") 216 write(%io(2),"---> Validation of "+funname+".dia.ref: PASSED !")
217 217
218 // Delete all useles files 218 // Delete all useles files
219 mdelete(pathconvert(GEN_FILES_DIR+"*.sci",%F)) 219 mdelete(pathconvert(GEN_FILES_DIR+"*.sci",%F))
220 mdelete(pathconvert(GEN_FILES_DIR+"*.cat",%F)) 220 mdelete(pathconvert(GEN_FILES_DIR+"*.cat",%F))
221 mdelete(pathconvert(GEN_FILES_DIR+"*varslist*.*",%F)) 221 mdelete(pathconvert(GEN_FILES_DIR+"*varslist*.*",%F))
222 mdelete(pathconvert(GEN_FILES_DIR+"resume_*",%F)) 222 mdelete(pathconvert(GEN_FILES_DIR+"resume_*",%F))
223 else 223 else
224 if ~or(funname==failed_fun) then 224 if ~or(funname==failed_fun) then
225 if size(failed_fun,"*")==0 then 225 if size(failed_fun,"*")==0 then
226 failed_fun=["Comparison between FUNNAME.dia.ref and FUNNAME.varslist.dia.ref file andFUNNAME_ref.sci ...";"";"---> Test for "+funname+": FAILED !"] 226 failed_fun=["Comparison between FUNNAME.dia.ref and FUNNAME.varslist.dia.ref file andFUNNAME_ref.sci ...";"";"---> Test for "+funname+": FAILED !"]
227 else 227 else
228 failed_fun=[failed_fun;"---> Test for "+funname+": FAILED !"] 228 failed_fun=[failed_fun;"---> Test for "+funname+": FAILED !"]
229 end 229 end
230 end 230 end
231 write(%io(2),"---> Validation of "+funname+".dia: FAILED !") 231 write(%io(2),"---> Validation of "+funname+".dia: FAILED !")
232 write(%io(2),"---> Please see "+funname+"_valid.log file in valid_ref_logs/ directory.") 232 write(%io(2),"---> Please see "+funname+"_valid.log file in valid_ref_logs/ directory.")
233 end 233 end
234 else 234 else
235 write(%io(2),"Comparison between "+funname+".dia.ref and "+funname+".dia file...") 235 write(%io(2),"Comparison between "+funname+".dia.ref and "+funname+".dia file...")
236 mdelete(pathconvert(GEN_FILES_DIR+"*.sci",%F)) 236 mdelete(pathconvert(GEN_FILES_DIR+"*.sci",%F))
237 mdelete(pathconvert(GEN_FILES_DIR+"*.cat",%F)) 237 mdelete(pathconvert(GEN_FILES_DIR+"*.cat",%F))
238 mdelete(pathconvert(GEN_FILES_DIR+"*varslist*.*",%F)) 238 mdelete(pathconvert(GEN_FILES_DIR+"*varslist*.*",%F))
239 mdelete(pathconvert(GEN_FILES_DIR+"resume_*",%F)) 239 mdelete(pathconvert(GEN_FILES_DIR+"resume_*",%F))
240 passed=valid_dia(funname) 240 passed=valid_dia(funname)
241 //DIATXT=mgetl(GEN_FILES_DIR+diafilename) 241 //DIATXT=mgetl(GEN_FILES_DIR+diafilename)
242 //DIAREFTXT=mgetl(GEN_FILES_DIR+diafilename+".ref") 242 //DIAREFTXT=mgetl(GEN_FILES_DIR+diafilename+".ref")
243 243
244 // Remove Scilab and Matlab version 244 // Remove Scilab and Matlab version
245 //for ktxt=1:size(DIATXT,"*") 245 //for ktxt=1:size(DIATXT,"*")
246 // if ~isempty(strindex(DIATXT(ktxt),"version")) then 246 // if ~isempty(strindex(DIATXT(ktxt),"version")) then
247 // DIATXT(ktxt:ktxt+1)=[] 247 // DIATXT(ktxt:ktxt+1)=[]
248 // break 248 // break
249 // end 249 // end
250 //end 250 //end
251 251
252 // Remove Scilab and Matlab version 252 // Remove Scilab and Matlab version
253 //for ktxt=1:size(DIAREFTXT,"*") 253 //for ktxt=1:size(DIAREFTXT,"*")
254 // if ~isempty(strindex(DIAREFTXT(ktxt),"version")) then 254 // if ~isempty(strindex(DIAREFTXT(ktxt),"version")) then
255 // DIAREFTXT(ktxt:ktxt+1)=[] 255 // DIAREFTXT(ktxt:ktxt+1)=[]
256 // break 256 // break
257 // end 257 // end
258 //end 258 //end
259 259
260 //if or(DIATXT<>DIAREFTXT) then 260 //if or(DIATXT<>DIAREFTXT) then
261 261
262 if ~passed then 262 if ~passed then
263 if ~or(funname==failed_fun) then 263 if ~or(funname==failed_fun) then
264 if size(failed_fun,"*")==0 then 264 if size(failed_fun,"*")==0 then
265 failed_fun=["Comparison between FUNNAME.dia.ref and FUNNAME.dia file...";"";"---> Test for "+funname+": FAILED !"] 265 failed_fun=["Comparison between FUNNAME.dia.ref and FUNNAME.dia file...";"";"---> Test for "+funname+": FAILED !"]
266 else 266 else
267 failed_fun=[failed_fun;"---> Test for "+funname+": FAILED !"] 267 failed_fun=[failed_fun;"---> Test for "+funname+": FAILED !"]
268 end 268 end
269 end 269 end
270 write(%io(2),"---> Test for "+funname+": FAILED !") 270 write(%io(2),"---> Test for "+funname+": FAILED !")
271 else 271 else
272 write(%io(2),"---> Test for "+funname+": PASSED !") 272 write(%io(2),"---> Test for "+funname+": PASSED !")
273 end 273 end
274 274
275 end 275 end
276 276
277 if opt=="ref" then 277 if opt=="ref" then
278 write(%io(2),["****** End of generation of "+basename(test_files(file_ind))+".dia.ref file ******";""]) 278 write(%io(2),["****** End of generation of "+basename(test_files(file_ind))+".dia.ref file ******";""])
279 else 279 else
280 write(%io(2),["****** End of test of "+basename(test_files(file_ind))+" ******";""]) 280 write(%io(2),["****** End of test of "+basename(test_files(file_ind))+" ******";""])
281 end 281 end
282 if opt=='' then 282 if opt=='' then
283 mdelete(GEN_FILES_DIR+diafilename) 283 mdelete(GEN_FILES_DIR+diafilename)
284 end 284 end
285 end 285 end
286 286
287 // write fun_failed 287 // write fun_failed
288 failedfunfile=GEN_FILES_DIR+"failed_fun.log" 288 failedfunfile=GEN_FILES_DIR+"failed_fun.log"
289 funfile=mopen(failedfunfile,"w") 289 funfile=mopen(failedfunfile,"w")
290 if failed_fun==[] then 290 if failed_fun==[] then
291 failed_fun=["***** NOT FAILED FUNCTION *****"] 291 failed_fun=["***** NOT FAILED FUNCTION *****"]
292 end 292 end
293 mputl(failed_fun,funfile) 293 mputl(failed_fun,funfile)
294 clearglobal failed_fun 294 clearglobal failed_fun
295endfunction 295endfunction
diff --git a/tests/nonRegression/Qualif/Benchmark/bench_scilab.sce b/tests/nonRegression/Qualif/Benchmark/bench_scilab.sce
index 6791bb4..9b71661 100755
--- a/tests/nonRegression/Qualif/Benchmark/bench_scilab.sce
+++ b/tests/nonRegression/Qualif/Benchmark/bench_scilab.sce
@@ -1,313 +1,313 @@
1// Scilab Benchmark 2 (8 March 2003) 1// Scilab Benchmark 2 (8 March 2003)
2// version 2, scaled to get 1 +/- 0.1 sec with R 1.6.2 2// version 2, scaled to get 1 +/- 0.1 sec with R 1.6.2
3// using the standard ATLAS library (Rblas.dll) 3// using the standard ATLAS library (Rblas.dll)
4// on a Pentium IV 1.6 Ghz with 1 Gb Ram on Win XP pro 4// on a Pentium IV 1.6 Ghz with 1 Gb Ram on Win XP pro
5// Author : Philippe Grosjean 5// Author : Philippe Grosjean
6// eMail : phgrosjean@sciviews.org 6// eMail : phgrosjean@sciviews.org
7// Web : http://www.sciviews.org 7// Web : http://www.sciviews.org
8// License: GPL 2 or above at your convenience (see: http://www.gnu.org) 8// License: GPL 2 or above at your convenience (see: http://www.gnu.org)
9// 9//
10// Several tests are adapted from: 10// Several tests are adapted from:
11//*************************************************************************** 11//***************************************************************************
12//* Matlab Benchmark program version 2.0 * 12//* Matlab Benchmark program version 2.0 *
13//* Author : Stefan Steinhaus * 13//* Author : Stefan Steinhaus *
14//* EMAIL : stst@informatik.uni-frankfurt.de * 14//* EMAIL : stst@informatik.uni-frankfurt.de *
15//* This program is public domain. Feel free to copy it freely. * 15//* This program is public domain. Feel free to copy it freely. *
16//*************************************************************************** 16//***************************************************************************
17// Escoufier's equivalents vectors (III.5) is adapted from Planque & Fromentin, 1996 17// Escoufier's equivalents vectors (III.5) is adapted from Planque & Fromentin, 1996
18// Ref: Escoufier Y., 1970. Echantillonnage dans une population de variables 18// Ref: Escoufier Y., 1970. Echantillonnage dans une population de variables
19// aleatoires réelles. Publ. Inst. Statis. Univ. Paris 19 Fasc 4, 1-47. 19// aleatoires réelles. Publ. Inst. Statis. Univ. Paris 19 Fasc 4, 1-47.
20// 20//
21// type exec('c:\<dir>\Scilab2.sce', 0); to start the test 21// type exec('c:\<dir>\Scilab2.sce', 0); to start the test
22 22
23stacksize(30000000) 23stacksize(30000000)
24runs = 3; // Number of times the tests are executed 24runs = 3; // Number of times the tests are executed
25times = zeros(5, 3); 25times = zeros(5, 3);
26 26
27disp(' Scilab Benchmark 2') 27disp(' Scilab Benchmark 2')
28disp(' ==================') 28disp(' ==================')
29disp('Number of times each test is run__________________________: ' + string(runs)) 29disp('Number of times each test is run__________________________: ' + string(runs))
30disp(' ') 30disp(' ')
31 31
32 32
33disp(' I. Matrix calculation') 33disp(' I. Matrix calculation')
34disp(' ---------------------') 34disp(' ---------------------')
35 35
36 36
37// (1) 37// (1)
38cumulate = 0; a = 0; b = 0; 38cumulate = 0; a = 0; b = 0;
39for i = 1:runs 39for i = 1:runs
40 timer(); 40 timer();
41 a = abs(rand(1500, 1500, 'n')/10); 41 a = abs(rand(1500, 1500, 'n')/10);
42 b = a'; 42 b = a';
43 a = matrix(b, 750, 3000); 43 a = matrix(b, 750, 3000);
44 b = a'; 44 b = a';
45 timing = timer(); 45 timing = timer();
46 cumulate = cumulate + timing; 46 cumulate = cumulate + timing;
47end; 47end;
48timing = cumulate/runs; 48timing = cumulate/runs;
49times(1, 1) = timing; 49times(1, 1) = timing;
50disp('Creation, transp., deformation of a 1500x1500 matrix (sec): ' + string(timing)); 50disp('Creation, transp., deformation of a 1500x1500 matrix (sec): ' + string(timing));
51clear('a'); clear('b'); 51clear('a'); clear('b');
52 52
53// (2) 53// (2)
54cumulate = 0; b = 0; 54cumulate = 0; b = 0;
55for i = 1:runs 55for i = 1:runs
56 a = abs(rand(800, 800, 'n')/2); 56 a = abs(rand(800, 800, 'n')/2);
57 timer(); 57 timer();
58 b = a.^1000; 58 b = a.^1000;
59 timing = timer(); 59 timing = timer();
60 cumulate = cumulate + timing; 60 cumulate = cumulate + timing;
61end 61end
62timing = cumulate/runs; 62timing = cumulate/runs;
63times(2, 1) = timing; 63times(2, 1) = timing;
64disp('800x800 normal distributed random matrix ^1000______ (sec): ' + string(timing)) 64disp('800x800 normal distributed random matrix ^1000______ (sec): ' + string(timing))
65clear('a'); clear('b'); 65clear('a'); clear('b');
66 66
67// (3) 67// (3)
68cumulate = 0; b = 0; 68cumulate = 0; b = 0;
69for i = 1:runs 69for i = 1:runs
70 a = rand(2000000, 1, 'n'); 70 a = rand(2000000, 1, 'n');
71 timer(); 71 timer();
72 b = -sort(-a); 72 b = -sort(-a);
73 timing = timer(); 73 timing = timer();
74 cumulate = cumulate + timing; 74 cumulate = cumulate + timing;
75end 75end
76timing = cumulate/runs; 76timing = cumulate/runs;
77times(3, 1) = timing; 77times(3, 1) = timing;
78disp('Sorting of 2,000,000 random values__________________ (sec): ' + string(timing)) 78disp('Sorting of 2,000,000 random values__________________ (sec): ' + string(timing))
79clear('a'); clear('b'); 79clear('a'); clear('b');
80 80
81// (4) 81// (4)
82cumulate = 0; b = 0; 82cumulate = 0; b = 0;
83for i = 1:runs 83for i = 1:runs
84 a = rand(700, 700, 'n'); 84 a = rand(700, 700, 'n');
85 timer(); 85 timer();
86 b = a'*a; 86 b = a'*a;
87 timing = timer(); 87 timing = timer();
88 cumulate = cumulate + timing; 88 cumulate = cumulate + timing;
89end 89end
90timing = cumulate/runs; 90timing = cumulate/runs;
91times(4, 1) = timing; 91times(4, 1) = timing;
92disp('700x700 cross-product matrix (b = a'' * a)___________ (sec): ' + string(timing)) 92disp('700x700 cross-product matrix (b = a'' * a)___________ (sec): ' + string(timing))
93clear('a'); clear('b'); 93clear('a'); clear('b');
94 94
95// (5) 95// (5)
96cumulate = 0; c = 0; 96cumulate = 0; c = 0;
97for i = 1:runs 97for i = 1:runs
98 a = rand(600, 600, 'n'); 98 a = rand(600, 600, 'n');
99 b = 1:600; 99 b = 1:600;
100 timer(); 100 timer();
101 c = a\b'; 101 c = a\b';
102 timing = timer(); 102 timing = timer();
103 cumulate = cumulate + timing; 103 cumulate = cumulate + timing;
104end 104end
105timing = cumulate/runs; 105timing = cumulate/runs;
106times(5, 1) = timing; 106times(5, 1) = timing;
107disp('Linear regression over a 600x600 matrix (c = a \ b'') (sec): ' + string(timing)) 107disp('Linear regression over a 600x600 matrix (c = a \ b'') (sec): ' + string(timing))
108clear('a'); clear('b'); clear('c'); 108clear('a'); clear('b'); clear('c');
109 109
110times = sort(times, 'r'); 110times = sort(times, 'r');
111disp(' --------------------------------------------------') 111disp(' --------------------------------------------------')
112disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,1)))))) 112disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,1))))))
113disp(' ') 113disp(' ')
114 114
115disp(' II. Matrix functions') 115disp(' II. Matrix functions')
116disp(' --------------------') 116disp(' --------------------')
117 117
118 118
119// (1) 119// (1)
120cumulate = 0; b = 0; 120cumulate = 0; b = 0;
121for i = 1:runs 121for i = 1:runs
122 a = rand(800000, 1, 'n'); 122 a = rand(800000, 1, 'n');
123 timer(); 123 timer();
124 b = fft(a, -1); 124 b = fft(a, -1);
125 timing = timer(); 125 timing = timer();
126 cumulate = cumulate + timing; 126 cumulate = cumulate + timing;
127end 127end
128timing = cumulate/runs; 128timing = cumulate/runs;
129times(1, 2) = timing; 129times(1, 2) = timing;
130disp('FFT over 800,000 random values______________________ (sec): ' + string(timing)) 130disp('FFT over 800,000 random values______________________ (sec): ' + string(timing))
131clear('a'); clear('b'); 131clear('a'); clear('b');
132 132
133// (2) 133// (2)
134cumulate = 0; b = 0; 134cumulate = 0; b = 0;
135for i = 1:runs 135for i = 1:runs
136 a = rand(320, 320, 'n'); 136 a = rand(320, 320, 'n');
137 timer(); 137 timer();
138 b = spec(a); 138 b = spec(a);
139 timing = timer(); 139 timing = timer();
140 cumulate = cumulate + timing; 140 cumulate = cumulate + timing;
141end 141end
142timing = cumulate/runs; 142timing = cumulate/runs;
143times(2, 2) = timing; 143times(2, 2) = timing;
144disp('Eigenvalues of a 320x320 random matrix______________ (sec): ' + string(timing)) 144disp('Eigenvalues of a 320x320 random matrix______________ (sec): ' + string(timing))
145clear('a'); clear('b'); 145clear('a'); clear('b');
146 146
147// (3) 147// (3)
148cumulate = 0; b = 0; 148cumulate = 0; b = 0;
149for i = 1:runs 149for i = 1:runs
150 a = rand(650, 650, 'n'); 150 a = rand(650, 650, 'n');
151 timer(); 151 timer();
152 b = det(a); 152 b = det(a);
153 timing = timer(); 153 timing = timer();
154 cumulate = cumulate + timing; 154 cumulate = cumulate + timing;
155end 155end
156timing = cumulate/runs; 156timing = cumulate/runs;
157times(3, 2) = timing; 157times(3, 2) = timing;
158disp('Determinant of a 650x650 random matrix______________ (sec): ' + string(timing)) 158disp('Determinant of a 650x650 random matrix______________ (sec): ' + string(timing))
159clear('a'); clear('b'); 159clear('a'); clear('b');
160 160
161// (4) 161// (4)
162cumulate = 0; b = 0; 162cumulate = 0; b = 0;
163for i = 1:runs 163for i = 1:runs
164 a = rand(900, 900, 'n'); 164 a = rand(900, 900, 'n');
165 a = a'*a; 165 a = a'*a;
166 timer(); 166 timer();
167 b = chol(a); 167 b = chol(a);
168 timing = timer(); 168 timing = timer();
169 cumulate = cumulate + timing; 169 cumulate = cumulate + timing;
170end 170end
171timing = cumulate/runs; 171timing = cumulate/runs;
172times(4, 2) = timing; 172times(4, 2) = timing;
173disp('Cholesky decomposition of a 900x900 matrix__________ (sec): ' + string(timing)) 173disp('Cholesky decomposition of a 900x900 matrix__________ (sec): ' + string(timing))
174clear('a'); clear('b'); 174clear('a'); clear('b');
175 175
176// (5) 176// (5)
177cumulate = 0; b = 0; 177cumulate = 0; b = 0;
178for i = 1:runs 178for i = 1:runs
179 a = rand(400, 400, 'n'); 179 a = rand(400, 400, 'n');
180 timer(); 180 timer();
181 b = inv(a); 181 b = inv(a);
182 timing = timer(); 182 timing = timer();
183 cumulate = cumulate + timing; 183 cumulate = cumulate + timing;
184end 184end
185timing = cumulate/runs; 185timing = cumulate/runs;
186times(5, 2) = timing; 186times(5, 2) = timing;
187disp('Inverse of a 400x400 random matrix__________________ (sec): ' + string(timing)) 187disp('Inverse of a 400x400 random matrix__________________ (sec): ' + string(timing))
188clear('a'); clear('b'); 188clear('a'); clear('b');
189 189
190times = sort(times, 'r'); 190times = sort(times, 'r');
191disp(' --------------------------------------------------') 191disp(' --------------------------------------------------')
192disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,2)))))) 192disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,2))))))
193disp(' ') 193disp(' ')
194 194
195disp(' III. Programmation') 195disp(' III. Programmation')
196disp(' ------------------') 196disp(' ------------------')
197 197
198// (1) 198// (1)
199cumulate = 0; a = 0; b = 0; phi = 1.6180339887498949; 199cumulate = 0; a = 0; b = 0; phi = 1.6180339887498949;
200for i = 1:runs 200for i = 1:runs
201 a = floor(1000 * rand(750000, 1, 'u')); 201 a = floor(1000 * rand(750000, 1, 'u'));
202 timer(); 202 timer();
203 b = (phi.^a - (-phi).^(-a)) / sqrt(5); 203 b = (phi.^a - (-phi).^(-a)) / sqrt(5);
204 timing = timer(); 204 timing = timer();
205 cumulate = cumulate + timing; 205 cumulate = cumulate + timing;
206end 206end
207timing = cumulate/runs; 207timing = cumulate/runs;
208times(1, 3) = timing; 208times(1, 3) = timing;
209disp('750,000 Fibonacci numbers calculation (vector calc)_ (sec): ' + string(timing)) 209disp('750,000 Fibonacci numbers calculation (vector calc)_ (sec): ' + string(timing))
210clear('a'); clear('b'); clear('phi'); 210clear('a'); clear('b'); clear('phi');
211 211
212// (2) 212// (2)
213cumulate = 0; a = 2250; b = 0; 213cumulate = 0; a = 2250; b = 0;
214for i = 1:runs 214for i = 1:runs
215 timer(); 215 timer();
216 b = ones(a, a)./((1:a)' * ones(1, a) + ones(a, 1) * (0:(a-1))); 216 b = ones(a, a)./((1:a)' * ones(1, a) + ones(a, 1) * (0:(a-1)));
217 timing = timer(); 217 timing = timer();
218 cumulate = cumulate + timing; 218 cumulate = cumulate + timing;
219end 219end
220timing = cumulate/runs; 220timing = cumulate/runs;
221times(2, 3) = timing; 221times(2, 3) = timing;
222disp('Creation of a 2250x2250 Hilbert matrix (matrix calc) (sec): ' + string(timing)) 222disp('Creation of a 2250x2250 Hilbert matrix (matrix calc) (sec): ' + string(timing))
223clear('a'); clear('b'); 223clear('a'); clear('b');
224 224
225// (3) 225// (3)
226cumulate = 0; c = 0; 226cumulate = 0; c = 0;
227deff('[c]=gcd2(a, b)',['if b <= 1.0E-4'; 'c = a;'; 'else'; 'b(b == 0) = a(b == 0);'; 'c = gcd2(b, modulo(a, b));'; 'end']) 227deff('[c]=gcd2(a, b)',['if b <= 1.0E-4'; 'c = a;'; 'else'; 'b(b == 0) = a(b == 0);'; 'c = gcd2(b, modulo(a, b));'; 'end'])
228for i = 1:runs 228for i = 1:runs
229 a = ceil(1000 * rand(70000, 1, 'u')); 229 a = ceil(1000 * rand(70000, 1, 'u'));
230 b = ceil(1000 * rand(70000, 1, 'u')); 230 b = ceil(1000 * rand(70000, 1, 'u'));
231 timer(); 231 timer();
232 c = gcd2(a, b); // gcd2 is a recursive function 232 c = gcd2(a, b); // gcd2 is a recursive function
233 timing = timer(); 233 timing = timer();
234 cumulate = cumulate + timing; 234 cumulate = cumulate + timing;
235end 235end
236timing = cumulate/runs; 236timing = cumulate/runs;
237times(3, 3) = timing; 237times(3, 3) = timing;
238disp('Grand common divisors of 70,000 pairs (recursion)___ (sec): ' + string(timing)) 238disp('Grand common divisors of 70,000 pairs (recursion)___ (sec): ' + string(timing))
239clear('a'); clear('b'); clear('c'); 239clear('a'); clear('b'); clear('c');
240 240
241// (4) 241// (4)
242cumulate = 0; b = 0; 242cumulate = 0; b = 0;
243for i = 1:runs 243for i = 1:runs
244 b = zeros(220, 220); 244 b = zeros(220, 220);
245 timer(); 245 timer();
246 for j = 1:220 246 for j = 1:220
247 for k = 1:220 247 for k = 1:220
248 b(k,j) = abs(j - k) + 1; 248 b(k,j) = abs(j - k) + 1;
249 end 249 end
250 end 250 end
251 timing = timer(); 251 timing = timer();
252 cumulate = cumulate + timing; 252 cumulate = cumulate + timing;
253end 253end
254timing = cumulate/runs; 254timing = cumulate/runs;
255times(4, 3) = timing; 255times(4, 3) = timing;
256disp('Creation of a 220x220 Toeplitz matrix (loops)_______ (sec): ' + string(timing)) 256disp('Creation of a 220x220 Toeplitz matrix (loops)_______ (sec): ' + string(timing))
257clear('b'); clear('j'); clear('k'); 257clear('b'); clear('j'); clear('k');
258 258
259// (5) 259// (5)
260cumulate = 0; p = 0; q = 0; vt = 0; vr = 0; vrt = 0; rvt = 0; RV = 0; j = 0; k = 0; 260cumulate = 0; p = 0; q = 0; vt = 0; vr = 0; vrt = 0; rvt = 0; RV = 0; j = 0; k = 0;
261x2 = 0; R = 0; Rxx = 0; Ryy = 0; Rxy = 0; Ryx = 0; Rvmax = 0; f = 0;, c= 0; d = 0; 261x2 = 0; R = 0; Rxx = 0; Ryy = 0; Rxy = 0; Ryx = 0; Rvmax = 0; f = 0;, c= 0; d = 0;
262for i = 1:runs 262for i = 1:runs
263 x = abs(rand(37, 37, 'n')); 263 x = abs(rand(37, 37, 'n'));
264 timer(); 264 timer();
265 // Calculation of Escoufier's equivalent vectors 265 // Calculation of Escoufier's equivalent vectors
266 p = size(x, 2); 266 p = size(x, 2);
267 vt = [1:p]; // Variables to test 267 vt = [1:p]; // Variables to test
268 vr = []; // Result: ordered variables 268 vr = []; // Result: ordered variables
269 RV = [1:p]; // Result: correlations 269 RV = [1:p]; // Result: correlations
270 for j = 1:p // loop on the variable number 270 for j = 1:p // loop on the variable number
271 Rvmax = 0; 271 Rvmax = 0;
272 for k = 1:(p-j+1) // loop on the variables 272 for k = 1:(p-j+1) // loop on the variables
273 x2 = [x, x(:, vr), x(:, vt(k))]; // New table to test 273 x2 = [x, x(:, vr), x(:, vt(k))]; // New table to test
274 // R = corrcoef(x2); // Correlations table 274 // R = corrcoef(x2); // Correlations table
275 // Not in scilab, so the 5 following lines do it 275 // Not in scilab, so the 5 following lines do it
276 q = size(x2, 1); 276 q = size(x2, 1);
277 x2 = x2 - ones (q, 1) * sum (x2, 'r') / q; 277 x2 = x2 - ones (q, 1) * sum (x2, 'r') / q;
278 c = conj(x2' * x2 / (q - 1)); 278 c = conj(x2' * x2 / (q - 1));
279 d=diag(c); 279 d=diag(c);
280 R = c ./ sqrt(d * d'); 280 R = c ./ sqrt(d * d');
281 Ryy = R(1:p, 1:p); 281 Ryy = R(1:p, 1:p);
282 Rxx = R(p+1:p+j, p+1:p+j); 282 Rxx = R(p+1:p+j, p+1:p+j);
283 Rxy = R(p+1:p+j, 1:p); 283 Rxy = R(p+1:p+j, 1:p);
284 Ryx = Rxy'; 284 Ryx = Rxy';
285 rvt = trace(Ryx*Rxy)/((trace(Ryy^2)*trace(Rxx^2))^0.5); // RV calculation 285 rvt = trace(Ryx*Rxy)/((trace(Ryy^2)*trace(Rxx^2))^0.5); // RV calculation
286 if rvt > Rvmax 286 if rvt > Rvmax
287 Rvmax = rvt; // test of RV 287 Rvmax = rvt; // test of RV
288 vrt(j) = vt(k); // temporary held variable 288 vrt(j) = vt(k); // temporary held variable
289 end 289 end
290 end 290 end
291 vr(j) = vrt(j); // Result: variable 291 vr(j) = vrt(j); // Result: variable
292 RV(j) = Rvmax; // Result: correlation 292 RV(j) = Rvmax; // Result: correlation
293 f = find(vt~=vr(j)); // identify the held variable 293 f = find(vt~=vr(j)); // identify the held variable
294 vt = vt(f); // reidentify variables to test 294 vt = vt(f); // reidentify variables to test
295 end 295 end
296 timing = timer(); 296 timing = timer();
297 cumulate = cumulate + timing; 297 cumulate = cumulate + timing;
298end 298end
299times(5, 3) = timing; 299times(5, 3) = timing;
300disp('Escoufier''s method on a 37x37 matrix (mixed)________ (sec): ' + string(timing)) 300disp('Escoufier''s method on a 37x37 matrix (mixed)________ (sec): ' + string(timing))
301clear('x'); clear('p'); clear('q'); clear('vt'); clear('vr'); clear('vrt'); clear('rvt'); clear('RV'); clear('j'); clear('k'); 301clear('x'); clear('p'); clear('q'); clear('vt'); clear('vr'); clear('vrt'); clear('rvt'); clear('RV'); clear('j'); clear('k');
302clear('x2'); clear('R'); clear('Rxx'); clear('Ryy'); clear('Rxy'); clear('Ryx'); clear('Rvmax'); clear('f'); clear('c'); clear('d'); 302clear('x2'); clear('R'); clear('Rxx'); clear('Ryy'); clear('Rxy'); clear('Ryx'); clear('Rvmax'); clear('f'); clear('c'); clear('d');
303 303
304times = sort(times, 'r'); 304times = sort(times, 'r');
305disp(' --------------------------------------------------') 305disp(' --------------------------------------------------')
306disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,3)))))) 306disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,3))))))
307disp(' ') 307disp(' ')
308 308
309disp(' ') 309disp(' ')
310disp('Total time for all 15 tests_________________________ (sec): ' + string(sum(times))) 310disp('Total time for all 15 tests_________________________ (sec): ' + string(sum(times)))
311disp('Overall mean (sum of I, II and III trimmed means/3)_ (sec): ' + string(exp(mean(log(times(2:4,:)))))) 311disp('Overall mean (sum of I, II and III trimmed means/3)_ (sec): ' + string(exp(mean(log(times(2:4,:))))))
312clear('cumulate'); clear('timing'); clear('times'); clear('runs'); clear('i'); 312clear('cumulate'); clear('timing'); clear('times'); clear('runs'); clear('i');
313disp(' --- End of test ---') 313disp(' --- End of test ---')
diff --git a/tests/nonRegression/Qualif/Log/copyftp.log b/tests/nonRegression/Qualif/Log/copyftp.log
index 832ad77..ac02707 100755
--- a/tests/nonRegression/Qualif/Log/copyftp.log
+++ b/tests/nonRegression/Qualif/Log/copyftp.log
@@ -1,92 +1,92 @@
1LibNcFTP 3.1.5 (October 13, 2002) compiled for Windows 1LibNcFTP 3.1.5 (October 13, 2002) compiled for Windows
2220: frioul.inria.fr FTP server (Version 5.60) ready. 2220: frioul.inria.fr FTP server (Version 5.60) ready.
3Connected to frioul.inria.fr. 3Connected to frioul.inria.fr.
4Cmd: USER qualif 4Cmd: USER qualif
5331: Password required for qualif. 5331: Password required for qualif.
6Cmd: PASS xxxxxxxx 6Cmd: PASS xxxxxxxx
7230: User qualif logged in. 7230: User qualif logged in.
8Cmd: PWD 8Cmd: PWD
9257: "/home/qualif" is current directory. 9257: "/home/qualif" is current directory.
10Logged in to frioul.inria.fr as qualif. 10Logged in to frioul.inria.fr as qualif.
11Cmd: FEAT 11Cmd: FEAT
12500: 'FEAT': command not understood. 12500: 'FEAT': command not understood.
13Cmd: HELP SITE 13Cmd: HELP SITE
14214: The following SITE commands are recognized (* =>'s unimplemented). 14214: The following SITE commands are recognized (* =>'s unimplemented).
15 UMASK IDLE CHMOD HELP 15 UMASK IDLE CHMOD HELP
16 Direct comments to ftp-bugs@frioul.inria.fr. 16 Direct comments to ftp-bugs@frioul.inria.fr.
17Cmd: CLNT NcFTPGet 3.1.5 Windows 17Cmd: CLNT NcFTPGet 3.1.5 Windows
18500: 'CLNT NcFTPGet 3.1.5 Windows': command not understood. 18500: 'CLNT NcFTPGet 3.1.5 Windows': command not understood.
19Cmd: PWD 19Cmd: PWD
20257: "/home/qualif" is current directory. 20257: "/home/qualif" is current directory.
21Cmd: CWD tests_suite/autrerep 21Cmd: CWD tests_suite/autrerep
22250: CWD command successful. 22250: CWD command successful.
23Cmd: CWD /home/qualif 23Cmd: CWD /home/qualif
24250: CWD command successful. 24250: CWD command successful.
25Cmd: PWD 25Cmd: PWD
26257: "/home/qualif" is current directory. 26257: "/home/qualif" is current directory.
27Cmd: CWD tests_suite/autrerep 27Cmd: CWD tests_suite/autrerep
28250: CWD command successful. 28250: CWD command successful.
29Cmd: PASV 29Cmd: PASV
30227: Entering Passive Mode (128,93,12,139,170,45) 30227: Entering Passive Mode (128,93,12,139,170,45)
31Cmd: LIST -Ra 31Cmd: LIST -Ra
32150: Opening ASCII mode data connection for /bin/ls. 32150: Opening ASCII mode data connection for /bin/ls.
33226: Transfer complete. 33226: Transfer complete.
34Cmd: CWD /home/qualif 34Cmd: CWD /home/qualif
35250: CWD command successful. 35250: CWD command successful.
36Cmd: MDTM tests_suite/autrerep/autrerep.sce 36Cmd: MDTM tests_suite/autrerep/autrerep.sce
37213: 20030702130623 37213: 20030702130623
38Cmd: TYPE I 38Cmd: TYPE I
39200: Type set to I. 39200: Type set to I.
40Cmd: REST 1 40Cmd: REST 1
41350: Restarting at 1. (null) 41350: Restarting at 1. (null)
42Cmd: REST 0 42Cmd: REST 0
43350: Restarting at 0. (null) 43350: Restarting at 0. (null)
44Cmd: PASV 44Cmd: PASV
45227: Entering Passive Mode (128,93,12,139,170,46) 45227: Entering Passive Mode (128,93,12,139,170,46)
46Cmd: RETR tests_suite/autrerep/autrerep.sce 46Cmd: RETR tests_suite/autrerep/autrerep.sce
47150: Opening BINARY mode data connection for tests_suite/autrerep/autrerep.sce (438 bytes). 47150: Opening BINARY mode data connection for tests_suite/autrerep/autrerep.sce (438 bytes).
48226: Transfer complete. 48226: Transfer complete.
49Cmd: MDTM tests_suite/autrerep/bug1.sci 49Cmd: MDTM tests_suite/autrerep/bug1.sci
50213: 20030702130623 50213: 20030702130623
51Cmd: PASV 51Cmd: PASV
52227: Entering Passive Mode (128,93,12,139,170,47) 52227: Entering Passive Mode (128,93,12,139,170,47)
53Cmd: RETR tests_suite/autrerep/bug1.sci 53Cmd: RETR tests_suite/autrerep/bug1.sci
54150: Opening BINARY mode data connection for tests_suite/autrerep/bug1.sci (426 bytes). 54150: Opening BINARY mode data connection for tests_suite/autrerep/bug1.sci (426 bytes).
55226: Transfer complete. 55226: Transfer complete.
56Cmd: MDTM tests_suite/autrerep/bug21.sci 56Cmd: MDTM tests_suite/autrerep/bug21.sci
57213: 20030702130623 57213: 20030702130623
58Cmd: PASV 58Cmd: PASV
59227: Entering Passive Mode (128,93,12,139,170,48) 59227: Entering Passive Mode (128,93,12,139,170,48)
60Cmd: RETR tests_suite/autrerep/bug21.sci 60Cmd: RETR tests_suite/autrerep/bug21.sci
61150: Opening BINARY mode data connection for tests_suite/autrerep/bug21.sci (562 bytes). 61150: Opening BINARY mode data connection for tests_suite/autrerep/bug21.sci (562 bytes).
62226: Transfer complete. 62226: Transfer complete.
63Cmd: MDTM tests_suite/autrerep/bug22.sci 63Cmd: MDTM tests_suite/autrerep/bug22.sci
64213: 20030702130623 64213: 20030702130623
65Cmd: PASV 65Cmd: PASV
66227: Entering Passive Mode (128,93,12,139,170,49) 66227: Entering Passive Mode (128,93,12,139,170,49)
67Cmd: RETR tests_suite/autrerep/bug22.sci 67Cmd: RETR tests_suite/autrerep/bug22.sci
68150: Opening BINARY mode data connection for tests_suite/autrerep/bug22.sci (583 bytes). 68150: Opening BINARY mode data connection for tests_suite/autrerep/bug22.sci (583 bytes).
69226: Transfer complete. 69226: Transfer complete.
70Cmd: MDTM tests_suite/autrerep/bug24.sci 70Cmd: MDTM tests_suite/autrerep/bug24.sci
71213: 20030702130624 71213: 20030702130624
72Cmd: PASV 72Cmd: PASV
73227: Entering Passive Mode (128,93,12,139,170,50) 73227: Entering Passive Mode (128,93,12,139,170,50)
74Cmd: RETR tests_suite/autrerep/bug24.sci 74Cmd: RETR tests_suite/autrerep/bug24.sci
75150: Opening BINARY mode data connection for tests_suite/autrerep/bug24.sci (388 bytes). 75150: Opening BINARY mode data connection for tests_suite/autrerep/bug24.sci (388 bytes).
76226: Transfer complete. 76226: Transfer complete.
77Cmd: MDTM tests_suite/autrerep/bug25.sci 77Cmd: MDTM tests_suite/autrerep/bug25.sci
78213: 20030702130624 78213: 20030702130624
79Cmd: PASV 79Cmd: PASV
80227: Entering Passive Mode (128,93,12,139,170,51) 80227: Entering Passive Mode (128,93,12,139,170,51)
81Cmd: RETR tests_suite/autrerep/bug25.sci 81Cmd: RETR tests_suite/autrerep/bug25.sci
82150: Opening BINARY mode data connection for tests_suite/autrerep/bug25.sci (571 bytes). 82150: Opening BINARY mode data connection for tests_suite/autrerep/bug25.sci (571 bytes).
83226: Transfer complete. 83226: Transfer complete.
84Cmd: MDTM tests_suite/autrerep/bug6.sci 84Cmd: MDTM tests_suite/autrerep/bug6.sci
85213: 20030702130624 85213: 20030702130624
86Cmd: PASV 86Cmd: PASV
87227: Entering Passive Mode (128,93,12,139,170,52) 87227: Entering Passive Mode (128,93,12,139,170,52)
88Cmd: RETR tests_suite/autrerep/bug6.sci 88Cmd: RETR tests_suite/autrerep/bug6.sci
89150: Opening BINARY mode data connection for tests_suite/autrerep/bug6.sci (237 bytes). 89150: Opening BINARY mode data connection for tests_suite/autrerep/bug6.sci (237 bytes).
90226: Transfer complete. 90226: Transfer complete.
91Cmd: QUIT 91Cmd: QUIT
92221: Goodbye. 92221: Goodbye.
diff --git a/tests/nonRegression/Qualif/Proc/aide.bat b/tests/nonRegression/Qualif/Proc/aide.bat
index 37334d4..82126e5 100755
--- a/tests/nonRegression/Qualif/Proc/aide.bat
+++ b/tests/nonRegression/Qualif/Proc/aide.bat
@@ -1,23 +1,23 @@
1@echo off 1@echo off
2 2
3cls 3cls
4echo // 4echo //
5echo // commandes disponibles : COPYFTP - RUNTEST - COPYRUN - CLEARWORK - CLEARLOG 5echo // commandes disponibles : COPYFTP - RUNTEST - COPYRUN - CLEARWORK - CLEARLOG
6echo // 6echo //
7echo // pour une aide faire : AIDE [all] ou lancer une commande sans parametre 7echo // pour une aide faire : AIDE [all] ou lancer une commande sans parametre
8echo // 8echo //
9echo // 9echo //
10 10
11if "%1"=="all" goto suite 11if "%1"=="all" goto suite
12if "%1"=="ALL" goto suite 12if "%1"=="ALL" goto suite
13goto the_end 13goto the_end
14 14
15:suite 15:suite
16cls 16cls
17call copyftp 17call copyftp
18call runtest 18call runtest
19call copyrun 19call copyrun
20call clearwork 20call clearwork
21call clearlog 21call clearlog
22 22
23:the_end \ No newline at end of file 23:the_end \ No newline at end of file
diff --git a/tests/nonRegression/Qualif/Proc/checklog.bat b/tests/nonRegression/Qualif/Proc/checklog.bat
index 0d7ad5f..71f6e20 100755
--- a/tests/nonRegression/Qualif/Proc/checklog.bat
+++ b/tests/nonRegression/Qualif/Proc/checklog.bat
@@ -1,35 +1,35 @@
1@echo off 1@echo off
2 2
3REM --- Echo Analyse des log tests_suites resultats 3REM --- Echo Analyse des log tests_suites resultats
4 4
5find "{ FIN TEST SUITE " %envq_qualif%\log\%envq_ver%\%1.log 5find "{ FIN TEST SUITE " %envq_qualif%\log\%envq_ver%\%1.log
6if %errorlevel% == 0 ( 6if %errorlevel% == 0 (
7 7
8REM ---la chaine FIN TEST est trouvee , la tests suite est achevee , chercher si la chaine FAILED existe 8REM ---la chaine FIN TEST est trouvee , la tests suite est achevee , chercher si la chaine FAILED existe
9call :suite %1 9call :suite %1
10 10
11) else ( 11) else (
12 12
13 if %errorlevel% == 1 ( 13 if %errorlevel% == 1 (
14REM ---chaine FIN TEST pas trouvee , la test suite pas terminee 14REM ---chaine FIN TEST pas trouvee , la test suite pas terminee
15 echo %1 TEST SUITE --------------- NOT COMPLETED >> %envq_qualif%\log\%envq_ver%\%1.log 15 echo %1 TEST SUITE --------------- NOT COMPLETED >> %envq_qualif%\log\%envq_ver%\%1.log
16 ) 16 )
17 17
18) 18)
19 19
20goto fin 20goto fin
21 21
22:suite 22:suite
23 23
24 find /i "FAILED" %envq_qualif%\log\%envq_ver%\%1.log 24 find /i "FAILED" %envq_qualif%\log\%envq_ver%\%1.log
25 if %errorlevel% == 0 ( 25 if %errorlevel% == 0 (
26REM ---la chaine FAILED est trouvee , la test suite est incorrecte 26REM ---la chaine FAILED est trouvee , la test suite est incorrecte
27 echo %1 TEST SUITE --------------- FAILED >> %envq_qualif%\log\%envq_ver%\%1.log 27 echo %1 TEST SUITE --------------- FAILED >> %envq_qualif%\log\%envq_ver%\%1.log
28 28
29 ) else ( 29 ) else (
30REM la chaine FAILED n est pas trouvee , la test suite est correcte 30REM la chaine FAILED n est pas trouvee , la test suite est correcte
31echo %1 TEST SUITE *** PASSED *** >> %envq_qualif%\log\%envq_ver%\%1.log 31echo %1 TEST SUITE *** PASSED *** >> %envq_qualif%\log\%envq_ver%\%1.log
32 ) 32 )
33 33
34 34
35:fin \ No newline at end of file 35:fin \ No newline at end of file
diff --git a/tests/nonRegression/Qualif/Proc/clearlog.bat b/tests/nonRegression/Qualif/Proc/clearlog.bat
index 2d37991..1ccade2 100755
--- a/tests/nonRegression/Qualif/Proc/clearlog.bat
+++ b/tests/nonRegression/Qualif/Proc/clearlog.bat
@@ -1,41 +1,41 @@
1@echo off 1@echo off
2 2
3REM --- supprime tous les fichiers log des batteries de tests sous le répertoire log\version scilab 3REM --- supprime tous les fichiers log des batteries de tests sous le répertoire log\version scilab
4 4
5if "%1"=="--help" goto aide 5if "%1"=="--help" goto aide
6if "%1"=="" goto saisie 6if "%1"=="" goto saisie
7 7
8:encore 8:encore
9if "%1"=="" goto the_end 9if "%1"=="" goto the_end
10erase /s /q %envq_qualif%\log\%envq_ver%\%1.log 10erase /s /q %envq_qualif%\log\%envq_ver%\%1.log
11REM if %errorlevel% leq 1 echo delete %1.log ... 11REM if %errorlevel% leq 1 echo delete %1.log ...
12shift 12shift
13goto encore 13goto encore
14 14
15goto the_end 15goto the_end
16 16
17:saisie 17:saisie
18 18
19goto the_end 19goto the_end
20 20
21:aide 21:aide
22echo - 22echo -
23echo // CLEARLOG 23echo // CLEARLOG
24echo // Supprime un, plusieurs ou tous les fichiers log des batteries de tests du repertoire log\version scilab : 24echo // Supprime un, plusieurs ou tous les fichiers log des batteries de tests du repertoire log\version scilab :
25echo // 25echo //
26echo // - toutes les tests_suites faire : clearlog * 26echo // - toutes les tests_suites faire : clearlog *
27echo // - certaines tests_suites faire : clearlog nonreg* tests_20?? scicos 27echo // - certaines tests_suites faire : clearlog nonreg* tests_20?? scicos
28echo // - une tests-suite particuliere : clearlog nonreg_2-7-1 28echo // - une tests-suite particuliere : clearlog nonreg_2-7-1
29echo // 29echo //
30echo // 30echo //
31 31
32:the_end 32:the_end
33 33
34 34
35 35
36 36
37 37
38 38
39 39
40 40
41 41
diff --git a/tests/nonRegression/Qualif/Proc/clearwork.bat b/tests/nonRegression/Qualif/Proc/clearwork.bat
index 78e4403..bcbf3b0 100755
--- a/tests/nonRegression/Qualif/Proc/clearwork.bat
+++ b/tests/nonRegression/Qualif/Proc/clearwork.bat
@@ -1,42 +1,42 @@
1@echo off 1@echo off
2 2
3REM --- supprime une, plusieurs ou toutesles batteries de tests du reperoire work local 3REM --- supprime une, plusieurs ou toutesles batteries de tests du reperoire work local
4 4
5if "%1"=="--help" goto aide 5if "%1"=="--help" goto aide
6 6
7 7
8REM --- LIST : paramètre constitué de la liste de tests-suites demandées 8REM --- LIST : paramètre constitué de la liste de tests-suites demandées
9set LIST= 9set LIST=
10 10
11:continue 11:continue
12if "%1"=="" goto lancer_une 12if "%1"=="" goto lancer_une
13 13
14for /D %%j in (%envq_qualif%\work\%1) do set LIST=!LIST! %%~nj 14for /D %%j in (%envq_qualif%\work\%1) do set LIST=!LIST! %%~nj
15shift 15shift
16goto continue 16goto continue
17 17
18REM --- lancer chaque tests-suite une par une 18REM --- lancer chaque tests-suite une par une
19:lancer_une 19:lancer_une
20echo liste des tests-suites :%LIST% 20echo liste des tests-suites :%LIST%
21echo ------------------------ 21echo ------------------------
22 22
23for %%i in (%LIST%) do echo delete %%i ... & rmdir /s /q %envq_qualif%\work\%%i 23for %%i in (%LIST%) do echo delete %%i ... & rmdir /s /q %envq_qualif%\work\%%i
24 24
25goto the_end 25goto the_end
26 26
27:aide 27:aide
28echo // 28echo //
29echo // CLEARWORK 29echo // CLEARWORK
30echo // Supprime une, plusieurs ou toutesles batteries de tests sous le repertoire work : 30echo // Supprime une, plusieurs ou toutesles batteries de tests sous le repertoire work :
31echo // 31echo //
32echo // - toutes les tests_suites faire : clearwork * 32echo // - toutes les tests_suites faire : clearwork *
33echo // - certaines tests_suites faire : clearwork nonreg* tests_20?? scicos 33echo // - certaines tests_suites faire : clearwork nonreg* tests_20?? scicos
34echo // - une tests-suite particuliere : clearwork nonreg_2-7-1 34echo // - une tests-suite particuliere : clearwork nonreg_2-7-1
35echo // 35echo //
36echo // 36echo //
37 37
38:the_end 38:the_end
39 39
40 40
41 41
42 42
diff --git a/tests/nonRegression/Qualif/Proc/copyftp.bat b/tests/nonRegression/Qualif/Proc/copyftp.bat
index 6bfe906..1eb9c84 100755
--- a/tests/nonRegression/Qualif/Proc/copyftp.bat
+++ b/tests/nonRegression/Qualif/Proc/copyftp.bat
@@ -1,33 +1,33 @@
1@echo off 1@echo off
2 2
3rem if not "%os%"=="Windows_NT" goto NextStep 3rem if not "%os%"=="Windows_NT" goto NextStep
4REM --- Section spécifique à Windows NT --- 4REM --- Section spécifique à Windows NT ---
5rem color 0F 5rem color 0F
6rem :NextStep 6rem :NextStep
7if "%1"=="--help" goto aide 7if "%1"=="--help" goto aide
8 8
9if exist %envq_qualif%\log\copyftp.log erase %envq_qualif%\log\copyftp.log 9if exist %envq_qualif%\log\copyftp.log erase %envq_qualif%\log\copyftp.log
10 10
11:encore 11:encore
12if "%1"=="" goto the_end 12if "%1"=="" goto the_end
13echo copy de %1 ... 13echo copy de %1 ...
14ncftpget -R -d %envq_qualif%\log\copyftp.log -u qualif -p qualifpwd frioul.inria.fr %envq_qualif%\work tests_suite/%1 14ncftpget -R -d %envq_qualif%\log\copyftp.log -u qualif -p qualifpwd frioul.inria.fr %envq_qualif%\work tests_suite/%1
15shift 15shift
16goto encore 16goto encore
17 17
18rem for /F %%i in ('dir /A:A /O:S /B') do call :action1 %%i 18rem for /F %%i in ('dir /A:A /O:S /B') do call :action1 %%i
19 19
20goto the_end 20goto the_end
21 21
22:aide 22:aide
23echo // 23echo //
24echo // COPYFTP 24echo // COPYFTP
25echo // Copie a partir du serveur via ftp (ncftpget) dans le repertoire Work local de l'environnement de qualification Scilab (les meta-caracteres sont acceptes) : 25echo // Copie a partir du serveur via ftp (ncftpget) dans le repertoire Work local de l'environnement de qualification Scilab (les meta-caracteres sont acceptes) :
26echo // 26echo //
27echo // - toutes les tests_suites faire : copyftp * 27echo // - toutes les tests_suites faire : copyftp *
28echo // - certaines tests_suites faire : copyftp nonreg* tests_20?? scicos 28echo // - certaines tests_suites faire : copyftp nonreg* tests_20?? scicos
29echo // - une tests-suite particuliere : copyftp nonreg_2-7-1 29echo // - une tests-suite particuliere : copyftp nonreg_2-7-1
30echo // 30echo //
31echo // 31echo //
32 32
33:the_end \ No newline at end of file 33:the_end \ No newline at end of file
diff --git a/tests/nonRegression/Qualif/Proc/copyrun.bat b/tests/nonRegression/Qualif/Proc/copyrun.bat
index 5985f59..90ad664 100755
--- a/tests/nonRegression/Qualif/Proc/copyrun.bat
+++ b/tests/nonRegression/Qualif/Proc/copyrun.bat
@@ -1,29 +1,29 @@
1@echo off 1@echo off
2if "%1"=="" goto aide 2if "%1"=="" goto aide
3 3
4set MYLIST= 4set MYLIST=
5 5
6:continue 6:continue
7if "%1"=="" goto suite 7if "%1"=="" goto suite
8set MYLIST=%MYLIST% %1 8set MYLIST=%MYLIST% %1
9shift 9shift
10goto continue 10goto continue
11 11
12:suite 12:suite
13call copyftp %MYLIST% 13call copyftp %MYLIST%
14call runtest %MYLIST% 14call runtest %MYLIST%
15 15
16goto the_end 16goto the_end
17 17
18:aide 18:aide
19echo // 19echo //
20echo // COPYRUN 20echo // COPYRUN
21echo // Copie puis execute une ou plusieurs batteries de tests dans l'environnement de qualification Scilab (les meta-caracteres sont acceptes) : 21echo // Copie puis execute une ou plusieurs batteries de tests dans l'environnement de qualification Scilab (les meta-caracteres sont acceptes) :
22echo // 22echo //
23echo // copyrun tests_suite [tests_suite] 23echo // copyrun tests_suite [tests_suite]
24echo // copyrun * 24echo // copyrun *
25echo // copyrun n* sc?cos autre 25echo // copyrun n* sc?cos autre
26echo // 26echo //
27echo // 27echo //
28 28
29:the_end \ No newline at end of file 29:the_end \ No newline at end of file
diff --git a/tests/nonRegression/Qualif/Proc/demarrage_qualif.bat b/tests/nonRegression/Qualif/Proc/demarrage_qualif.bat
index 0e3796a..4f8d3e7 100755
--- a/tests/nonRegression/Qualif/Proc/demarrage_qualif.bat
+++ b/tests/nonRegression/Qualif/Proc/demarrage_qualif.bat
@@ -1,23 +1,23 @@
1@echo off 1@echo off
2 2
3REM --- création de la variable d'environnement version de scilab et du repertoire log 3REM --- création de la variable d'environnement version de scilab et du repertoire log
4set envq_ver=scilab-2.7.2 4set envq_ver=scilab-2.7.2
5 5
6set envq_qualif=e:\qualif 6set envq_qualif=e:\qualif
7REM set envq_proc=e:\qualif\proc 7REM set envq_proc=e:\qualif\proc
8REM set envq_work=e:\qualif\work 8REM set envq_work=e:\qualif\work
9REM set envq_log=e:\qualif\log 9REM set envq_log=e:\qualif\log
10 10
11REM --- ajout dans le path du chemin d'installation de la version de scilab a qualifier et du repertoire ou sont installees les procedures necessaires 11REM --- ajout dans le path du chemin d'installation de la version de scilab a qualifier et du repertoire ou sont installees les procedures necessaires
12PATH=%PATH%;%ProgramFiles%\%envq_ver%\bin;%envq_qualif%\proc 12PATH=%PATH%;%ProgramFiles%\%envq_ver%\bin;%envq_qualif%\proc
13 13
14 14
15REM --- création du repertoire version sous le repertoire log 15REM --- création du repertoire version sous le repertoire log
16if not exist %envq_qualif%\log\%envq_ver% mkdir %envq_qualif%\log\%envq_ver% 16if not exist %envq_qualif%\log\%envq_ver% mkdir %envq_qualif%\log\%envq_ver%
17 17
18 18
19 19
20 20
21 21
22 22
23 23
diff --git a/tests/nonRegression/Qualif/Proc/fonct_qualif.sci b/tests/nonRegression/Qualif/Proc/fonct_qualif.sci
index 655db4a..fd74c1a 100755
--- a/tests/nonRegression/Qualif/Proc/fonct_qualif.sci
+++ b/tests/nonRegression/Qualif/Proc/fonct_qualif.sci
@@ -1,573 +1,573 @@
1function tests_suite_up_to_date=find_tests_suite_up_to_date(directory) 1function tests_suite_up_to_date=find_tests_suite_up_to_date(directory)
2//recuperer les batteries de tests en cours sous directory dans une matrice 2//recuperer les batteries de tests en cours sous directory dans une matrice
3// verifier que tests_suite sont des repertoires quand directory=envq_work 3// verifier que tests_suite sont des repertoires quand directory=envq_work
4// et fichier quand log ??? 4// et fichier quand log ???
5//tests_suite="" 5//tests_suite=""
6tests_suite = [] 6tests_suite = []
7select directory 7select directory
8 case envq_work then 8 case envq_work then
9 tests_suite=strsubst(only_directory(listfiles(directory+'*'),''),directory,'') 9 tests_suite=strsubst(only_directory(listfiles(directory+'*'),''),directory,'')
10 //tests_suite=basename(listfiles(directory)); 10 //tests_suite=basename(listfiles(directory));
11 //the_list="" 11 //the_list=""
12 //j=1 12 //j=1
13 //for i=1:size(tests_suite,"*") 13 //for i=1:size(tests_suite,"*")
14 // if isdir (envq_work+tests_suite(i)) then 14 // if isdir (envq_work+tests_suite(i)) then
15// // tests_suite(i) est un répertoire 15// // tests_suite(i) est un répertoire
16 // the_list(j) = tests_suite(i) 16 // the_list(j) = tests_suite(i)
17 // j=j+1 17 // j=j+1
18 // // disp "boubou" 18 // // disp "boubou"
19 //// pause 19 //// pause
20 // end 20 // end
21 //end // du for 21 //end // du for
22 //tests_suite=the_list 22 //tests_suite=the_list
23 case (envq_log+envq_ver+"\") then 23 case (envq_log+envq_ver+"\") then
24 tests_suite=basename(listfiles(directory+"*.log")) 24 tests_suite=basename(listfiles(directory+"*.log"))
25 // attention : si existe un log qui n'est pas un nom de batterie sera dans la liste... *************************** 25 // attention : si existe un log qui n'est pas un nom de batterie sera dans la liste... ***************************
26 // si basename ne trouve rien tests_suite est empty 26 // si basename ne trouve rien tests_suite est empty
27 // ierr=execstr(tests_suite=basename(listfiles(envq_log+envq_ver+"\*.log")),'errcatch') 27 // ierr=execstr(tests_suite=basename(listfiles(envq_log+envq_ver+"\*.log")),'errcatch')
28 28
29 case "" then 29 case "" then
30//************************************************************* 30//*************************************************************
31// chercher la liste de frioul 31// chercher la liste de frioul
32//************************************************************* 32//*************************************************************
33 // lancer la copie via ftp sur frioul du fichier frioul_tests_suite_list.txt 33 // lancer la copie via ftp sur frioul du fichier frioul_tests_suite_list.txt
34 if MSDOS then 34 if MSDOS then
35 if ~isempty(fileinfo(envq_work+"frioul_tests_suite_list.txt")) then 35 if ~isempty(fileinfo(envq_work+"frioul_tests_suite_list.txt")) then
36 unix_g("erase /s /q "+envq_work+"frioul_tests_suite_list.txt") 36 unix_g("erase /s /q "+envq_work+"frioul_tests_suite_list.txt")
37 unix_g("erase /s /q "+envq_log+"copyftp.log") 37 unix_g("erase /s /q "+envq_log+"copyftp.log")
38 end 38 end
39 unix_g(envq_proc+"frioul_tests_suite_list.bat") 39 unix_g(envq_proc+"frioul_tests_suite_list.bat")
40 else 40 else
41 if ~isempty(fileinfo(envq_work+"frioul_tests_suite_list.txt")) then 41 if ~isempty(fileinfo(envq_work+"frioul_tests_suite_list.txt")) then
42 unix_g("rm "+envq_work+"frioul_tests_suite_list.txt") 42 unix_g("rm "+envq_work+"frioul_tests_suite_list.txt")
43 unix_g("rm "+envq_log+"copyftp.log") 43 unix_g("rm "+envq_log+"copyftp.log")
44 end 44 end
45 unix_g(envq_proc+"frioul_tests_suite_list") 45 unix_g(envq_proc+"frioul_tests_suite_list")
46 end // du if 46 end // du if
47 tests_suite=read(envq_work+"frioul_tests_suite_list.txt",-1,1,'(a)') 47 tests_suite=read(envq_work+"frioul_tests_suite_list.txt",-1,1,'(a)')
48 else 48 else
49 disp ("PROBLEME") 49 disp ("PROBLEME")
50 abort 50 abort
51 end // du case 51 end // du case
52//disp("tests_suite de find tests suute up to date") 52//disp("tests_suite de find tests suute up to date")
53//pause 53//pause
54tests_suite_up_to_date=sort(tests_suite) 54tests_suite_up_to_date=sort(tests_suite)
55//disp ("tests_suite_up_to_date via find_tests_suite_up_to_date : " + tests_suite_up_to_date) 55//disp ("tests_suite_up_to_date via find_tests_suite_up_to_date : " + tests_suite_up_to_date)
56//pause 56//pause
57endfunction 57endfunction
58 58
59 59
60//====================================================================================================================== 60//======================================================================================================================
61 61
62 62
63function affich_message (graph_affich, texte) 63function affich_message (graph_affich, texte)
64if graph_affich then 64if graph_affich then
65//afficher message windows pour indiquer pas de batterie dans la liste de selection 65//afficher message windows pour indiquer pas de batterie dans la liste de selection
66x_message(texte) 66x_message(texte)
67else 67else
68//afficher message prompt pour indiquer pas de batterie dans la liste de selection 68//afficher message prompt pour indiquer pas de batterie dans la liste de selection
69disp(texte) 69disp(texte)
70end // du if 70end // du if
71endfunction 71endfunction
72 72
73 73
74//====================================================================================================================== 74//======================================================================================================================
75 75
76 76
77function tests_suite_selected=graph_select_tests_suite(command, tests_suite) 77function tests_suite_selected=graph_select_tests_suite(command, tests_suite)
78//parcourir la matrice ainsi créée et charger la liste pour le menu de selection des batteries 78//parcourir la matrice ainsi créée et charger la liste pour le menu de selection des batteries
79 the_list=list() 79 the_list=list()
80 for i=1:size(tests_suite,"*") 80 for i=1:size(tests_suite,"*")
81 the_list($+1)=list(tests_suite(i),1,['Non','Oui']) 81 the_list($+1)=list(tests_suite(i),1,['Non','Oui'])
82 end // du for 82 end // du for
83 rep=x_choices("Tests Suite Selection Menu for "+convstr(command,'u')+" command.",the_list); 83 rep=x_choices("Tests Suite Selection Menu for "+convstr(command,'u')+" command.",the_list);
84 84
85 //prendre dans rep les reponses à oui (valeur 2);retrouver la batterie de tests correspondante ; et lancer son execution 85 //prendre dans rep les reponses à oui (valeur 2);retrouver la batterie de tests correspondante ; et lancer son execution
86 tests_suite_selected="" 86 tests_suite_selected=""
87 for i=1:size(tests_suite,"*") 87 for i=1:size(tests_suite,"*")
88 if rep(i)==2 then 88 if rep(i)==2 then
89 // disp ("je sui sla") 89 // disp ("je sui sla")
90 // pause 90 // pause
91 tests_suite_selected = tests_suite_selected + " " + tests_suite(i) 91 tests_suite_selected = tests_suite_selected + " " + tests_suite(i)
92 // disp ("je sui encore la") 92 // disp ("je sui encore la")
93 // pause 93 // pause
94 end // du if 94 end // du if
95 end // du for 95 end // du for
96// disp ( "tests_suite_selected via graph_select : " + tests_suite_selected) 96// disp ( "tests_suite_selected via graph_select : " + tests_suite_selected)
97// pause 97// pause
98endfunction 98endfunction
99 99
100 100
101//====================================================================================================================== 101//======================================================================================================================
102 102
103 103
104function tests_suite_selected=input_select_tests_suite(tests_suite) 104function tests_suite_selected=input_select_tests_suite(tests_suite)
105 disp (" "); 105 disp (" ");
106 disp(tests_suite); 106 disp(tests_suite);
107 disp (" "); 107 disp (" ");
108 //tests_suite_selected=input("Type tests_suite : ","string") -- input ne prend que le premier string avant le blanc 108 //tests_suite_selected=input("Type tests_suite : ","string") -- input ne prend que le premier string avant le blanc
109 disp("Type tests_suite : ") 109 disp("Type tests_suite : ")
110 the_list=list() 110 the_list=list()
111 the_list=read(%io(1),1,1,'(a)') 111 the_list=read(%io(1),1,1,'(a)')
112 tests_suite_selected=tokens(the_list," ") 112 tests_suite_selected=tokens(the_list," ")
113// disp ( "tests_suite_selected via input_select : " + tests_suite_selected) 113// disp ( "tests_suite_selected via input_select : " + tests_suite_selected)
114// pause 114// pause
115endfunction 115endfunction
116 116
117 117
118//====================================================================================================================== 118//======================================================================================================================
119 119
120 120
121function graph_cmd(command,directory) 121function graph_cmd(command,directory)
122available_tests_suite=find_tests_suite_up_to_date(directory) 122available_tests_suite=find_tests_suite_up_to_date(directory)
123//disp (" toto") 123//disp (" toto")
124//pause 124//pause
125if isempty(available_tests_suite) then 125if isempty(available_tests_suite) then
126 affich_message (%t, "***** No tests_suite available *****") 126 affich_message (%t, "***** No tests_suite available *****")
127else 127else
128 tests_suite_selected=graph_select_tests_suite(command,available_tests_suite) 128 tests_suite_selected=graph_select_tests_suite(command,available_tests_suite)
129 // disp (" choosen") 129 // disp (" choosen")
130//pause 130//pause
131 if ~isempty(tests_suite_selected) then 131 if ~isempty(tests_suite_selected) then
132// disp ("tests_suite_selected via graph_cmd : " + tests_suite_selected) 132// disp ("tests_suite_selected via graph_cmd : " + tests_suite_selected)
133// pause 133// pause
134 if directory=='' then directory=envq_work; end //positionner le repertoire à work après recupr de frioul 134 if directory=='' then directory=envq_work; end //positionner le repertoire à work après recupr de frioul
135 exec_cmd(command, directory, tests_suite_selected) 135 exec_cmd(command, directory, tests_suite_selected)
136 //else 136 //else
137 // return 137 // return
138 end // du if 138 end // du if
139end // du if 139end // du if
140endfunction 140endfunction
141 141
142 142
143//====================================================================================================================== 143//======================================================================================================================
144 144
145 145
146function prompt_cmd(command,param_command,directory) 146function prompt_cmd(command,param_command,directory)
147 if isempty(param_command) 147 if isempty(param_command)
148 // pas de parametres, saisie au prompt scilab 148 // pas de parametres, saisie au prompt scilab
149 available_tests_suite=find_tests_suite_up_to_date(directory) 149 available_tests_suite=find_tests_suite_up_to_date(directory)
150 if isempty(available_tests_suite) then 150 if isempty(available_tests_suite) then
151 affich_message (%f, "***** No tests_suite available *****") 151 affich_message (%f, "***** No tests_suite available *****")
152 // sortir de la fonction 152 // sortir de la fonction
153 return 153 return
154 else 154 else
155 // disp (" titi") 155 // disp (" titi")
156 // pause //affich_message (graph_interf, available_tests_suite) 156 // pause //affich_message (graph_interf, available_tests_suite)
157 tests_suite_selected=input_select_tests_suite(available_tests_suite) 157 tests_suite_selected=input_select_tests_suite(available_tests_suite)
158 // disp ("bababababa") 158 // disp ("bababababa")
159 // pause 159 // pause
160 // pour l'instant ne rien faire si erreur dans saisie laisser faire l OS 160 // pour l'instant ne rien faire si erreur dans saisie laisser faire l OS
161 end // du if 161 end // du if
162 else 162 else
163 // il existe des arguments pour l'instant ne rien faire si erreur dans saisie laisser faire l OS 163 // il existe des arguments pour l'instant ne rien faire si erreur dans saisie laisser faire l OS
164 tests_suite_selected = param_command 164 tests_suite_selected = param_command
165 //no_wildcard (tests_suite, directory) 165 //no_wildcard (tests_suite, directory)
166 end // du if 166 end // du if
167 //disp ("tests_suite_selected via promp_cmd : " + tests_suite_selected) 167 //disp ("tests_suite_selected via promp_cmd : " + tests_suite_selected)
168 //pause 168 //pause
169 if ~isempty(tests_suite_selected) then 169 if ~isempty(tests_suite_selected) then
170 exec_cmd(command, directory, tests_suite_selected); 170 exec_cmd(command, directory, tests_suite_selected);
171 // µµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµ 171 // µµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµ
172 //else 172 //else
173 // return 173 // return
174end // du if 174end // du if
175endfunction 175endfunction
176 176
177 177
178 178
179//====================================================================================================================== 179//======================================================================================================================
180 180
181 181
182function tests_suite_without_wildcard = no_wildcard (tests_suite, directory) 182function tests_suite_without_wildcard = no_wildcard (tests_suite, directory)
183if ~isempty(grep(tests_suite,'*')) then 183if ~isempty(grep(tests_suite,'*')) then
184 indice=grep(tests_suite,'*') 184 indice=grep(tests_suite,'*')
185 the_list=[] 185 the_list=[]
186 for i=indice 186 for i=indice
187 if ~isempty(basename(listfiles(directory+tests_suite(i)))) then 187 if ~isempty(basename(listfiles(directory+tests_suite(i)))) then
188 //////////////////////////////////////////////////////////////////////////// 188 ////////////////////////////////////////////////////////////////////////////
189 the_list=[the_list;basename(listfiles(directory+tests_suite(i)))] 189 the_list=[the_list;basename(listfiles(directory+tests_suite(i)))]
190 end //if 190 end //if
191 end // du for 191 end // du for
192 for i=sort(indice) 192 for i=sort(indice)
193 tests_suite(i)=[] 193 tests_suite(i)=[]
194 end // du for 194 end // du for
195 tests_suite = [tests_suite ; the_list] 195 tests_suite = [tests_suite ; the_list]
196end // du if 196end // du if
197tests_suite_without_wildcard=sort(tests_suite) 197tests_suite_without_wildcard=sort(tests_suite)
198//disp ( "tests_suite_without_wildcard via no_wildcard : " + tests_suite_without_wildcard) 198//disp ( "tests_suite_without_wildcard via no_wildcard : " + tests_suite_without_wildcard)
199//pause 199//pause
200endfunction 200endfunction
201 201
202 202
203//====================================================================================================================== 203//======================================================================================================================
204 204
205 205
206function tests_suite_is_directory = only_directory (tests_suite, directory) 206function tests_suite_is_directory = only_directory (tests_suite, directory)
207//attention : la tests_suite en parametre doit être construite avec listfiles et sans basename pb scilab-2.7.2 207//attention : la tests_suite en parametre doit être construite avec listfiles et sans basename pb scilab-2.7.2
208the_list=[] 208the_list=[]
209for i=1:size(tests_suite,"*") 209for i=1:size(tests_suite,"*")
210//disp("i = " + directory+tests_suite(i)) 210//disp("i = " + directory+tests_suite(i))
211 if isdir(directory+tests_suite(i)) then 211 if isdir(directory+tests_suite(i)) then
212 // tests_suite(i) est un répertoire 212 // tests_suite(i) est un répertoire
213 the_list =[the_list;tests_suite(i)] 213 the_list =[the_list;tests_suite(i)]
214 end 214 end
215end // du for 215end // du for
216tests_suite_is_directory=the_list 216tests_suite_is_directory=the_list
217//disp ( "tests_suite_is_directory via only_directory : " + tests_suite_is_directory) 217//disp ( "tests_suite_is_directory via only_directory : " + tests_suite_is_directory)
218//pause 218//pause
219endfunction 219endfunction
220 220
221 221
222//====================================================================================================================== 222//======================================================================================================================
223 223
224 224
225function exec_cmd(command, directory, tests_suite_selected) 225function exec_cmd(command, directory, tests_suite_selected)
226 226
227//******************************** 227//********************************
228// liste des fichier du repertoire directory, on ne garde que les repertoires, puis on ne garde que le nom de fichier et on en fait une liste 228// liste des fichier du repertoire directory, on ne garde que les repertoires, puis on ne garde que le nom de fichier et on en fait une liste
229// pour clearwork et runtest strcat(strsubst(only_directory(listfiles(envq_work+'*')),envq_work,''),' ') 229// pour clearwork et runtest strcat(strsubst(only_directory(listfiles(envq_work+'*')),envq_work,''),' ')
230// pour clearlog strcat(strsubst(listfiles(envq_log+envq_ver+"\"+'*.log'),envq_log+envq_ver+"\",''),' ') 230// pour clearlog strcat(strsubst(listfiles(envq_log+envq_ver+"\"+'*.log'),envq_log+envq_ver+"\",''),' ')
231// pour copyftp 231// pour copyftp
232//********************************** 232//**********************************
233 233
234rep=strcat(tests_suite_selected," ") 234rep=strcat(tests_suite_selected," ")
235//disp ("rep via EXEC_CMD : " + rep) 235//disp ("rep via EXEC_CMD : " + rep)
236//pause 236//pause
237//for i=1:size(tests_suite_selected,"*") 237//for i=1:size(tests_suite_selected,"*")
238//for i=1:size(rep,"*") 238//for i=1:size(rep,"*")
239// case "copyftp" then 239// case "copyftp" then
240// tests_suite=basename(listfiles(directory)); 240// tests_suite=basename(listfiles(directory));
241// the_list="" 241// the_list=""
242// j=1 242// j=1
243//**************************** 243//****************************
244// dos_command=tlist(['commande dos';'copyftp';'clearlog'],"copy toto","supprime toto") 244// dos_command=tlist(['commande dos';'copyftp';'clearlog'],"copy toto","supprime toto")
245//dos_command=tlist(['dos command';'copyftp';'runtest';'copyrun';'clearlog';'clearwork'],"copyftp dos","runtest dos","copyrun dos","erase /s /q ","rmdir /s /q ") 245//dos_command=tlist(['dos command';'copyftp';'runtest';'copyrun';'clearlog';'clearwork'],"copyftp dos","runtest dos","copyrun dos","erase /s /q ","rmdir /s /q ")
246//not_dos_command=tlist(['not dos command';'copyftp';'runtest';'copyrun';'clearlog';'clearwork'],"copyftp unix","runtest unix","copyrun unix","clearlog unix","clearwork unix") 246//not_dos_command=tlist(['not dos command';'copyftp';'runtest';'copyrun';'clearlog';'clearwork'],"copyftp unix","runtest unix","copyrun unix","clearlog unix","clearwork unix")
247//system_cmd=tlist(['operating system';'%t';'%f'],dos_command,not_dos_command) 247//system_cmd=tlist(['operating system';'%t';'%f'],dos_command,not_dos_command)
248//os_cmd(sci2exp(MSDOS))(command)+directory+choosen_tests_suite 248//os_cmd(sci2exp(MSDOS))(command)+directory+choosen_tests_suite
249 249
250//strsubst(only_directory(listfiles(envq_work+'*')),envq_work,'') 250//strsubst(only_directory(listfiles(envq_work+'*')),envq_work,'')
251//unix_g(os_cmd(sci2exp(MSDOS))("clearwork")+envq_work+toto(2)) 251//unix_g(os_cmd(sci2exp(MSDOS))("clearwork")+envq_work+toto(2))
252 252
253// supprimer run_qualif_cmd.bat si il existe 253// supprimer run_qualif_cmd.bat si il existe
254//if ~isempty(fileinfo(envq_work+"run_qualif_cmd.bat")) then 254//if ~isempty(fileinfo(envq_work+"run_qualif_cmd.bat")) then
255 unix_g("erase /s /q "+envq_proc+"run_qualif_cmd.bat") 255 unix_g("erase /s /q "+envq_proc+"run_qualif_cmd.bat")
256//end 256//end
257//ecrire dans le fichier run_qualif_cmd.bat la commande ainsi creee via scilab 257//ecrire dans le fichier run_qualif_cmd.bat la commande ainsi creee via scilab
258temp=read(envq_proc+"template_run_qualif_cmd.bat",-1,1,'(a)') 258temp=read(envq_proc+"template_run_qualif_cmd.bat",-1,1,'(a)')
259temp(3)="call " + os_cmd(sci2exp(MSDOS))(command)+rep 259temp(3)="call " + os_cmd(sci2exp(MSDOS))(command)+rep
260write(envq_proc+"run_qualif_cmd.bat",temp) 260write(envq_proc+"run_qualif_cmd.bat",temp)
261// lancer le fichier bat dans une session dos qualif 261// lancer le fichier bat dans une session dos qualif
262unix_g("start %SystemRoot%\system32\cmd.exe /e:on /v:on /K %envq_qualif%\proc\run_qualif_cmd.bat") 262unix_g("start %SystemRoot%\system32\cmd.exe /e:on /v:on /K %envq_qualif%\proc\run_qualif_cmd.bat")
263 263
264 264
265//if x_message(['Continue ...'],['No','Yes'])== 2 then exec_cmd("clearwork", envq_work,find_tests_suite_up_to_date(envq_work)); end 265//if x_message(['Continue ...'],['No','Yes'])== 2 then exec_cmd("clearwork", envq_work,find_tests_suite_up_to_date(envq_work)); end
266 266
267//unix_g(os_cmd(sci2exp(MSDOS))(command)+directory+strcat(strsubst(only_directory(listfiles(envq_work+'*'),''),envq_work,'')),' ') 267//unix_g(os_cmd(sci2exp(MSDOS))(command)+directory+strcat(strsubst(only_directory(listfiles(envq_work+'*'),''),envq_work,'')),' ')
268 268
269//unix_g(os_cmd(sci2exp(MSDOS))("clearwork")+envq_work+strcat(strsubst(only_directory(listfiles(envq_work+'*'),''),envq_work,''),' ')) 269//unix_g(os_cmd(sci2exp(MSDOS))("clearwork")+envq_work+strcat(strsubst(only_directory(listfiles(envq_work+'*'),''),envq_work,''),' '))
270//************* 270//*************
271 271
272//end // du for 272//end // du for
273endfunction 273endfunction
274 274
275 275
276//====================================================================================================================== 276//======================================================================================================================
277 277
278 278
279function affich_date 279function affich_date
280w=getdate() 280w=getdate()
281disp(date() + " "+string(w(7))+" h. "+string(w(8))+" mn. "+string(w(9))+" s. ") 281disp(date() + " "+string(w(7))+" h. "+string(w(8))+" mn. "+string(w(9))+" s. ")
282endfunction 282endfunction
283 283
284 284
285//====================================================================================================================== 285//======================================================================================================================
286 286
287 287
288function affich_result(correct, num) 288function affich_result(correct, num)
289// affiche FAILED ou PASSED, fonction utiliser dans les tests-suites de non regression 289// affiche FAILED ou PASSED, fonction utiliser dans les tests-suites de non regression
290 // This part display result 290 // This part display result
291 if ~correct then 291 if ~correct then
292 disp("***************************************** Test bug" + string(num) +" : FAILED ! "); 292 disp("***************************************** Test bug" + string(num) +" : FAILED ! ");
293 else 293 else
294 disp("Test bug" + string(num) +" : PASSED"); 294 disp("Test bug" + string(num) +" : PASSED");
295 end 295 end
296endfunction 296endfunction
297 297
298function my_mat = list2mat (my_list) 298function my_mat = list2mat (my_list)
299my_mat = [''] 299my_mat = ['']
300//for k=1:size(my_list,"*") 300//for k=1:size(my_list,"*")
301for k=1:size(my_list) 301for k=1:size(my_list)
302 my_mat (k) = my_list(k) 302 my_mat (k) = my_list(k)
303end 303end
304endfunction 304endfunction
305 305
306 306
307//====================================================================================================================== 307//======================================================================================================================
308 308
309 309
310function mat_rep = sel_rep(my_mat) 310function mat_rep = sel_rep(my_mat)
311 mat_rep = [''] 311 mat_rep = ['']
312// cas d'une liste 312// cas d'une liste
313mat_rep = '' 313mat_rep = ''
314 n=1 314 n=1
315 for k=1:size(my_mat,"*") 315 for k=1:size(my_mat,"*")
316// for k=1:size(my_mat) 316// for k=1:size(my_mat)
317 if isdir(my_mat(k)) then 317 if isdir(my_mat(k)) then
318 mat_rep (n) = my_mat(k) 318 mat_rep (n) = my_mat(k)
319 n = n+1 319 n = n+1
320 end 320 end
321 end 321 end
322endfunction 322endfunction
323 323
324 324
325//====================================================================================================================== 325//======================================================================================================================
326 326
327 327
328function copyftp(param) 328function copyftp(param)
329if argn(2)==0 then 329if argn(2)==0 then
330 param = [] 330 param = []
331end // du if 331end // du if
332prompt_cmd("copyftp",param,envq_log) 332prompt_cmd("copyftp",param,envq_log)
333endfunction 333endfunction
334 334
335 335
336//====================================================================================================================== 336//======================================================================================================================
337 337
338 338
339function test (str) 339function test (str)
340a=[] 340a=[]
341interv=strindex(str," ") 341interv=strindex(str," ")
342debut=1 342debut=1
343for i=1:length(interv) 343for i=1:length(interv)
344 a=[a;part(str,[debut:(interv(i))-1])] 344 a=[a;part(str,[debut:(interv(i))-1])]
345 debut=interv(i)+1 345 debut=interv(i)+1
346end 346end
347a=[a;part(str,[debut:length(str)])] 347a=[a;part(str,[debut:length(str)])]
348disp (a) 348disp (a)
349endfunction 349endfunction
350 350
351 351
352//====================================================================================================================== 352//======================================================================================================================
353 353
354 354
355function clearwork (param) 355function clearwork (param)
356if argn(2)==0 then 356if argn(2)==0 then
357 param = [] 357 param = []
358end // du if 358end // du if
359prompt_cmd("clearwork",param,envq_work) 359prompt_cmd("clearwork",param,envq_work)
360endfunction 360endfunction
361 361
362 362
363//====================================================================================================================== 363//======================================================================================================================
364 364
365 365
366function clearlog (param) 366function clearlog (param)
367if argn(2)==0 then 367if argn(2)==0 then
368 param = [] 368 param = []
369end // du if 369end // du if
370prompt_cmd("clearlog",param,envq_log+envq_ver+"\") 370prompt_cmd("clearlog",param,envq_log+envq_ver+"\")
371endfunction 371endfunction
372 372
373 373
374//====================================================================================================================== 374//======================================================================================================================
375 375
376 376
377function runtest(param) 377function runtest(param)
378if argn(2)==0 then 378if argn(2)==0 then
379 param = [] 379 param = []
380end // du if 380end // du if
381prompt_cmd("runtest",param,envq_work) 381prompt_cmd("runtest",param,envq_work)
382endfunction 382endfunction
383 383
384 384
385//====================================================================================================================== 385//======================================================================================================================
386 386
387 387
388function showlog (my_cmd) 388function showlog (my_cmd)
389 if argn(2)==0 then 389 if argn(2)==0 then
390 //disp " " 390 //disp " "
391 write(%io(2),"SHOWLOG : ") 391 write(%io(2),"SHOWLOG : ")
392 write(%io(2),"Pour visualiser la derniere ligne de un, plusieurs ou tous fichiers log : ") 392 write(%io(2),"Pour visualiser la derniere ligne de un, plusieurs ou tous fichiers log : ")
393 write(%io(2),"- toutes les tests_suites faire : showlog *") 393 write(%io(2),"- toutes les tests_suites faire : showlog *")
394 write(%io(2),"- certaines tests_suites faire : showlog ""nonreg* tests_20?? scicos""") 394 write(%io(2),"- certaines tests_suites faire : showlog ""nonreg* tests_20?? scicos""")
395 write(%io(2),"- une tests_suite faire : showlog ""scicos""") 395 write(%io(2),"- une tests_suite faire : showlog ""scicos""")
396 disp " " 396 disp " "
397 else 397 else
398 if MSDOS then 398 if MSDOS then
399 unix_w (envq_proc+"init_qualif.bat&showlog.bat "+my_cmd) 399 unix_w (envq_proc+"init_qualif.bat&showlog.bat "+my_cmd)
400 else 400 else
401 unix_w ("showlog" +my_cmd) 401 unix_w ("showlog" +my_cmd)
402 end 402 end
403 end 403 end
404endfunction 404endfunction
405 405
406 406
407//====================================================================================================================== 407//======================================================================================================================
408 408
409 409
410function dirlog (my_cmd) 410function dirlog (my_cmd)
411if argn(2)==0 then 411if argn(2)==0 then
412 param = [] 412 param = []
413end // du if 413end // du if
414prompt_cmd("clearlog",param,envq_log+envq_ver) 414prompt_cmd("clearlog",param,envq_log+envq_ver)
415endfunction 415endfunction
416 416
417 417
418//====================================================================================================================== 418//======================================================================================================================
419 419
420 420
421function dirwork (my_cmd) 421function dirwork (my_cmd)
422 if argn(2)==0 then 422 if argn(2)==0 then
423 //disp " " 423 //disp " "
424 write(%io(2),"DIRWORK : ") 424 write(%io(2),"DIRWORK : ")
425 write(%io(2),"Pour visualiser la derniere ligne de un, plusieurs ou tous fichiers log : ") 425 write(%io(2),"Pour visualiser la derniere ligne de un, plusieurs ou tous fichiers log : ")
426 write(%io(2),"- toutes les tests_suites faire : showlog *") 426 write(%io(2),"- toutes les tests_suites faire : showlog *")
427 write(%io(2),"- certaines tests_suites faire : showlog ""nonreg* tests_20?? scicos""") 427 write(%io(2),"- certaines tests_suites faire : showlog ""nonreg* tests_20?? scicos""")
428 write(%io(2),"- une tests_suite faire : showlog ""scicos""") 428 write(%io(2),"- une tests_suite faire : showlog ""scicos""")
429 disp " " 429 disp " "
430 else 430 else
431 disp(sort(basename(listfiles(envq_work+my_cmd)))) 431 disp(sort(basename(listfiles(envq_work+my_cmd))))
432 432
433 //if MSDOS then 433 //if MSDOS then
434 // unix_w (envq_proc+"init_qualif.bat&showlog.bat "+my_cmd) 434 // unix_w (envq_proc+"init_qualif.bat&showlog.bat "+my_cmd)
435 // else 435 // else
436 // unix_w ("showlog" +my_cmd) 436 // unix_w ("showlog" +my_cmd)
437 // end 437 // end
438 end 438 end
439endfunction 439endfunction
440 440
441 441
442//====================================================================================================================== 442//======================================================================================================================
443 443
444 444
445function copyrun(param) 445function copyrun(param)
446if argn(2)==0 then 446if argn(2)==0 then
447 copyftp() 447 copyftp()
448 runtest() 448 runtest()
449else 449else
450 copyftp (param) 450 copyftp (param)
451 runtest (""""+param+"""") 451 runtest (""""+param+"""")
452end 452end
453endfunction 453endfunction
454 454
455 455
456//====================================================================================================================== 456//======================================================================================================================
457 457
458 458
459function runtestXXXXXXXXXXX(tout) 459function runtestXXXXXXXXXXX(tout)
460 460
461if argn(2)==0 then 461if argn(2)==0 then
462 //disp " " 462 //disp " "
463 write(%io(2),"RUNTEST : ") 463 write(%io(2),"RUNTEST : ")
464 write(%io(2),"Pour executer en local : ") 464 write(%io(2),"Pour executer en local : ")
465 write(%io(2),"- toutes les tests_suites faire : runtest (""*"")") 465 write(%io(2),"- toutes les tests_suites faire : runtest (""*"")")
466 write(%io(2),"- certaines tests_suites faire : runtest (""nonreg* tests_20?? scicos"")") 466 write(%io(2),"- certaines tests_suites faire : runtest (""nonreg* tests_20?? scicos"")")
467 write(%io(2),"- une tests_suite faire : runtest (""scicos"")") 467 write(%io(2),"- une tests_suite faire : runtest (""scicos"")")
468 disp " " 468 disp " "
469else 469else
470 470
471//disp (length(varargin)) 471//disp (length(varargin))
472 472
473//for i=1:length(varargin) 473//for i=1:length(varargin)
474//disp (varargin(i)) 474//disp (varargin(i))
475//end // du for 475//end // du for
476 476
477my_list=tokens(tout," ") 477my_list=tokens(tout," ")
478 478
479//pause 479//pause
480 480
481// exemple : displist(["autre?ep";"n*"]) 481// exemple : displist(["autre?ep";"n*"])
482ierr=0 482ierr=0
483//my_list = ["autrerep","hif","n*"] 483//my_list = ["autrerep","hif","n*"]
484//my_list = listfiles(envq_work+my_list 484//my_list = listfiles(envq_work+my_list
485the_list=[] 485the_list=[]
486//for i=1:size(my_list) 486//for i=1:size(my_list)
487for i=1:size(my_list,"*") 487for i=1:size(my_list,"*")
488 if isdir (envq_work+my_list(i)) then 488 if isdir (envq_work+my_list(i)) then
489// my_list(i) est un répertoire 489// my_list(i) est un répertoire
490 the_list = [the_list;my_list(i)] 490 the_list = [the_list;my_list(i)]
491 else 491 else
492 the_list = [the_list;basename(listfiles(envq_work+my_list(i)))] 492 the_list = [the_list;basename(listfiles(envq_work+my_list(i)))]
493 end 493 end
494end // du for 494end // du for
495 495
496//disp("ici") 496//disp("ici")
497//pause 497//pause
498 498
499 499
500the_list2=[] 500the_list2=[]
501for i=1:size(the_list,"*") 501for i=1:size(the_list,"*")
502 if isdir (envq_work+the_list(i)) then 502 if isdir (envq_work+the_list(i)) then
503 the_list2 = [the_list2;the_list(i)] 503 the_list2 = [the_list2;the_list(i)]
504 end 504 end
505end // du for 505end // du for
506 506
507//disp("là") 507//disp("là")
508//pause 508//pause
509 509
510for k=1:size(the_list2,"*") 510for k=1:size(the_list2,"*")
511 bibi = the_list2(k) 511 bibi = the_list2(k)
512 chdir (envq_work + basename(the_list2(k))) 512 chdir (envq_work + basename(the_list2(k)))
513 unix_w ("erase "+envq_log+envq_ver+"\test_en_cours.txt") 513 unix_w ("erase "+envq_log+envq_ver+"\test_en_cours.txt")
514 diary (envq_log+envq_ver+"\test_en_cours.txt") 514 diary (envq_log+envq_ver+"\test_en_cours.txt")
515 ierr=0 515 ierr=0
516// diary (envq_log+envq_ver+"\"+the_list2(k)+".txt") 516// diary (envq_log+envq_ver+"\"+the_list2(k)+".txt")
517 ierr = exec (the_list2(k) + ".sce", 'errcatch') 517 ierr = exec (the_list2(k) + ".sce", 'errcatch')
518 if ierr<>0 then 518 if ierr<>0 then
519 disp("") 519 disp("")
520 disp " LA TESTS-SUITE " + the_list2(k) + " S ''EST INCORRECTEMENT TERMINEE.----------------------------" 520 disp " LA TESTS-SUITE " + the_list2(k) + " S ''EST INCORRECTEMENT TERMINEE.----------------------------"
521 disp("Error n° "+string(ierr)); 521 disp("Error n° "+string(ierr));
522 disp(lasterror()); 522 disp(lasterror());
523 disp("") 523 disp("")
524 end 524 end
525 diary(0) 525 diary(0)
526 if MSDOS then 526 if MSDOS then
527//disp ("msdos") 527//disp ("msdos")
528//pause 528//pause
529// disp ("bibi = " + bibi) 529// disp ("bibi = " + bibi)
530//pause 530//pause
531//unix_w ("type "+envq_log+envq_ver+"\test_en_cours.txt >> "+envq_log+envq_ver+"\"+the_list2(k)+".txt") 531//unix_w ("type "+envq_log+envq_ver+"\test_en_cours.txt >> "+envq_log+envq_ver+"\"+the_list2(k)+".txt")
532unix_w ("type "+envq_log+envq_ver+"\test_en_cours.txt >> "+envq_log+envq_ver+"\"+bibi+".txt") 532unix_w ("type "+envq_log+envq_ver+"\test_en_cours.txt >> "+envq_log+envq_ver+"\"+bibi+".txt")
533// unix_w ("erase "+envq_log+envq_ver+"\test_en_cours.txt") 533// unix_w ("erase "+envq_log+envq_ver+"\test_en_cours.txt")
534 else 534 else
535// monde linux utiliser commande cat 535// monde linux utiliser commande cat
536 end 536 end
537// disp (basename(the_list2(k))) 537// disp (basename(the_list2(k)))
538end // du for 538end // du for
539 539
540end 540end
541endfunction 541endfunction
542 542
543 543
544//====================================================================================================================== 544//======================================================================================================================
545 545
546 546
547function aide(varargin) 547function aide(varargin)
548// fonction executer au lancement de l'environnement de qualification scilab sous window 548// fonction executer au lancement de l'environnement de qualification scilab sous window
549 if argn(2)==1 then 549 if argn(2)==1 then
550 if (varargin(1)=="all") | (varargin(1)=="ALL" )then 550 if (varargin(1)=="all") | (varargin(1)=="ALL" )then
551 disp (" ") 551 disp (" ")
552 copyftp() 552 copyftp()
553 runtest() 553 runtest()
554// copyrun() 554// copyrun()
555 clearwork() 555 clearwork()
556 clearlog() 556 clearlog()
557 disp (" ") 557 disp (" ")
558 end 558 end
559 else 559 else
560 disp (" ") 560 disp (" ")
561 write(%io(2)," ENVIRONNEMENT DE QUALIFICATION SCILAB") 561 write(%io(2)," ENVIRONNEMENT DE QUALIFICATION SCILAB")
562 disp (" ") 562 disp (" ")
563 write(%io(2)," commandes disponibles : COPYFTP() - RUNTEST() - COPYRUN() - CLEARWORK() - CLEARLOG()") 563 write(%io(2)," commandes disponibles : COPYFTP() - RUNTEST() - COPYRUN() - CLEARWORK() - CLEARLOG()")
564 //write(%io(2)," ") 564 //write(%io(2)," ")
565 //write(%io(2)," pour une aide faire : AIDE (""all"") ou lancer une commande sans parametres ") 565 //write(%io(2)," pour une aide faire : AIDE (""all"") ou lancer une commande sans parametres ")
566 disp (" ") 566 disp (" ")
567 end 567 end
568endfunction 568endfunction
569 569
570 570
571 571
572 572
573 573
diff --git a/tests/nonRegression/Qualif/Proc/fonct_qualif.sci.sav.txt b/tests/nonRegression/Qualif/Proc/fonct_qualif.sci.sav.txt
index 8f4a555..967da1e 100755
--- a/tests/nonRegression/Qualif/Proc/fonct_qualif.sci.sav.txt
+++ b/tests/nonRegression/Qualif/Proc/fonct_qualif.sci.sav.txt
@@ -1,542 +1,542 @@
1function tests_suite_selected=select_tests_suite(directory) 1function tests_suite_selected=select_tests_suite(directory)
2 2
3// selection des batteries de tests par menu via le menu Qualif 3// selection des batteries de tests par menu via le menu Qualif
4//recuperer les batteries de tests sous directory dans une matrice 4//recuperer les batteries de tests sous directory dans une matrice
5 5
6// verifier que tests_suite sont des repertoires quand directory=envq_work 6// verifier que tests_suite sont des repertoires quand directory=envq_work
7select directory 7select directory
8 case envq_work then 8 case envq_work then
9 tests_suite=basename(listfiles(directory)); 9 tests_suite=basename(listfiles(directory));
10 the_list=[] 10 the_list=[]
11 for i=1:size(tests_suite,"*") 11 for i=1:size(tests_suite,"*")
12 if isdir (envq_work+tests_suite(i)) then 12 if isdir (envq_work+tests_suite(i)) then
13// tests_suite(i) est un répertoire 13// tests_suite(i) est un répertoire
14 the_list = [the_list;tests_suite(i)] 14 the_list = [the_list;tests_suite(i)]
15 end 15 end
16 end // du for 16 end // du for
17 tests_suite=the_list 17 tests_suite=the_list
18 case envq_log+envq_ver then 18 case envq_log+envq_ver then
19 tests_suite=basename(listfiles(envq_log+envq_ver+"\*.log")) 19 tests_suite=basename(listfiles(envq_log+envq_ver+"\*.log"))
20 case "" then 20 case "" then
21 // chercher la liste sur frioul 21 // chercher la liste sur frioul
22 else 22 else
23 disp ("PROBLEME") 23 disp ("PROBLEME")
24 break 24 break
25 end 25 end
26tests_suite=sort(tests_suite) 26tests_suite=sort(tests_suite)
27 27
28 28
29//parcourir la matrice ainsi créée et charger la liste pour le menu de selection des batteries 29//parcourir la matrice ainsi créée et charger la liste pour le menu de selection des batteries
30the_list=list() 30the_list=list()
31for i=1:size(tests_suite,"*") 31for i=1:size(tests_suite,"*")
32the_list($+1)=list(tests_suite(i),1,['Non','Oui']) 32the_list($+1)=list(tests_suite(i),1,['Non','Oui'])
33end // du for 33end // du for
34rep=x_choices('Tests Suite Selection Menu',the_list); 34rep=x_choices('Tests Suite Selection Menu',the_list);
35 35
36//prendre dans rep les reponses à oui (valeur 2);retrouver la batterie de tests correspondante ; et lancer son execution 36//prendre dans rep les reponses à oui (valeur 2);retrouver la batterie de tests correspondante ; et lancer son execution
37tests_suite_selected="" 37tests_suite_selected=""
38for i=1:size(tests_suite,"*") 38for i=1:size(tests_suite,"*")
39 if rep(i)==2 then 39 if rep(i)==2 then
40 tests_suite_selected=tests_suite_selected + " " + tests_suite(i) 40 tests_suite_selected=tests_suite_selected + " " + tests_suite(i)
41 end // du if 41 end // du if
42end // du for 42end // du for
43 43
44endfunction 44endfunction
45 45
46 46
47function affich_date 47function affich_date
48w=getdate() 48w=getdate()
49disp(date() + " "+string(w(7))+" h. "+string(w(8))+" mn. "+string(w(9))+" s. ") 49disp(date() + " "+string(w(7))+" h. "+string(w(8))+" mn. "+string(w(9))+" s. ")
50endfunction 50endfunction
51 51
52 52
53function affich_result(pasOK, num) 53function affich_result(pasOK, num)
54// affiche FAILED ou PASSED, fonction utiliser dans les tests-suites de non regression 54// affiche FAILED ou PASSED, fonction utiliser dans les tests-suites de non regression
55 // This part display result 55 // This part display result
56 // le booleen pasOK est à faux 56 // le booleen pasOK est à faux
57 if ~pasOK then 57 if ~pasOK then
58 disp("***************************************** Test bug" + string(num) +" : FAILED ! "); 58 disp("***************************************** Test bug" + string(num) +" : FAILED ! ");
59 else 59 else
60 disp("Test bug" + string(num) +" : PASSED"); 60 disp("Test bug" + string(num) +" : PASSED");
61 end 61 end
62endfunction 62endfunction
63 63
64function my_mat = list2mat (my_list) 64function my_mat = list2mat (my_list)
65my_mat = [''] 65my_mat = ['']
66//for k=1:size(my_list,"*") 66//for k=1:size(my_list,"*")
67for k=1:size(my_list) 67for k=1:size(my_list)
68 my_mat (k) = my_list(k) 68 my_mat (k) = my_list(k)
69end 69end
70endfunction 70endfunction
71 71
72 72
73function mat_rep = sel_rep(my_mat) 73function mat_rep = sel_rep(my_mat)
74 mat_rep = [''] 74 mat_rep = ['']
75// cas d'une liste 75// cas d'une liste
76mat_rep = '' 76mat_rep = ''
77 n=1 77 n=1
78 for k=1:size(my_mat,"*") 78 for k=1:size(my_mat,"*")
79// for k=1:size(my_mat) 79// for k=1:size(my_mat)
80 if isdir(my_mat(k)) then 80 if isdir(my_mat(k)) then
81 mat_rep (n) = my_mat(k) 81 mat_rep (n) = my_mat(k)
82 n = n+1 82 n = n+1
83 end 83 end
84 end 84 end
85endfunction 85endfunction
86 86
87function copyftp(my_cmd) 87function copyftp(my_cmd)
88 if argn(2)==0 then 88 if argn(2)==0 then
89 //disp " " 89 //disp " "
90 write(%io(2),"COPYFTP : ") 90 write(%io(2),"COPYFTP : ")
91 write(%io(2),"Pour copier en local via ftp : ") 91 write(%io(2),"Pour copier en local via ftp : ")
92 write(%io(2),"- toutes les tests_suites faire : copyftp *") 92 write(%io(2),"- toutes les tests_suites faire : copyftp *")
93 write(%io(2),"- certaines tests_suites faire : copyftp ""nonreg* tests_20?? scicos""") 93 write(%io(2),"- certaines tests_suites faire : copyftp ""nonreg* tests_20?? scicos""")
94 write(%io(2),"- une tests_suite faire : copyftp ""scicos""") 94 write(%io(2),"- une tests_suite faire : copyftp ""scicos""")
95 disp " " 95 disp " "
96 else 96 else
97 if MSDOS then 97 if MSDOS then
98 unix_w (envq_proc+"init_qualif.bat&copyftp.bat "+my_cmd) 98 unix_w (envq_proc+"init_qualif.bat&copyftp.bat "+my_cmd)
99 end 99 end
100 end 100 end
101 endfunction 101 endfunction
102 102
103function ierr=runtest22(varargin) 103function ierr=runtest22(varargin)
104// se positionne dans le repertoire de la tests_suite et lance son execution 104// se positionne dans le repertoire de la tests_suite et lance son execution
105ierr=0 105ierr=0
106chdir (envq_work) 106chdir (envq_work)
107disp(varargin) 107disp(varargin)
108// ts_work = list2mat (varargin) 108// ts_work = list2mat (varargin)
109ts_work = varargin 109ts_work = varargin
110disp (typeof(ts_work)) 110disp (typeof(ts_work))
111disp (ts_work) 111disp (ts_work)
112pause 112pause
113 113
114//disp(varargin(argn(1))) 114//disp(varargin(argn(1)))
115//disp(varargin(argn(2))) 115//disp(varargin(argn(2)))
116//disp(varargin(argn(3))) 116//disp(varargin(argn(3)))
117//pause 117//pause
118 118
119//ts_work = [''] 119//ts_work = ['']
120//ts_work = [my_cmd] 120//ts_work = [my_cmd]
121 121
122//disp (ts_work) 122//disp (ts_work)
123//pause 123//pause
124 124
125//recuperation des parametres, voir si exite un booleen pour copie via ftp 125//recuperation des parametres, voir si exite un booleen pour copie via ftp
126//if argn(2) < 1 then 126//if argn(2) < 1 then
127// disp ("erreur pas d''argument") 127// disp ("erreur pas d''argument")
128//elseif argn(2) == 1 then 128//elseif argn(2) == 1 then
129//disp ( varargin) 129//disp ( varargin)
130//disp (type (varargin)) 130//disp (type (varargin))
131// ts_work = list2mat (varargin) 131// ts_work = list2mat (varargin)
132// via_ftp = %f 132// via_ftp = %f
133//else 133//else
134// argn(2) est plus grand que 1 134// argn(2) est plus grand que 1
135//disp ("varargin : "+varargin) 135//disp ("varargin : "+varargin)
136//disp ("varargin : "+typeof (varargin)) 136//disp ("varargin : "+typeof (varargin))
137//disp (type(varargin(argn(2)))) 137//disp (type(varargin(argn(2))))
138// if type(varargin(argn(2)))==4 then 138// if type(varargin(argn(2)))==4 then
139// le dernier parametre est un booleen, le mettre dans la variable via_ftp 139// le dernier parametre est un booleen, le mettre dans la variable via_ftp
140// via_ftp = varargin(argn(2)) 140// via_ftp = varargin(argn(2))
141// disp (via_ftp) 141// disp (via_ftp)
142 142
143// varargin(argn(2)) = null() 143// varargin(argn(2)) = null()
144// ts_work = list2mat (varargin) 144// ts_work = list2mat (varargin)
145// disp (ts_work) 145// disp (ts_work)
146// else 146// else
147// ts_work = list2mat (varargin) 147// ts_work = list2mat (varargin)
148// via_ftp = %f 148// via_ftp = %f
149// end 149// end
150//end 150//end
151disp (" je suis là") 151disp (" je suis là")
152pause 152pause
153// copie via ftp du serveur vers env qualif de la machine cible 153// copie via ftp du serveur vers env qualif de la machine cible
154//if via_ftp then 154//if via_ftp then
155// copier via ftp la (les) tests_suite(s) demandées 155// copier via ftp la (les) tests_suite(s) demandées
156// if ts_work == all then 156// if ts_work == all then
157 157
158//copy_ftp (ts_work) 158//copy_ftp (ts_work)
159//end 159//end
160 160
161//disp ("toto") 161//disp ("toto")
162 162
163// conserve uniquement les repertoires 163// conserve uniquement les repertoires
164disp("----") 164disp("----")
165 165
166ts_work = sel_rep(ts_work) 166ts_work = sel_rep(ts_work)
167disp ("ts_work : "+ts_work) 167disp ("ts_work : "+ts_work)
168disp("type : "+typeof(ts_work)) 168disp("type : "+typeof(ts_work))
169pause 169pause
170 170
171//if ts_work == [''] then 171//if ts_work == [''] then
172if ts_work == '' then 172if ts_work == '' then
173 disp ("") 173 disp ("")
174 disp (" CE N''EST PAS UN NOM (repertoire) DE TESTS-SUITE.----------------------------") 174 disp (" CE N''EST PAS UN NOM (repertoire) DE TESTS-SUITE.----------------------------")
175// disp("Error n° "+string(ierr)); 175// disp("Error n° "+string(ierr));
176// disp(lasterror()); 176// disp(lasterror());
177 disp ("coucou") 177 disp ("coucou")
178else 178else
179disp ("pas ici") 179disp ("pas ici")
180// corps de la fonction runtest proprement dite, boucle sur les tests_suite(s) 180// corps de la fonction runtest proprement dite, boucle sur les tests_suite(s)
181 for k=1:size(ts_work,"*") 181 for k=1:size(ts_work,"*")
182// for k=1:size(ts_work) 182// for k=1:size(ts_work)
183 chdir (envq_work + ts_work(k)) 183 chdir (envq_work + ts_work(k))
184 ierr = exec (ts_work(k) + ".sce", 'errcatch') 184 ierr = exec (ts_work(k) + ".sce", 'errcatch')
185 if ierr<>0 then 185 if ierr<>0 then
186 disp("") 186 disp("")
187 disp " LA TESTS-SUITE " + ts_work(k) + " S ''EST INCORRECTEMENT TERMINEE.----------------------------" 187 disp " LA TESTS-SUITE " + ts_work(k) + " S ''EST INCORRECTEMENT TERMINEE.----------------------------"
188 disp("Error n° "+string(ierr)); 188 disp("Error n° "+string(ierr));
189 disp(lasterror()); 189 disp(lasterror());
190 disp("") 190 disp("")
191 end 191 end
192 192
193 end 193 end
194end 194end
195endfunction 195endfunction
196 196
197 197
198function displist (tout) 198function displist (tout)
199 199
200// exemple : displist(["autre?ep";"n*"]) 200// exemple : displist(["autre?ep";"n*"])
201ierr=0 201ierr=0
202//tout = ["autrerep","hif","n*"] 202//tout = ["autrerep","hif","n*"]
203the_list=[] 203the_list=[]
204for i=1:size(tout,"*") 204for i=1:size(tout,"*")
205 if isdir (envq_work+tout(i)) then 205 if isdir (envq_work+tout(i)) then
206// tout(i) est un répertoire 206// tout(i) est un répertoire
207 the_list = [the_list;tout(i)] 207 the_list = [the_list;tout(i)]
208 else 208 else
209 the_list = [the_list;basename(listfiles(envq_work+tout(i)))] 209 the_list = [the_list;basename(listfiles(envq_work+tout(i)))]
210 end 210 end
211end // du for 211end // du for
212 212
213//pause 213//pause
214 214
215the_list2=[] 215the_list2=[]
216for i=1:size(the_list,"*") 216for i=1:size(the_list,"*")
217 if isdir (envq_work+the_list(i)) then 217 if isdir (envq_work+the_list(i)) then
218 the_list2 = [the_list2;the_list(i)] 218 the_list2 = [the_list2;the_list(i)]
219 end 219 end
220end // du for 220end // du for
221 221
222// pause 222// pause
223 223
224for k=1:size(the_list2,"*") 224for k=1:size(the_list2,"*")
225 chdir (envq_work + basename(the_list2(k))) 225 chdir (envq_work + basename(the_list2(k)))
226 diary (envq_log+envq_ver+"\"+the_list2(k)+".txt") 226 diary (envq_log+envq_ver+"\"+the_list2(k)+".txt")
227 ierr = exec (the_list2(k) + ".sce", 'errcatch') 227 ierr = exec (the_list2(k) + ".sce", 'errcatch')
228 if ierr<>0 then 228 if ierr<>0 then
229 disp("") 229 disp("")
230 disp " LA TESTS-SUITE " + the_list2(k) + " S ''EST INCORRECTEMENT TERMINEE.----------------------------" 230 disp " LA TESTS-SUITE " + the_list2(k) + " S ''EST INCORRECTEMENT TERMINEE.----------------------------"
231 disp("Error n° "+string(ierr)); 231 disp("Error n° "+string(ierr));
232 disp(lasterror()); 232 disp(lasterror());
233 disp("") 233 disp("")
234 end 234 end
235 diary(0) 235 diary(0)
236 // disp (basename(the_list2(k))) 236 // disp (basename(the_list2(k)))
237end // du for 237end // du for
238 238
239 239
240endfunction 240endfunction
241 241
242 242
243function rruntest(varargin) 243function rruntest(varargin)
244 244
245if argn(2)==0 then 245if argn(2)==0 then
246 //disp " " 246 //disp " "
247 write(%io(2),"RUNTEST : ") 247 write(%io(2),"RUNTEST : ")
248 write(%io(2),"- toutes les tests_suites faire : runtest (""*"")") 248 write(%io(2),"- toutes les tests_suites faire : runtest (""*"")")
249 write(%io(2),"- certaines tests_suites faire : runtest ""nonreg*" , "tests_20??" , "scicos""") 249 write(%io(2),"- certaines tests_suites faire : runtest ""nonreg*" , "tests_20??" , "scicos""")
250 write(%io(2),"- une tests_suite faire : runtest ""scicos""") 250 write(%io(2),"- une tests_suite faire : runtest ""scicos""")
251 disp " " 251 disp " "
252else 252else
253 253
254disp (length(varargin)) 254disp (length(varargin))
255 255
256for i=1:length(varargin) 256for i=1:length(varargin)
257disp (varargin(i)) 257disp (varargin(i))
258end // du for 258end // du for
259 259
260my_list=varargin 260my_list=varargin
261 261
262pause 262pause
263 263
264// exemple : displist(["autre?ep";"n*"]) 264// exemple : displist(["autre?ep";"n*"])
265ierr=0 265ierr=0
266//my_list = ["autrerep","hif","n*"] 266//my_list = ["autrerep","hif","n*"]
267//my_list = listfiles(envq_work+my_list 267//my_list = listfiles(envq_work+my_list
268the_list=[] 268the_list=[]
269for i=1:size(my_list) 269for i=1:size(my_list)
270//for i=1:size(my_list,"*") 270//for i=1:size(my_list,"*")
271 if isdir (envq_work+my_list(i)) then 271 if isdir (envq_work+my_list(i)) then
272// my_list(i) est un répertoire 272// my_list(i) est un répertoire
273 the_list = [the_list;my_list(i)] 273 the_list = [the_list;my_list(i)]
274 else 274 else
275 the_list = [the_list;basename(listfiles(envq_work+my_list(i)))] 275 the_list = [the_list;basename(listfiles(envq_work+my_list(i)))]
276 end 276 end
277end // du for 277end // du for
278 278
279disp("ici") 279disp("ici")
280pause 280pause
281 281
282 282
283the_list2=[] 283the_list2=[]
284for i=1:size(the_list,"*") 284for i=1:size(the_list,"*")
285 if isdir (envq_work+the_list(i)) then 285 if isdir (envq_work+the_list(i)) then
286 the_list2 = [the_list2;the_list(i)] 286 the_list2 = [the_list2;the_list(i)]
287 end 287 end
288end // du for 288end // du for
289 289
290disp("là") 290disp("là")
291pause 291pause
292 292
293for k=1:size(the_list2,"*") 293for k=1:size(the_list2,"*")
294 chdir (envq_work + basename(the_list2(k))) 294 chdir (envq_work + basename(the_list2(k)))
295 diary (envq_log+envq_ver+"\"+the_list2(k)+".txt") 295 diary (envq_log+envq_ver+"\"+the_list2(k)+".txt")
296 ierr = exec (the_list2(k) + ".sce", 'errcatch') 296 ierr = exec (the_list2(k) + ".sce", 'errcatch')
297 if ierr<>0 then 297 if ierr<>0 then
298 disp("") 298 disp("")
299 disp " LA TESTS-SUITE " + the_list2(k) + " S ''EST INCORRECTEMENT TERMINEE.----------------------------" 299 disp " LA TESTS-SUITE " + the_list2(k) + " S ''EST INCORRECTEMENT TERMINEE.----------------------------"
300 disp("Error n° "+string(ierr)); 300 disp("Error n° "+string(ierr));
301 disp(lasterror()); 301 disp(lasterror());
302 disp("") 302 disp("")
303 end 303 end
304 diary(0) 304 diary(0)
305 // disp (basename(the_list2(k))) 305 // disp (basename(the_list2(k)))
306end // du for 306end // du for
307 307
308end 308end
309endfunction 309endfunction
310 310
311function test (str) 311function test (str)
312a=[] 312a=[]
313interv=strindex(str," ") 313interv=strindex(str," ")
314debut=1 314debut=1
315for i=1:length(interv) 315for i=1:length(interv)
316 a=[a;part(str,[debut:(interv(i))-1])] 316 a=[a;part(str,[debut:(interv(i))-1])]
317 debut=interv(i)+1 317 debut=interv(i)+1
318end 318end
319a=[a;part(str,[debut:length(str)])] 319a=[a;part(str,[debut:length(str)])]
320disp (a) 320disp (a)
321 321
322pause 322pause
323 323
324endfunction 324endfunction
325 325
326function clearwork (my_cmd) 326function clearwork (my_cmd)
327 if argn(2)==0 then 327 if argn(2)==0 then
328 //disp " " 328 //disp " "
329 write(%io(2),"CLEARWORK : ") 329 write(%io(2),"CLEARWORK : ")
330 write(%io(2),"Pour supprimer un, plusieurs ou toutes les test-suites du répertoire Work local : ") 330 write(%io(2),"Pour supprimer un, plusieurs ou toutes les test-suites du répertoire Work local : ")
331 write(%io(2),"- toutes les tests_suites faire : clearwork *") 331 write(%io(2),"- toutes les tests_suites faire : clearwork *")
332 write(%io(2),"- certaines tests_suites faire : clearwork ""nonreg* tests_20?? scicos""") 332 write(%io(2),"- certaines tests_suites faire : clearwork ""nonreg* tests_20?? scicos""")
333 write(%io(2),"- une tests_suite faire : clearwork ""scicos""") 333 write(%io(2),"- une tests_suite faire : clearwork ""scicos""")
334 disp " " 334 disp " "
335 else 335 else
336 if MSDOS then 336 if MSDOS then
337 unix_w (envq_proc+"init_qualif.bat&clearwork.bat "+my_cmd) 337 unix_w (envq_proc+"init_qualif.bat&clearwork.bat "+my_cmd)
338 disp (my_cmd) 338 disp (my_cmd)
339else 339else
340 unix_w ("clearwork" +my_cmd) 340 unix_w ("clearwork" +my_cmd)
341 end 341 end
342 end 342 end
343endfunction 343endfunction
344 344
345function clearlog (my_cmd) 345function clearlog (my_cmd)
346 if argn(2)==0 then 346 if argn(2)==0 then
347 //disp " " 347 //disp " "
348 write(%io(2),"CLEARLOG : ") 348 write(%io(2),"CLEARLOG : ")
349 write(%io(2),"Pour supprimer un, plusieurs ou tous les fichiers log : ") 349 write(%io(2),"Pour supprimer un, plusieurs ou tous les fichiers log : ")
350 write(%io(2),"- toutes les tests_suites faire : clearlog *") 350 write(%io(2),"- toutes les tests_suites faire : clearlog *")
351 write(%io(2),"- certaines tests_suites faire : clearlog ""nonreg* tests_20?? scicos""") 351 write(%io(2),"- certaines tests_suites faire : clearlog ""nonreg* tests_20?? scicos""")
352 write(%io(2),"- une tests_suite faire : clearlog ""scicos""") 352 write(%io(2),"- une tests_suite faire : clearlog ""scicos""")
353 disp " " 353 disp " "
354 else 354 else
355 if MSDOS then 355 if MSDOS then
356 unix_w (envq_proc+"init_qualif.bat&clearlog.bat "+my_cmd) 356 unix_w (envq_proc+"init_qualif.bat&clearlog.bat "+my_cmd)
357 else 357 else
358 unix_w ("clearlog" +my_cmd) 358 unix_w ("clearlog" +my_cmd)
359 end 359 end
360 end 360 end
361endfunction 361endfunction
362 362
363function showlog (my_cmd) 363function showlog (my_cmd)
364 if argn(2)==0 then 364 if argn(2)==0 then
365 //disp " " 365 //disp " "
366 write(%io(2),"SHOWLOG : ") 366 write(%io(2),"SHOWLOG : ")
367 write(%io(2),"Pour visualiser la derniere ligne de un, plusieurs ou tous fichiers log : ") 367 write(%io(2),"Pour visualiser la derniere ligne de un, plusieurs ou tous fichiers log : ")
368 write(%io(2),"- toutes les tests_suites faire : showlog *") 368 write(%io(2),"- toutes les tests_suites faire : showlog *")
369 write(%io(2),"- certaines tests_suites faire : showlog ""nonreg* tests_20?? scicos""") 369 write(%io(2),"- certaines tests_suites faire : showlog ""nonreg* tests_20?? scicos""")
370 write(%io(2),"- une tests_suite faire : showlog ""scicos""") 370 write(%io(2),"- une tests_suite faire : showlog ""scicos""")
371 disp " " 371 disp " "
372 else 372 else
373 if MSDOS then 373 if MSDOS then
374 unix_w (envq_proc+"init_qualif.bat&showlog.bat "+my_cmd) 374 unix_w (envq_proc+"init_qualif.bat&showlog.bat "+my_cmd)
375 else 375 else
376 unix_w ("showlog" +my_cmd) 376 unix_w ("showlog" +my_cmd)
377 end 377 end
378 end 378 end
379endfunction 379endfunction
380 380
381 381
382function dirlog (my_cmd) 382function dirlog (my_cmd)
383 if argn(2)==0 then 383 if argn(2)==0 then
384 //disp " " 384 //disp " "
385 write(%io(2),"DIRLOG : ") 385 write(%io(2),"DIRLOG : ")
386 write(%io(2),"Pour visualiser la derniere ligne de un, plusieurs ou tous fichiers log : ") 386 write(%io(2),"Pour visualiser la derniere ligne de un, plusieurs ou tous fichiers log : ")
387 write(%io(2),"- toutes les tests_suites faire : showlog *") 387 write(%io(2),"- toutes les tests_suites faire : showlog *")
388 write(%io(2),"- certaines tests_suites faire : showlog ""nonreg* tests_20?? scicos""") 388 write(%io(2),"- certaines tests_suites faire : showlog ""nonreg* tests_20?? scicos""")
389 write(%io(2),"- une tests_suite faire : showlog ""scicos""") 389 write(%io(2),"- une tests_suite faire : showlog ""scicos""")
390 disp " " 390 disp " "
391 else 391 else
392 disp(sort(basename(listfiles(envq_log+envq_ver)))) 392 disp(sort(basename(listfiles(envq_log+envq_ver))))
393 393
394 //if MSDOS then 394 //if MSDOS then
395 // unix_w (envq_proc+"init_qualif.bat&showlog.bat "+my_cmd)