diff options
author | Pierre Marechal <pierre.marechal@scilab.org> | 2007-01-30 20:17:19 +0000 |
---|---|---|
committer | Pierre Marechal <pierre.marechal@scilab.org> | 2007-01-30 20:17:19 +0000 |
commit | 9e1c1785587d2a55a4345d4dfd6cfd511552fb1c (patch) | |
tree | 7c7978733d65ee9a1e5c4ab147beb6579d64b7d5 /tests | |
parent | 270cd67c45146f4ae88352acf456752f1aeb7b8c (diff) | |
download | scilab-9e1c1785587d2a55a4345d4dfd6cfd511552fb1c.zip scilab-9e1c1785587d2a55a4345d4dfd6cfd511552fb1c.tar.gz |
set svn:eol-style to native
Diffstat (limited to 'tests')
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. |
7 | x[0] = -0.50 | 7 | x[0] = -0.50 |
8 | x[1] = 1.50 | 8 | x[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 @@ | |||
1 | exec('maketests.sci',-1); | 1 | exec('maketests.sci',-1); |
2 | maketests('test'); | 2 | maketests('test'); |
3 | quit | 3 | quit |
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 @@ | |||
1 | exec('maketests.sci',-1); | 1 | exec('maketests.sci',-1); |
2 | maketests('test'); | 2 | maketests('test'); |
3 | quit | 3 | quit |
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 | ---------------------------------------------------- |
2 | boolean A= | 2 | boolean A= |
3 | 3 | ||
4 | T | 4 | T |
5 | ---------------------------------------------------- | 5 | ---------------------------------------------------- |
6 | true | 6 | true |
7 | ---------------------------------------------------- | 7 | ---------------------------------------------------- |
8 | boolean P= | 8 | boolean 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 @@ | |||
1 | import javasci.* ; | 1 | import javasci.* ; |
2 | 2 | ||
3 | 3 | ||
4 | class Boolean { | 4 | class 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 | ---------------------------------------------------- |
2 | Matrix A= | 2 | Matrix 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 | ---------------------------------------------------- |
7 | A(1,1)=true A(1,2)=true A(1,3)=true A(1,4)=false | 7 | A(1,1)=true A(1,2)=true A(1,3)=true A(1,4)=false |
8 | A(2,1)=false A(2,2)=true A(2,3)=true A(2,4)=true | 8 | A(2,1)=false A(2,2)=true A(2,3)=true A(2,4)=true |
9 | ---------------------------------------------------- | 9 | ---------------------------------------------------- |
10 | b(0,0)=true b(0,1)=true b(0,2)=true b(0,3)=false | 10 | b(0,0)=true b(0,1)=true b(0,2)=true b(0,3)=false |
11 | b(1,0)=false b(1,1)=true b(1,2)=true b(1,3)=true | 11 | b(1,0)=false b(1,1)=true b(1,2)=true b(1,3)=true |
12 | ---------------------------------------------------- | 12 | ---------------------------------------------------- |
13 | Matrix B= | 13 | Matrix 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 | ---------------------------------------------------- |
18 | A ScilabType : 4 | 18 | A ScilabType : 4 |
19 | B ScilabType : 4 | 19 | B 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 @@ | |||
1 | import javasci.* ; | 1 | import javasci.* ; |
2 | 2 | ||
3 | 3 | ||
4 | class BooleanArray { | 4 | class 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 @@ | |||
1 | import javasci.*; | 1 | import javasci.*; |
2 | 2 | ||
3 | public class Strings2 | 3 | public 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 @@ | |||
1 | function []=testgenfiles(test_files,opt) | 1 | function []=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 |
295 | endfunction | 295 | endfunction |
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 | ||
23 | stacksize(30000000) | 23 | stacksize(30000000) |
24 | runs = 3; // Number of times the tests are executed | 24 | runs = 3; // Number of times the tests are executed |
25 | times = zeros(5, 3); | 25 | times = zeros(5, 3); |
26 | 26 | ||
27 | disp(' Scilab Benchmark 2') | 27 | disp(' Scilab Benchmark 2') |
28 | disp(' ==================') | 28 | disp(' ==================') |
29 | disp('Number of times each test is run__________________________: ' + string(runs)) | 29 | disp('Number of times each test is run__________________________: ' + string(runs)) |
30 | disp(' ') | 30 | disp(' ') |
31 | 31 | ||
32 | 32 | ||
33 | disp(' I. Matrix calculation') | 33 | disp(' I. Matrix calculation') |
34 | disp(' ---------------------') | 34 | disp(' ---------------------') |
35 | 35 | ||
36 | 36 | ||
37 | // (1) | 37 | // (1) |
38 | cumulate = 0; a = 0; b = 0; | 38 | cumulate = 0; a = 0; b = 0; |
39 | for i = 1:runs | 39 | for 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; |
47 | end; | 47 | end; |
48 | timing = cumulate/runs; | 48 | timing = cumulate/runs; |
49 | times(1, 1) = timing; | 49 | times(1, 1) = timing; |
50 | disp('Creation, transp., deformation of a 1500x1500 matrix (sec): ' + string(timing)); | 50 | disp('Creation, transp., deformation of a 1500x1500 matrix (sec): ' + string(timing)); |
51 | clear('a'); clear('b'); | 51 | clear('a'); clear('b'); |
52 | 52 | ||
53 | // (2) | 53 | // (2) |
54 | cumulate = 0; b = 0; | 54 | cumulate = 0; b = 0; |
55 | for i = 1:runs | 55 | for 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; |
61 | end | 61 | end |
62 | timing = cumulate/runs; | 62 | timing = cumulate/runs; |
63 | times(2, 1) = timing; | 63 | times(2, 1) = timing; |
64 | disp('800x800 normal distributed random matrix ^1000______ (sec): ' + string(timing)) | 64 | disp('800x800 normal distributed random matrix ^1000______ (sec): ' + string(timing)) |
65 | clear('a'); clear('b'); | 65 | clear('a'); clear('b'); |
66 | 66 | ||
67 | // (3) | 67 | // (3) |
68 | cumulate = 0; b = 0; | 68 | cumulate = 0; b = 0; |
69 | for i = 1:runs | 69 | for 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; |
75 | end | 75 | end |
76 | timing = cumulate/runs; | 76 | timing = cumulate/runs; |
77 | times(3, 1) = timing; | 77 | times(3, 1) = timing; |
78 | disp('Sorting of 2,000,000 random values__________________ (sec): ' + string(timing)) | 78 | disp('Sorting of 2,000,000 random values__________________ (sec): ' + string(timing)) |
79 | clear('a'); clear('b'); | 79 | clear('a'); clear('b'); |
80 | 80 | ||
81 | // (4) | 81 | // (4) |
82 | cumulate = 0; b = 0; | 82 | cumulate = 0; b = 0; |
83 | for i = 1:runs | 83 | for 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; |
89 | end | 89 | end |
90 | timing = cumulate/runs; | 90 | timing = cumulate/runs; |
91 | times(4, 1) = timing; | 91 | times(4, 1) = timing; |
92 | disp('700x700 cross-product matrix (b = a'' * a)___________ (sec): ' + string(timing)) | 92 | disp('700x700 cross-product matrix (b = a'' * a)___________ (sec): ' + string(timing)) |
93 | clear('a'); clear('b'); | 93 | clear('a'); clear('b'); |
94 | 94 | ||
95 | // (5) | 95 | // (5) |
96 | cumulate = 0; c = 0; | 96 | cumulate = 0; c = 0; |
97 | for i = 1:runs | 97 | for 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; |
104 | end | 104 | end |
105 | timing = cumulate/runs; | 105 | timing = cumulate/runs; |
106 | times(5, 1) = timing; | 106 | times(5, 1) = timing; |
107 | disp('Linear regression over a 600x600 matrix (c = a \ b'') (sec): ' + string(timing)) | 107 | disp('Linear regression over a 600x600 matrix (c = a \ b'') (sec): ' + string(timing)) |
108 | clear('a'); clear('b'); clear('c'); | 108 | clear('a'); clear('b'); clear('c'); |
109 | 109 | ||
110 | times = sort(times, 'r'); | 110 | times = sort(times, 'r'); |
111 | disp(' --------------------------------------------------') | 111 | disp(' --------------------------------------------------') |
112 | disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,1)))))) | 112 | disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,1)))))) |
113 | disp(' ') | 113 | disp(' ') |
114 | 114 | ||
115 | disp(' II. Matrix functions') | 115 | disp(' II. Matrix functions') |
116 | disp(' --------------------') | 116 | disp(' --------------------') |
117 | 117 | ||
118 | 118 | ||
119 | // (1) | 119 | // (1) |
120 | cumulate = 0; b = 0; | 120 | cumulate = 0; b = 0; |
121 | for i = 1:runs | 121 | for 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; |
127 | end | 127 | end |
128 | timing = cumulate/runs; | 128 | timing = cumulate/runs; |
129 | times(1, 2) = timing; | 129 | times(1, 2) = timing; |
130 | disp('FFT over 800,000 random values______________________ (sec): ' + string(timing)) | 130 | disp('FFT over 800,000 random values______________________ (sec): ' + string(timing)) |
131 | clear('a'); clear('b'); | 131 | clear('a'); clear('b'); |
132 | 132 | ||
133 | // (2) | 133 | // (2) |
134 | cumulate = 0; b = 0; | 134 | cumulate = 0; b = 0; |
135 | for i = 1:runs | 135 | for 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; |
141 | end | 141 | end |
142 | timing = cumulate/runs; | 142 | timing = cumulate/runs; |
143 | times(2, 2) = timing; | 143 | times(2, 2) = timing; |
144 | disp('Eigenvalues of a 320x320 random matrix______________ (sec): ' + string(timing)) | 144 | disp('Eigenvalues of a 320x320 random matrix______________ (sec): ' + string(timing)) |
145 | clear('a'); clear('b'); | 145 | clear('a'); clear('b'); |
146 | 146 | ||
147 | // (3) | 147 | // (3) |
148 | cumulate = 0; b = 0; | 148 | cumulate = 0; b = 0; |
149 | for i = 1:runs | 149 | for 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; |
155 | end | 155 | end |
156 | timing = cumulate/runs; | 156 | timing = cumulate/runs; |
157 | times(3, 2) = timing; | 157 | times(3, 2) = timing; |
158 | disp('Determinant of a 650x650 random matrix______________ (sec): ' + string(timing)) | 158 | disp('Determinant of a 650x650 random matrix______________ (sec): ' + string(timing)) |
159 | clear('a'); clear('b'); | 159 | clear('a'); clear('b'); |
160 | 160 | ||
161 | // (4) | 161 | // (4) |
162 | cumulate = 0; b = 0; | 162 | cumulate = 0; b = 0; |
163 | for i = 1:runs | 163 | for 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; |
170 | end | 170 | end |
171 | timing = cumulate/runs; | 171 | timing = cumulate/runs; |
172 | times(4, 2) = timing; | 172 | times(4, 2) = timing; |
173 | disp('Cholesky decomposition of a 900x900 matrix__________ (sec): ' + string(timing)) | 173 | disp('Cholesky decomposition of a 900x900 matrix__________ (sec): ' + string(timing)) |
174 | clear('a'); clear('b'); | 174 | clear('a'); clear('b'); |
175 | 175 | ||
176 | // (5) | 176 | // (5) |
177 | cumulate = 0; b = 0; | 177 | cumulate = 0; b = 0; |
178 | for i = 1:runs | 178 | for 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; |
184 | end | 184 | end |
185 | timing = cumulate/runs; | 185 | timing = cumulate/runs; |
186 | times(5, 2) = timing; | 186 | times(5, 2) = timing; |
187 | disp('Inverse of a 400x400 random matrix__________________ (sec): ' + string(timing)) | 187 | disp('Inverse of a 400x400 random matrix__________________ (sec): ' + string(timing)) |
188 | clear('a'); clear('b'); | 188 | clear('a'); clear('b'); |
189 | 189 | ||
190 | times = sort(times, 'r'); | 190 | times = sort(times, 'r'); |
191 | disp(' --------------------------------------------------') | 191 | disp(' --------------------------------------------------') |
192 | disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,2)))))) | 192 | disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,2)))))) |
193 | disp(' ') | 193 | disp(' ') |
194 | 194 | ||
195 | disp(' III. Programmation') | 195 | disp(' III. Programmation') |
196 | disp(' ------------------') | 196 | disp(' ------------------') |
197 | 197 | ||
198 | // (1) | 198 | // (1) |
199 | cumulate = 0; a = 0; b = 0; phi = 1.6180339887498949; | 199 | cumulate = 0; a = 0; b = 0; phi = 1.6180339887498949; |
200 | for i = 1:runs | 200 | for 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; |
206 | end | 206 | end |
207 | timing = cumulate/runs; | 207 | timing = cumulate/runs; |
208 | times(1, 3) = timing; | 208 | times(1, 3) = timing; |
209 | disp('750,000 Fibonacci numbers calculation (vector calc)_ (sec): ' + string(timing)) | 209 | disp('750,000 Fibonacci numbers calculation (vector calc)_ (sec): ' + string(timing)) |
210 | clear('a'); clear('b'); clear('phi'); | 210 | clear('a'); clear('b'); clear('phi'); |
211 | 211 | ||
212 | // (2) | 212 | // (2) |
213 | cumulate = 0; a = 2250; b = 0; | 213 | cumulate = 0; a = 2250; b = 0; |
214 | for i = 1:runs | 214 | for 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; |
219 | end | 219 | end |
220 | timing = cumulate/runs; | 220 | timing = cumulate/runs; |
221 | times(2, 3) = timing; | 221 | times(2, 3) = timing; |
222 | disp('Creation of a 2250x2250 Hilbert matrix (matrix calc) (sec): ' + string(timing)) | 222 | disp('Creation of a 2250x2250 Hilbert matrix (matrix calc) (sec): ' + string(timing)) |
223 | clear('a'); clear('b'); | 223 | clear('a'); clear('b'); |
224 | 224 | ||
225 | // (3) | 225 | // (3) |
226 | cumulate = 0; c = 0; | 226 | cumulate = 0; c = 0; |
227 | deff('[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']) | 227 | deff('[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']) |
228 | for i = 1:runs | 228 | for 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; |
235 | end | 235 | end |
236 | timing = cumulate/runs; | 236 | timing = cumulate/runs; |
237 | times(3, 3) = timing; | 237 | times(3, 3) = timing; |
238 | disp('Grand common divisors of 70,000 pairs (recursion)___ (sec): ' + string(timing)) | 238 | disp('Grand common divisors of 70,000 pairs (recursion)___ (sec): ' + string(timing)) |
239 | clear('a'); clear('b'); clear('c'); | 239 | clear('a'); clear('b'); clear('c'); |
240 | 240 | ||
241 | // (4) | 241 | // (4) |
242 | cumulate = 0; b = 0; | 242 | cumulate = 0; b = 0; |
243 | for i = 1:runs | 243 | for 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; |
253 | end | 253 | end |
254 | timing = cumulate/runs; | 254 | timing = cumulate/runs; |
255 | times(4, 3) = timing; | 255 | times(4, 3) = timing; |
256 | disp('Creation of a 220x220 Toeplitz matrix (loops)_______ (sec): ' + string(timing)) | 256 | disp('Creation of a 220x220 Toeplitz matrix (loops)_______ (sec): ' + string(timing)) |
257 | clear('b'); clear('j'); clear('k'); | 257 | clear('b'); clear('j'); clear('k'); |
258 | 258 | ||
259 | // (5) | 259 | // (5) |
260 | cumulate = 0; p = 0; q = 0; vt = 0; vr = 0; vrt = 0; rvt = 0; RV = 0; j = 0; k = 0; | 260 | cumulate = 0; p = 0; q = 0; vt = 0; vr = 0; vrt = 0; rvt = 0; RV = 0; j = 0; k = 0; |
261 | x2 = 0; R = 0; Rxx = 0; Ryy = 0; Rxy = 0; Ryx = 0; Rvmax = 0; f = 0;, c= 0; d = 0; | 261 | x2 = 0; R = 0; Rxx = 0; Ryy = 0; Rxy = 0; Ryx = 0; Rvmax = 0; f = 0;, c= 0; d = 0; |
262 | for i = 1:runs | 262 | for 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; |
298 | end | 298 | end |
299 | times(5, 3) = timing; | 299 | times(5, 3) = timing; |
300 | disp('Escoufier''s method on a 37x37 matrix (mixed)________ (sec): ' + string(timing)) | 300 | disp('Escoufier''s method on a 37x37 matrix (mixed)________ (sec): ' + string(timing)) |
301 | clear('x'); clear('p'); clear('q'); clear('vt'); clear('vr'); clear('vrt'); clear('rvt'); clear('RV'); clear('j'); clear('k'); | 301 | clear('x'); clear('p'); clear('q'); clear('vt'); clear('vr'); clear('vrt'); clear('rvt'); clear('RV'); clear('j'); clear('k'); |
302 | clear('x2'); clear('R'); clear('Rxx'); clear('Ryy'); clear('Rxy'); clear('Ryx'); clear('Rvmax'); clear('f'); clear('c'); clear('d'); | 302 | clear('x2'); clear('R'); clear('Rxx'); clear('Ryy'); clear('Rxy'); clear('Ryx'); clear('Rvmax'); clear('f'); clear('c'); clear('d'); |
303 | 303 | ||
304 | times = sort(times, 'r'); | 304 | times = sort(times, 'r'); |
305 | disp(' --------------------------------------------------') | 305 | disp(' --------------------------------------------------') |
306 | disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,3)))))) | 306 | disp(' Trimmed geom. mean (2 extremes eliminated): ' + string(exp(mean(log(times(2:4,3)))))) |
307 | disp(' ') | 307 | disp(' ') |
308 | 308 | ||
309 | disp(' ') | 309 | disp(' ') |
310 | disp('Total time for all 15 tests_________________________ (sec): ' + string(sum(times))) | 310 | disp('Total time for all 15 tests_________________________ (sec): ' + string(sum(times))) |
311 | disp('Overall mean (sum of I, II and III trimmed means/3)_ (sec): ' + string(exp(mean(log(times(2:4,:)))))) | 311 | disp('Overall mean (sum of I, II and III trimmed means/3)_ (sec): ' + string(exp(mean(log(times(2:4,:)))))) |
312 | clear('cumulate'); clear('timing'); clear('times'); clear('runs'); clear('i'); | 312 | clear('cumulate'); clear('timing'); clear('times'); clear('runs'); clear('i'); |
313 | disp(' --- End of test ---') | 313 | disp(' --- 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 @@ | |||
1 | LibNcFTP 3.1.5 (October 13, 2002) compiled for Windows | 1 | LibNcFTP 3.1.5 (October 13, 2002) compiled for Windows |
2 | 220: frioul.inria.fr FTP server (Version 5.60) ready. | 2 | 220: frioul.inria.fr FTP server (Version 5.60) ready. |
3 | Connected to frioul.inria.fr. | 3 | Connected to frioul.inria.fr. |
4 | Cmd: USER qualif | 4 | Cmd: USER qualif |
5 | 331: Password required for qualif. | 5 | 331: Password required for qualif. |
6 | Cmd: PASS xxxxxxxx | 6 | Cmd: PASS xxxxxxxx |
7 | 230: User qualif logged in. | 7 | 230: User qualif logged in. |
8 | Cmd: PWD | 8 | Cmd: PWD |
9 | 257: "/home/qualif" is current directory. | 9 | 257: "/home/qualif" is current directory. |
10 | Logged in to frioul.inria.fr as qualif. | 10 | Logged in to frioul.inria.fr as qualif. |
11 | Cmd: FEAT | 11 | Cmd: FEAT |
12 | 500: 'FEAT': command not understood. | 12 | 500: 'FEAT': command not understood. |
13 | Cmd: HELP SITE | 13 | Cmd: HELP SITE |
14 | 214: The following SITE commands are recognized (* =>'s unimplemented). | 14 | 214: 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. |
17 | Cmd: CLNT NcFTPGet 3.1.5 Windows | 17 | Cmd: CLNT NcFTPGet 3.1.5 Windows |
18 | 500: 'CLNT NcFTPGet 3.1.5 Windows': command not understood. | 18 | 500: 'CLNT NcFTPGet 3.1.5 Windows': command not understood. |
19 | Cmd: PWD | 19 | Cmd: PWD |
20 | 257: "/home/qualif" is current directory. | 20 | 257: "/home/qualif" is current directory. |
21 | Cmd: CWD tests_suite/autrerep | 21 | Cmd: CWD tests_suite/autrerep |
22 | 250: CWD command successful. | 22 | 250: CWD command successful. |
23 | Cmd: CWD /home/qualif | 23 | Cmd: CWD /home/qualif |
24 | 250: CWD command successful. | 24 | 250: CWD command successful. |
25 | Cmd: PWD | 25 | Cmd: PWD |
26 | 257: "/home/qualif" is current directory. | 26 | 257: "/home/qualif" is current directory. |
27 | Cmd: CWD tests_suite/autrerep | 27 | Cmd: CWD tests_suite/autrerep |
28 | 250: CWD command successful. | 28 | 250: CWD command successful. |
29 | Cmd: PASV | 29 | Cmd: PASV |
30 | 227: Entering Passive Mode (128,93,12,139,170,45) | 30 | 227: Entering Passive Mode (128,93,12,139,170,45) |
31 | Cmd: LIST -Ra | 31 | Cmd: LIST -Ra |
32 | 150: Opening ASCII mode data connection for /bin/ls. | 32 | 150: Opening ASCII mode data connection for /bin/ls. |
33 | 226: Transfer complete. | 33 | 226: Transfer complete. |
34 | Cmd: CWD /home/qualif | 34 | Cmd: CWD /home/qualif |
35 | 250: CWD command successful. | 35 | 250: CWD command successful. |
36 | Cmd: MDTM tests_suite/autrerep/autrerep.sce | 36 | Cmd: MDTM tests_suite/autrerep/autrerep.sce |
37 | 213: 20030702130623 | 37 | 213: 20030702130623 |
38 | Cmd: TYPE I | 38 | Cmd: TYPE I |
39 | 200: Type set to I. | 39 | 200: Type set to I. |
40 | Cmd: REST 1 | 40 | Cmd: REST 1 |
41 | 350: Restarting at 1. (null) | 41 | 350: Restarting at 1. (null) |
42 | Cmd: REST 0 | 42 | Cmd: REST 0 |
43 | 350: Restarting at 0. (null) | 43 | 350: Restarting at 0. (null) |
44 | Cmd: PASV | 44 | Cmd: PASV |
45 | 227: Entering Passive Mode (128,93,12,139,170,46) | 45 | 227: Entering Passive Mode (128,93,12,139,170,46) |
46 | Cmd: RETR tests_suite/autrerep/autrerep.sce | 46 | Cmd: RETR tests_suite/autrerep/autrerep.sce |
47 | 150: Opening BINARY mode data connection for tests_suite/autrerep/autrerep.sce (438 bytes). | 47 | 150: Opening BINARY mode data connection for tests_suite/autrerep/autrerep.sce (438 bytes). |
48 | 226: Transfer complete. | 48 | 226: Transfer complete. |
49 | Cmd: MDTM tests_suite/autrerep/bug1.sci | 49 | Cmd: MDTM tests_suite/autrerep/bug1.sci |
50 | 213: 20030702130623 | 50 | 213: 20030702130623 |
51 | Cmd: PASV | 51 | Cmd: PASV |
52 | 227: Entering Passive Mode (128,93,12,139,170,47) | 52 | 227: Entering Passive Mode (128,93,12,139,170,47) |
53 | Cmd: RETR tests_suite/autrerep/bug1.sci | 53 | Cmd: RETR tests_suite/autrerep/bug1.sci |
54 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug1.sci (426 bytes). | 54 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug1.sci (426 bytes). |
55 | 226: Transfer complete. | 55 | 226: Transfer complete. |
56 | Cmd: MDTM tests_suite/autrerep/bug21.sci | 56 | Cmd: MDTM tests_suite/autrerep/bug21.sci |
57 | 213: 20030702130623 | 57 | 213: 20030702130623 |
58 | Cmd: PASV | 58 | Cmd: PASV |
59 | 227: Entering Passive Mode (128,93,12,139,170,48) | 59 | 227: Entering Passive Mode (128,93,12,139,170,48) |
60 | Cmd: RETR tests_suite/autrerep/bug21.sci | 60 | Cmd: RETR tests_suite/autrerep/bug21.sci |
61 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug21.sci (562 bytes). | 61 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug21.sci (562 bytes). |
62 | 226: Transfer complete. | 62 | 226: Transfer complete. |
63 | Cmd: MDTM tests_suite/autrerep/bug22.sci | 63 | Cmd: MDTM tests_suite/autrerep/bug22.sci |
64 | 213: 20030702130623 | 64 | 213: 20030702130623 |
65 | Cmd: PASV | 65 | Cmd: PASV |
66 | 227: Entering Passive Mode (128,93,12,139,170,49) | 66 | 227: Entering Passive Mode (128,93,12,139,170,49) |
67 | Cmd: RETR tests_suite/autrerep/bug22.sci | 67 | Cmd: RETR tests_suite/autrerep/bug22.sci |
68 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug22.sci (583 bytes). | 68 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug22.sci (583 bytes). |
69 | 226: Transfer complete. | 69 | 226: Transfer complete. |
70 | Cmd: MDTM tests_suite/autrerep/bug24.sci | 70 | Cmd: MDTM tests_suite/autrerep/bug24.sci |
71 | 213: 20030702130624 | 71 | 213: 20030702130624 |
72 | Cmd: PASV | 72 | Cmd: PASV |
73 | 227: Entering Passive Mode (128,93,12,139,170,50) | 73 | 227: Entering Passive Mode (128,93,12,139,170,50) |
74 | Cmd: RETR tests_suite/autrerep/bug24.sci | 74 | Cmd: RETR tests_suite/autrerep/bug24.sci |
75 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug24.sci (388 bytes). | 75 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug24.sci (388 bytes). |
76 | 226: Transfer complete. | 76 | 226: Transfer complete. |
77 | Cmd: MDTM tests_suite/autrerep/bug25.sci | 77 | Cmd: MDTM tests_suite/autrerep/bug25.sci |
78 | 213: 20030702130624 | 78 | 213: 20030702130624 |
79 | Cmd: PASV | 79 | Cmd: PASV |
80 | 227: Entering Passive Mode (128,93,12,139,170,51) | 80 | 227: Entering Passive Mode (128,93,12,139,170,51) |
81 | Cmd: RETR tests_suite/autrerep/bug25.sci | 81 | Cmd: RETR tests_suite/autrerep/bug25.sci |
82 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug25.sci (571 bytes). | 82 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug25.sci (571 bytes). |
83 | 226: Transfer complete. | 83 | 226: Transfer complete. |
84 | Cmd: MDTM tests_suite/autrerep/bug6.sci | 84 | Cmd: MDTM tests_suite/autrerep/bug6.sci |
85 | 213: 20030702130624 | 85 | 213: 20030702130624 |
86 | Cmd: PASV | 86 | Cmd: PASV |
87 | 227: Entering Passive Mode (128,93,12,139,170,52) | 87 | 227: Entering Passive Mode (128,93,12,139,170,52) |
88 | Cmd: RETR tests_suite/autrerep/bug6.sci | 88 | Cmd: RETR tests_suite/autrerep/bug6.sci |
89 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug6.sci (237 bytes). | 89 | 150: Opening BINARY mode data connection for tests_suite/autrerep/bug6.sci (237 bytes). |
90 | 226: Transfer complete. | 90 | 226: Transfer complete. |
91 | Cmd: QUIT | 91 | Cmd: QUIT |
92 | 221: Goodbye. | 92 | 221: 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 | ||
3 | cls | 3 | cls |
4 | echo // | 4 | echo // |
5 | echo // commandes disponibles : COPYFTP - RUNTEST - COPYRUN - CLEARWORK - CLEARLOG | 5 | echo // commandes disponibles : COPYFTP - RUNTEST - COPYRUN - CLEARWORK - CLEARLOG |
6 | echo // | 6 | echo // |
7 | echo // pour une aide faire : AIDE [all] ou lancer une commande sans parametre | 7 | echo // pour une aide faire : AIDE [all] ou lancer une commande sans parametre |
8 | echo // | 8 | echo // |
9 | echo // | 9 | echo // |
10 | 10 | ||
11 | if "%1"=="all" goto suite | 11 | if "%1"=="all" goto suite |
12 | if "%1"=="ALL" goto suite | 12 | if "%1"=="ALL" goto suite |
13 | goto the_end | 13 | goto the_end |
14 | 14 | ||
15 | :suite | 15 | :suite |
16 | cls | 16 | cls |
17 | call copyftp | 17 | call copyftp |
18 | call runtest | 18 | call runtest |
19 | call copyrun | 19 | call copyrun |
20 | call clearwork | 20 | call clearwork |
21 | call clearlog | 21 | call 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 | ||
3 | REM --- Echo Analyse des log tests_suites resultats | 3 | REM --- Echo Analyse des log tests_suites resultats |
4 | 4 | ||
5 | find "{ FIN TEST SUITE " %envq_qualif%\log\%envq_ver%\%1.log | 5 | find "{ FIN TEST SUITE " %envq_qualif%\log\%envq_ver%\%1.log |
6 | if %errorlevel% == 0 ( | 6 | if %errorlevel% == 0 ( |
7 | 7 | ||
8 | REM ---la chaine FIN TEST est trouvee , la tests suite est achevee , chercher si la chaine FAILED existe | 8 | REM ---la chaine FIN TEST est trouvee , la tests suite est achevee , chercher si la chaine FAILED existe |
9 | call :suite %1 | 9 | call :suite %1 |
10 | 10 | ||
11 | ) else ( | 11 | ) else ( |
12 | 12 | ||
13 | if %errorlevel% == 1 ( | 13 | if %errorlevel% == 1 ( |
14 | REM ---chaine FIN TEST pas trouvee , la test suite pas terminee | 14 | REM ---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 | ||
20 | goto fin | 20 | goto 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 ( |
26 | REM ---la chaine FAILED est trouvee , la test suite est incorrecte | 26 | REM ---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 ( |
30 | REM la chaine FAILED n est pas trouvee , la test suite est correcte | 30 | REM la chaine FAILED n est pas trouvee , la test suite est correcte |
31 | echo %1 TEST SUITE *** PASSED *** >> %envq_qualif%\log\%envq_ver%\%1.log | 31 | echo %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 | ||
3 | REM --- supprime tous les fichiers log des batteries de tests sous le répertoire log\version scilab | 3 | REM --- supprime tous les fichiers log des batteries de tests sous le répertoire log\version scilab |
4 | 4 | ||
5 | if "%1"=="--help" goto aide | 5 | if "%1"=="--help" goto aide |
6 | if "%1"=="" goto saisie | 6 | if "%1"=="" goto saisie |
7 | 7 | ||
8 | :encore | 8 | :encore |
9 | if "%1"=="" goto the_end | 9 | if "%1"=="" goto the_end |
10 | erase /s /q %envq_qualif%\log\%envq_ver%\%1.log | 10 | erase /s /q %envq_qualif%\log\%envq_ver%\%1.log |
11 | REM if %errorlevel% leq 1 echo delete %1.log ... | 11 | REM if %errorlevel% leq 1 echo delete %1.log ... |
12 | shift | 12 | shift |
13 | goto encore | 13 | goto encore |
14 | 14 | ||
15 | goto the_end | 15 | goto the_end |
16 | 16 | ||
17 | :saisie | 17 | :saisie |
18 | 18 | ||
19 | goto the_end | 19 | goto the_end |
20 | 20 | ||
21 | :aide | 21 | :aide |
22 | echo - | 22 | echo - |
23 | echo // CLEARLOG | 23 | echo // CLEARLOG |
24 | echo // Supprime un, plusieurs ou tous les fichiers log des batteries de tests du repertoire log\version scilab : | 24 | echo // Supprime un, plusieurs ou tous les fichiers log des batteries de tests du repertoire log\version scilab : |
25 | echo // | 25 | echo // |
26 | echo // - toutes les tests_suites faire : clearlog * | 26 | echo // - toutes les tests_suites faire : clearlog * |
27 | echo // - certaines tests_suites faire : clearlog nonreg* tests_20?? scicos | 27 | echo // - certaines tests_suites faire : clearlog nonreg* tests_20?? scicos |
28 | echo // - une tests-suite particuliere : clearlog nonreg_2-7-1 | 28 | echo // - une tests-suite particuliere : clearlog nonreg_2-7-1 |
29 | echo // | 29 | echo // |
30 | echo // | 30 | echo // |
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 | ||
3 | REM --- supprime une, plusieurs ou toutesles batteries de tests du reperoire work local | 3 | REM --- supprime une, plusieurs ou toutesles batteries de tests du reperoire work local |
4 | 4 | ||
5 | if "%1"=="--help" goto aide | 5 | if "%1"=="--help" goto aide |
6 | 6 | ||
7 | 7 | ||
8 | REM --- LIST : paramètre constitué de la liste de tests-suites demandées | 8 | REM --- LIST : paramètre constitué de la liste de tests-suites demandées |
9 | set LIST= | 9 | set LIST= |
10 | 10 | ||
11 | :continue | 11 | :continue |
12 | if "%1"=="" goto lancer_une | 12 | if "%1"=="" goto lancer_une |
13 | 13 | ||
14 | for /D %%j in (%envq_qualif%\work\%1) do set LIST=!LIST! %%~nj | 14 | for /D %%j in (%envq_qualif%\work\%1) do set LIST=!LIST! %%~nj |
15 | shift | 15 | shift |
16 | goto continue | 16 | goto continue |
17 | 17 | ||
18 | REM --- lancer chaque tests-suite une par une | 18 | REM --- lancer chaque tests-suite une par une |
19 | :lancer_une | 19 | :lancer_une |
20 | echo liste des tests-suites :%LIST% | 20 | echo liste des tests-suites :%LIST% |
21 | echo ------------------------ | 21 | echo ------------------------ |
22 | 22 | ||
23 | for %%i in (%LIST%) do echo delete %%i ... & rmdir /s /q %envq_qualif%\work\%%i | 23 | for %%i in (%LIST%) do echo delete %%i ... & rmdir /s /q %envq_qualif%\work\%%i |
24 | 24 | ||
25 | goto the_end | 25 | goto the_end |
26 | 26 | ||
27 | :aide | 27 | :aide |
28 | echo // | 28 | echo // |
29 | echo // CLEARWORK | 29 | echo // CLEARWORK |
30 | echo // Supprime une, plusieurs ou toutesles batteries de tests sous le repertoire work : | 30 | echo // Supprime une, plusieurs ou toutesles batteries de tests sous le repertoire work : |
31 | echo // | 31 | echo // |
32 | echo // - toutes les tests_suites faire : clearwork * | 32 | echo // - toutes les tests_suites faire : clearwork * |
33 | echo // - certaines tests_suites faire : clearwork nonreg* tests_20?? scicos | 33 | echo // - certaines tests_suites faire : clearwork nonreg* tests_20?? scicos |
34 | echo // - une tests-suite particuliere : clearwork nonreg_2-7-1 | 34 | echo // - une tests-suite particuliere : clearwork nonreg_2-7-1 |
35 | echo // | 35 | echo // |
36 | echo // | 36 | echo // |
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 | ||
3 | rem if not "%os%"=="Windows_NT" goto NextStep | 3 | rem if not "%os%"=="Windows_NT" goto NextStep |
4 | REM --- Section spécifique à Windows NT --- | 4 | REM --- Section spécifique à Windows NT --- |
5 | rem color 0F | 5 | rem color 0F |
6 | rem :NextStep | 6 | rem :NextStep |
7 | if "%1"=="--help" goto aide | 7 | if "%1"=="--help" goto aide |
8 | 8 | ||
9 | if exist %envq_qualif%\log\copyftp.log erase %envq_qualif%\log\copyftp.log | 9 | if exist %envq_qualif%\log\copyftp.log erase %envq_qualif%\log\copyftp.log |
10 | 10 | ||
11 | :encore | 11 | :encore |
12 | if "%1"=="" goto the_end | 12 | if "%1"=="" goto the_end |
13 | echo copy de %1 ... | 13 | echo copy de %1 ... |
14 | ncftpget -R -d %envq_qualif%\log\copyftp.log -u qualif -p qualifpwd frioul.inria.fr %envq_qualif%\work tests_suite/%1 | 14 | ncftpget -R -d %envq_qualif%\log\copyftp.log -u qualif -p qualifpwd frioul.inria.fr %envq_qualif%\work tests_suite/%1 |
15 | shift | 15 | shift |
16 | goto encore | 16 | goto encore |
17 | 17 | ||
18 | rem for /F %%i in ('dir /A:A /O:S /B') do call :action1 %%i | 18 | rem for /F %%i in ('dir /A:A /O:S /B') do call :action1 %%i |
19 | 19 | ||
20 | goto the_end | 20 | goto the_end |
21 | 21 | ||
22 | :aide | 22 | :aide |
23 | echo // | 23 | echo // |
24 | echo // COPYFTP | 24 | echo // COPYFTP |
25 | echo // Copie a partir du serveur via ftp (ncftpget) dans le repertoire Work local de l'environnement de qualification Scilab (les meta-caracteres sont acceptes) : | 25 | echo // Copie a partir du serveur via ftp (ncftpget) dans le repertoire Work local de l'environnement de qualification Scilab (les meta-caracteres sont acceptes) : |
26 | echo // | 26 | echo // |
27 | echo // - toutes les tests_suites faire : copyftp * | 27 | echo // - toutes les tests_suites faire : copyftp * |
28 | echo // - certaines tests_suites faire : copyftp nonreg* tests_20?? scicos | 28 | echo // - certaines tests_suites faire : copyftp nonreg* tests_20?? scicos |
29 | echo // - une tests-suite particuliere : copyftp nonreg_2-7-1 | 29 | echo // - une tests-suite particuliere : copyftp nonreg_2-7-1 |
30 | echo // | 30 | echo // |
31 | echo // | 31 | echo // |
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 |
2 | if "%1"=="" goto aide | 2 | if "%1"=="" goto aide |
3 | 3 | ||
4 | set MYLIST= | 4 | set MYLIST= |
5 | 5 | ||
6 | :continue | 6 | :continue |
7 | if "%1"=="" goto suite | 7 | if "%1"=="" goto suite |
8 | set MYLIST=%MYLIST% %1 | 8 | set MYLIST=%MYLIST% %1 |
9 | shift | 9 | shift |
10 | goto continue | 10 | goto continue |
11 | 11 | ||
12 | :suite | 12 | :suite |
13 | call copyftp %MYLIST% | 13 | call copyftp %MYLIST% |
14 | call runtest %MYLIST% | 14 | call runtest %MYLIST% |
15 | 15 | ||
16 | goto the_end | 16 | goto the_end |
17 | 17 | ||
18 | :aide | 18 | :aide |
19 | echo // | 19 | echo // |
20 | echo // COPYRUN | 20 | echo // COPYRUN |
21 | echo // Copie puis execute une ou plusieurs batteries de tests dans l'environnement de qualification Scilab (les meta-caracteres sont acceptes) : | 21 | echo // Copie puis execute une ou plusieurs batteries de tests dans l'environnement de qualification Scilab (les meta-caracteres sont acceptes) : |
22 | echo // | 22 | echo // |
23 | echo // copyrun tests_suite [tests_suite] | 23 | echo // copyrun tests_suite [tests_suite] |
24 | echo // copyrun * | 24 | echo // copyrun * |
25 | echo // copyrun n* sc?cos autre | 25 | echo // copyrun n* sc?cos autre |
26 | echo // | 26 | echo // |
27 | echo // | 27 | echo // |
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 | ||
3 | REM --- création de la variable d'environnement version de scilab et du repertoire log | 3 | REM --- création de la variable d'environnement version de scilab et du repertoire log |
4 | set envq_ver=scilab-2.7.2 | 4 | set envq_ver=scilab-2.7.2 |
5 | 5 | ||
6 | set envq_qualif=e:\qualif | 6 | set envq_qualif=e:\qualif |
7 | REM set envq_proc=e:\qualif\proc | 7 | REM set envq_proc=e:\qualif\proc |
8 | REM set envq_work=e:\qualif\work | 8 | REM set envq_work=e:\qualif\work |
9 | REM set envq_log=e:\qualif\log | 9 | REM set envq_log=e:\qualif\log |
10 | 10 | ||
11 | REM --- ajout dans le path du chemin d'installation de la version de scilab a qualifier et du repertoire ou sont installees les procedures necessaires | 11 | REM --- ajout dans le path du chemin d'installation de la version de scilab a qualifier et du repertoire ou sont installees les procedures necessaires |
12 | PATH=%PATH%;%ProgramFiles%\%envq_ver%\bin;%envq_qualif%\proc | 12 | PATH=%PATH%;%ProgramFiles%\%envq_ver%\bin;%envq_qualif%\proc |
13 | 13 | ||
14 | 14 | ||
15 | REM --- création du repertoire version sous le repertoire log | 15 | REM --- création du repertoire version sous le repertoire log |
16 | if not exist %envq_qualif%\log\%envq_ver% mkdir %envq_qualif%\log\%envq_ver% | 16 | if 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 @@ | |||
1 | function tests_suite_up_to_date=find_tests_suite_up_to_date(directory) | 1 | function 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="" |
6 | tests_suite = [] | 6 | tests_suite = [] |
7 | select directory | 7 | select 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 |
54 | tests_suite_up_to_date=sort(tests_suite) | 54 | tests_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 |
57 | endfunction | 57 | endfunction |
58 | 58 | ||
59 | 59 | ||
60 | //====================================================================================================================== | 60 | //====================================================================================================================== |
61 | 61 | ||
62 | 62 | ||
63 | function affich_message (graph_affich, texte) | 63 | function affich_message (graph_affich, texte) |
64 | if graph_affich then | 64 | if 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 |
66 | x_message(texte) | 66 | x_message(texte) |
67 | else | 67 | else |
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 |
69 | disp(texte) | 69 | disp(texte) |
70 | end // du if | 70 | end // du if |
71 | endfunction | 71 | endfunction |
72 | 72 | ||
73 | 73 | ||
74 | //====================================================================================================================== | 74 | //====================================================================================================================== |
75 | 75 | ||
76 | 76 | ||
77 | function tests_suite_selected=graph_select_tests_suite(command, tests_suite) | 77 | function 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 |
98 | endfunction | 98 | endfunction |
99 | 99 | ||
100 | 100 | ||
101 | //====================================================================================================================== | 101 | //====================================================================================================================== |
102 | 102 | ||
103 | 103 | ||
104 | function tests_suite_selected=input_select_tests_suite(tests_suite) | 104 | function 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 |
115 | endfunction | 115 | endfunction |
116 | 116 | ||
117 | 117 | ||
118 | //====================================================================================================================== | 118 | //====================================================================================================================== |
119 | 119 | ||
120 | 120 | ||
121 | function graph_cmd(command,directory) | 121 | function graph_cmd(command,directory) |
122 | available_tests_suite=find_tests_suite_up_to_date(directory) | 122 | available_tests_suite=find_tests_suite_up_to_date(directory) |
123 | //disp (" toto") | 123 | //disp (" toto") |
124 | //pause | 124 | //pause |
125 | if isempty(available_tests_suite) then | 125 | if isempty(available_tests_suite) then |
126 | affich_message (%t, "***** No tests_suite available *****") | 126 | affich_message (%t, "***** No tests_suite available *****") |
127 | else | 127 | else |
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 |
139 | end // du if | 139 | end // du if |
140 | endfunction | 140 | endfunction |
141 | 141 | ||
142 | 142 | ||
143 | //====================================================================================================================== | 143 | //====================================================================================================================== |
144 | 144 | ||
145 | 145 | ||
146 | function prompt_cmd(command,param_command,directory) | 146 | function 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 |
174 | end // du if | 174 | end // du if |
175 | endfunction | 175 | endfunction |
176 | 176 | ||
177 | 177 | ||
178 | 178 | ||
179 | //====================================================================================================================== | 179 | //====================================================================================================================== |
180 | 180 | ||
181 | 181 | ||
182 | function tests_suite_without_wildcard = no_wildcard (tests_suite, directory) | 182 | function tests_suite_without_wildcard = no_wildcard (tests_suite, directory) |
183 | if ~isempty(grep(tests_suite,'*')) then | 183 | if ~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] |
196 | end // du if | 196 | end // du if |
197 | tests_suite_without_wildcard=sort(tests_suite) | 197 | tests_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 |
200 | endfunction | 200 | endfunction |
201 | 201 | ||
202 | 202 | ||
203 | //====================================================================================================================== | 203 | //====================================================================================================================== |
204 | 204 | ||
205 | 205 | ||
206 | function tests_suite_is_directory = only_directory (tests_suite, directory) | 206 | function 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 |
208 | the_list=[] | 208 | the_list=[] |
209 | for i=1:size(tests_suite,"*") | 209 | for 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 |
215 | end // du for | 215 | end // du for |
216 | tests_suite_is_directory=the_list | 216 | tests_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 |
219 | endfunction | 219 | endfunction |
220 | 220 | ||
221 | 221 | ||
222 | //====================================================================================================================== | 222 | //====================================================================================================================== |
223 | 223 | ||
224 | 224 | ||
225 | function exec_cmd(command, directory, tests_suite_selected) | 225 | function 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 | ||
234 | rep=strcat(tests_suite_selected," ") | 234 | rep=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 |
258 | temp=read(envq_proc+"template_run_qualif_cmd.bat",-1,1,'(a)') | 258 | temp=read(envq_proc+"template_run_qualif_cmd.bat",-1,1,'(a)') |
259 | temp(3)="call " + os_cmd(sci2exp(MSDOS))(command)+rep | 259 | temp(3)="call " + os_cmd(sci2exp(MSDOS))(command)+rep |
260 | write(envq_proc+"run_qualif_cmd.bat",temp) | 260 | write(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 |
262 | unix_g("start %SystemRoot%\system32\cmd.exe /e:on /v:on /K %envq_qualif%\proc\run_qualif_cmd.bat") | 262 | unix_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 |
273 | endfunction | 273 | endfunction |
274 | 274 | ||
275 | 275 | ||
276 | //====================================================================================================================== | 276 | //====================================================================================================================== |
277 | 277 | ||
278 | 278 | ||
279 | function affich_date | 279 | function affich_date |
280 | w=getdate() | 280 | w=getdate() |
281 | disp(date() + " "+string(w(7))+" h. "+string(w(8))+" mn. "+string(w(9))+" s. ") | 281 | disp(date() + " "+string(w(7))+" h. "+string(w(8))+" mn. "+string(w(9))+" s. ") |
282 | endfunction | 282 | endfunction |
283 | 283 | ||
284 | 284 | ||
285 | //====================================================================================================================== | 285 | //====================================================================================================================== |
286 | 286 | ||
287 | 287 | ||
288 | function affich_result(correct, num) | 288 | function 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 |
296 | endfunction | 296 | endfunction |
297 | 297 | ||
298 | function my_mat = list2mat (my_list) | 298 | function my_mat = list2mat (my_list) |
299 | my_mat = [''] | 299 | my_mat = [''] |
300 | //for k=1:size(my_list,"*") | 300 | //for k=1:size(my_list,"*") |
301 | for k=1:size(my_list) | 301 | for k=1:size(my_list) |
302 | my_mat (k) = my_list(k) | 302 | my_mat (k) = my_list(k) |
303 | end | 303 | end |
304 | endfunction | 304 | endfunction |
305 | 305 | ||
306 | 306 | ||
307 | //====================================================================================================================== | 307 | //====================================================================================================================== |
308 | 308 | ||
309 | 309 | ||
310 | function mat_rep = sel_rep(my_mat) | 310 | function mat_rep = sel_rep(my_mat) |
311 | mat_rep = [''] | 311 | mat_rep = [''] |
312 | // cas d'une liste | 312 | // cas d'une liste |
313 | mat_rep = '' | 313 | mat_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 |
322 | endfunction | 322 | endfunction |
323 | 323 | ||
324 | 324 | ||
325 | //====================================================================================================================== | 325 | //====================================================================================================================== |
326 | 326 | ||
327 | 327 | ||
328 | function copyftp(param) | 328 | function copyftp(param) |
329 | if argn(2)==0 then | 329 | if argn(2)==0 then |
330 | param = [] | 330 | param = [] |
331 | end // du if | 331 | end // du if |
332 | prompt_cmd("copyftp",param,envq_log) | 332 | prompt_cmd("copyftp",param,envq_log) |
333 | endfunction | 333 | endfunction |
334 | 334 | ||
335 | 335 | ||
336 | //====================================================================================================================== | 336 | //====================================================================================================================== |
337 | 337 | ||
338 | 338 | ||
339 | function test (str) | 339 | function test (str) |
340 | a=[] | 340 | a=[] |
341 | interv=strindex(str," ") | 341 | interv=strindex(str," ") |
342 | debut=1 | 342 | debut=1 |
343 | for i=1:length(interv) | 343 | for 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 |
346 | end | 346 | end |
347 | a=[a;part(str,[debut:length(str)])] | 347 | a=[a;part(str,[debut:length(str)])] |
348 | disp (a) | 348 | disp (a) |
349 | endfunction | 349 | endfunction |
350 | 350 | ||
351 | 351 | ||
352 | //====================================================================================================================== | 352 | //====================================================================================================================== |
353 | 353 | ||
354 | 354 | ||
355 | function clearwork (param) | 355 | function clearwork (param) |
356 | if argn(2)==0 then | 356 | if argn(2)==0 then |
357 | param = [] | 357 | param = [] |
358 | end // du if | 358 | end // du if |
359 | prompt_cmd("clearwork",param,envq_work) | 359 | prompt_cmd("clearwork",param,envq_work) |
360 | endfunction | 360 | endfunction |
361 | 361 | ||
362 | 362 | ||
363 | //====================================================================================================================== | 363 | //====================================================================================================================== |
364 | 364 | ||
365 | 365 | ||
366 | function clearlog (param) | 366 | function clearlog (param) |
367 | if argn(2)==0 then | 367 | if argn(2)==0 then |
368 | param = [] | 368 | param = [] |
369 | end // du if | 369 | end // du if |
370 | prompt_cmd("clearlog",param,envq_log+envq_ver+"\") | 370 | prompt_cmd("clearlog",param,envq_log+envq_ver+"\") |
371 | endfunction | 371 | endfunction |
372 | 372 | ||
373 | 373 | ||
374 | //====================================================================================================================== | 374 | //====================================================================================================================== |
375 | 375 | ||
376 | 376 | ||
377 | function runtest(param) | 377 | function runtest(param) |
378 | if argn(2)==0 then | 378 | if argn(2)==0 then |
379 | param = [] | 379 | param = [] |
380 | end // du if | 380 | end // du if |
381 | prompt_cmd("runtest",param,envq_work) | 381 | prompt_cmd("runtest",param,envq_work) |
382 | endfunction | 382 | endfunction |
383 | 383 | ||
384 | 384 | ||
385 | //====================================================================================================================== | 385 | //====================================================================================================================== |
386 | 386 | ||
387 | 387 | ||
388 | function showlog (my_cmd) | 388 | function 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 |
404 | endfunction | 404 | endfunction |
405 | 405 | ||
406 | 406 | ||
407 | //====================================================================================================================== | 407 | //====================================================================================================================== |
408 | 408 | ||
409 | 409 | ||
410 | function dirlog (my_cmd) | 410 | function dirlog (my_cmd) |
411 | if argn(2)==0 then | 411 | if argn(2)==0 then |
412 | param = [] | 412 | param = [] |
413 | end // du if | 413 | end // du if |
414 | prompt_cmd("clearlog",param,envq_log+envq_ver) | 414 | prompt_cmd("clearlog",param,envq_log+envq_ver) |
415 | endfunction | 415 | endfunction |
416 | 416 | ||
417 | 417 | ||
418 | //====================================================================================================================== | 418 | //====================================================================================================================== |
419 | 419 | ||
420 | 420 | ||
421 | function dirwork (my_cmd) | 421 | function 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 |
439 | endfunction | 439 | endfunction |
440 | 440 | ||
441 | 441 | ||
442 | //====================================================================================================================== | 442 | //====================================================================================================================== |
443 | 443 | ||
444 | 444 | ||
445 | function copyrun(param) | 445 | function copyrun(param) |
446 | if argn(2)==0 then | 446 | if argn(2)==0 then |
447 | copyftp() | 447 | copyftp() |
448 | runtest() | 448 | runtest() |
449 | else | 449 | else |
450 | copyftp (param) | 450 | copyftp (param) |
451 | runtest (""""+param+"""") | 451 | runtest (""""+param+"""") |
452 | end | 452 | end |
453 | endfunction | 453 | endfunction |
454 | 454 | ||
455 | 455 | ||
456 | //====================================================================================================================== | 456 | //====================================================================================================================== |
457 | 457 | ||
458 | 458 | ||
459 | function runtestXXXXXXXXXXX(tout) | 459 | function runtestXXXXXXXXXXX(tout) |
460 | 460 | ||
461 | if argn(2)==0 then | 461 | if 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 " " |
469 | else | 469 | else |
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 | ||
477 | my_list=tokens(tout," ") | 477 | my_list=tokens(tout," ") |
478 | 478 | ||
479 | //pause | 479 | //pause |
480 | 480 | ||
481 | // exemple : displist(["autre?ep";"n*"]) | 481 | // exemple : displist(["autre?ep";"n*"]) |
482 | ierr=0 | 482 | ierr=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 |
485 | the_list=[] | 485 | the_list=[] |
486 | //for i=1:size(my_list) | 486 | //for i=1:size(my_list) |
487 | for i=1:size(my_list,"*") | 487 | for 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 |
494 | end // du for | 494 | end // du for |
495 | 495 | ||
496 | //disp("ici") | 496 | //disp("ici") |
497 | //pause | 497 | //pause |
498 | 498 | ||
499 | 499 | ||
500 | the_list2=[] | 500 | the_list2=[] |
501 | for i=1:size(the_list,"*") | 501 | for 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 |
505 | end // du for | 505 | end // du for |
506 | 506 | ||
507 | //disp("là") | 507 | //disp("là") |
508 | //pause | 508 | //pause |
509 | 509 | ||
510 | for k=1:size(the_list2,"*") | 510 | for 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") |
532 | unix_w ("type "+envq_log+envq_ver+"\test_en_cours.txt >> "+envq_log+envq_ver+"\"+bibi+".txt") | 532 | unix_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))) |
538 | end // du for | 538 | end // du for |
539 | 539 | ||
540 | end | 540 | end |
541 | endfunction | 541 | endfunction |
542 | 542 | ||
543 | 543 | ||
544 | //====================================================================================================================== | 544 | //====================================================================================================================== |
545 | 545 | ||
546 | 546 | ||
547 | function aide(varargin) | 547 | function 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 |
568 | endfunction | 568 | endfunction |
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 @@ | |||
1 | function tests_suite_selected=select_tests_suite(directory) | 1 | function 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 |
7 | select directory | 7 | select 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 |
26 | tests_suite=sort(tests_suite) | 26 | tests_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 |
30 | the_list=list() | 30 | the_list=list() |
31 | for i=1:size(tests_suite,"*") | 31 | for i=1:size(tests_suite,"*") |
32 | the_list($+1)=list(tests_suite(i),1,['Non','Oui']) | 32 | the_list($+1)=list(tests_suite(i),1,['Non','Oui']) |
33 | end // du for | 33 | end // du for |
34 | rep=x_choices('Tests Suite Selection Menu',the_list); | 34 | rep=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 |
37 | tests_suite_selected="" | 37 | tests_suite_selected="" |
38 | for i=1:size(tests_suite,"*") | 38 | for 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 |
42 | end // du for | 42 | end // du for |
43 | 43 | ||
44 | endfunction | 44 | endfunction |
45 | 45 | ||
46 | 46 | ||
47 | function affich_date | 47 | function affich_date |
48 | w=getdate() | 48 | w=getdate() |
49 | disp(date() + " "+string(w(7))+" h. "+string(w(8))+" mn. "+string(w(9))+" s. ") | 49 | disp(date() + " "+string(w(7))+" h. "+string(w(8))+" mn. "+string(w(9))+" s. ") |
50 | endfunction | 50 | endfunction |
51 | 51 | ||
52 | 52 | ||
53 | function affich_result(pasOK, num) | 53 | function 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 |
62 | endfunction | 62 | endfunction |
63 | 63 | ||
64 | function my_mat = list2mat (my_list) | 64 | function my_mat = list2mat (my_list) |
65 | my_mat = [''] | 65 | my_mat = [''] |
66 | //for k=1:size(my_list,"*") | 66 | //for k=1:size(my_list,"*") |
67 | for k=1:size(my_list) | 67 | for k=1:size(my_list) |
68 | my_mat (k) = my_list(k) | 68 | my_mat (k) = my_list(k) |
69 | end | 69 | end |
70 | endfunction | 70 | endfunction |
71 | 71 | ||
72 | 72 | ||
73 | function mat_rep = sel_rep(my_mat) | 73 | function mat_rep = sel_rep(my_mat) |
74 | mat_rep = [''] | 74 | mat_rep = [''] |
75 | // cas d'une liste | 75 | // cas d'une liste |
76 | mat_rep = '' | 76 | mat_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 |
85 | endfunction | 85 | endfunction |
86 | 86 | ||
87 | function copyftp(my_cmd) | 87 | function 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©ftp.bat "+my_cmd) | 98 | unix_w (envq_proc+"init_qualif.bat©ftp.bat "+my_cmd) |
99 | end | 99 | end |
100 | end | 100 | end |
101 | endfunction | 101 | endfunction |
102 | 102 | ||
103 | function ierr=runtest22(varargin) | 103 | function 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 |
105 | ierr=0 | 105 | ierr=0 |
106 | chdir (envq_work) | 106 | chdir (envq_work) |
107 | disp(varargin) | 107 | disp(varargin) |
108 | // ts_work = list2mat (varargin) | 108 | // ts_work = list2mat (varargin) |
109 | ts_work = varargin | 109 | ts_work = varargin |
110 | disp (typeof(ts_work)) | 110 | disp (typeof(ts_work)) |
111 | disp (ts_work) | 111 | disp (ts_work) |
112 | pause | 112 | pause |
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 |
151 | disp (" je suis là") | 151 | disp (" je suis là") |
152 | pause | 152 | pause |
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 |
164 | disp("----") | 164 | disp("----") |
165 | 165 | ||
166 | ts_work = sel_rep(ts_work) | 166 | ts_work = sel_rep(ts_work) |
167 | disp ("ts_work : "+ts_work) | 167 | disp ("ts_work : "+ts_work) |
168 | disp("type : "+typeof(ts_work)) | 168 | disp("type : "+typeof(ts_work)) |
169 | pause | 169 | pause |
170 | 170 | ||
171 | //if ts_work == [''] then | 171 | //if ts_work == [''] then |
172 | if ts_work == '' then | 172 | if 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") |
178 | else | 178 | else |
179 | disp ("pas ici") | 179 | disp ("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 |
194 | end | 194 | end |
195 | endfunction | 195 | endfunction |
196 | 196 | ||
197 | 197 | ||
198 | function displist (tout) | 198 | function displist (tout) |
199 | 199 | ||
200 | // exemple : displist(["autre?ep";"n*"]) | 200 | // exemple : displist(["autre?ep";"n*"]) |
201 | ierr=0 | 201 | ierr=0 |
202 | //tout = ["autrerep","hif","n*"] | 202 | //tout = ["autrerep","hif","n*"] |
203 | the_list=[] | 203 | the_list=[] |
204 | for i=1:size(tout,"*") | 204 | for 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 |
211 | end // du for | 211 | end // du for |
212 | 212 | ||
213 | //pause | 213 | //pause |
214 | 214 | ||
215 | the_list2=[] | 215 | the_list2=[] |
216 | for i=1:size(the_list,"*") | 216 | for 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 |
220 | end // du for | 220 | end // du for |
221 | 221 | ||
222 | // pause | 222 | // pause |
223 | 223 | ||
224 | for k=1:size(the_list2,"*") | 224 | for 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))) |
237 | end // du for | 237 | end // du for |
238 | 238 | ||
239 | 239 | ||
240 | endfunction | 240 | endfunction |
241 | 241 | ||
242 | 242 | ||
243 | function rruntest(varargin) | 243 | function rruntest(varargin) |
244 | 244 | ||
245 | if argn(2)==0 then | 245 | if 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 " " |
252 | else | 252 | else |
253 | 253 | ||
254 | disp (length(varargin)) | 254 | disp (length(varargin)) |
255 | 255 | ||
256 | for i=1:length(varargin) | 256 | for i=1:length(varargin) |
257 | disp (varargin(i)) | 257 | disp (varargin(i)) |
258 | end // du for | 258 | end // du for |
259 | 259 | ||
260 | my_list=varargin | 260 | my_list=varargin |
261 | 261 | ||
262 | pause | 262 | pause |
263 | 263 | ||
264 | // exemple : displist(["autre?ep";"n*"]) | 264 | // exemple : displist(["autre?ep";"n*"]) |
265 | ierr=0 | 265 | ierr=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 |
268 | the_list=[] | 268 | the_list=[] |
269 | for i=1:size(my_list) | 269 | for 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 |
277 | end // du for | 277 | end // du for |
278 | 278 | ||
279 | disp("ici") | 279 | disp("ici") |
280 | pause | 280 | pause |
281 | 281 | ||
282 | 282 | ||
283 | the_list2=[] | 283 | the_list2=[] |
284 | for i=1:size(the_list,"*") | 284 | for 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 |
288 | end // du for | 288 | end // du for |
289 | 289 | ||
290 | disp("là") | 290 | disp("là") |
291 | pause | 291 | pause |
292 | 292 | ||
293 | for k=1:size(the_list2,"*") | 293 | for 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))) |
306 | end // du for | 306 | end // du for |
307 | 307 | ||
308 | end | 308 | end |
309 | endfunction | 309 | endfunction |
310 | 310 | ||
311 | function test (str) | 311 | function test (str) |
312 | a=[] | 312 | a=[] |
313 | interv=strindex(str," ") | 313 | interv=strindex(str," ") |
314 | debut=1 | 314 | debut=1 |
315 | for i=1:length(interv) | 315 | for 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 |
318 | end | 318 | end |
319 | a=[a;part(str,[debut:length(str)])] | 319 | a=[a;part(str,[debut:length(str)])] |
320 | disp (a) | 320 | disp (a) |
321 | 321 | ||
322 | pause | 322 | pause |
323 | 323 | ||
324 | endfunction | 324 | endfunction |
325 | 325 | ||
326 | function clearwork (my_cmd) | 326 | function 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) |
339 | else | 339 | else |
340 | unix_w ("clearwork" +my_cmd) | 340 | unix_w ("clearwork" +my_cmd) |
341 | end | 341 | end |
342 | end | 342 | end |
343 | endfunction | 343 | endfunction |
344 | 344 | ||
345 | function clearlog (my_cmd) | 345 | function 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 |
361 | endfunction | 361 | endfunction |
362 | 362 | ||
363 | function showlog (my_cmd) | 363 | function 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 |
379 | endfunction | 379 | endfunction |
380 | 380 | ||
381 | 381 | ||
382 | function dirlog (my_cmd) | 382 | function 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) |