Skip to content

Commit 48403dd

Browse files
committed
test suite
1 parent c4c317b commit 48403dd

File tree

4 files changed

+12
-29
lines changed

4 files changed

+12
-29
lines changed

script/testga.ijs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ ECHOFILENAME=: 1 NB. echo file name
1515
stdout LF ,~ 9!:14''
1616

1717
ddall=: ddall -. blacklist=: blacklist, ('OpenBSD'-:UNAME)#(<testpath),each <'gstack.ijs' NB. temporarily disable
18-
NB. ddall=: ddall -. blacklist=: blacklist, ('FreeBSD'-:UNAME)#(<testpath),each 'gtdot.ijs';'gtdot1.ijs';'gtdot2.ijs';'gtdot3.ijs';'g13x.ijs';'g7x.ijs' NB. temporarily disable
1918
ddall=: ddall -. blacklist=: blacklist, ('OpenBSD'-:UNAME)#(<testpath),each 'gtdot.ijs';'gtdot3.ijs';'gtdot4.ijs' NB. temporarily disable
20-
ddall=: ~. ddall ,~ (IF64*.(<UNAME)e.'Win';'Darwin')#(<testpath),each <'gcip1.ijs'
19+
ddall=: ~. ddall ,~ (IF64*.(<UNAME)e.<'Win')#(<testpath),each <'gcip1.ijs'
2120
ddall=: ~. ddall ,~ ((<UNAME)e.'Win';'Darwin')#(<testpath),each <'glapack.ijs'
2221

2322
NB. smoke test

test/gtdot3.ijs

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ assert. remote_stuff=3
4545
)
4646

4747
f =: 3 : 0
48-
chk=. ('FreeBSD'-:UNAME)
4948
granularity=. 2e_13
5049
try.
5150
while. 2 > 1 T. '' do. 0 T. '' end. NB. make sure we have 2 worker threads
@@ -58,9 +57,9 @@ assert. 2 <: 1 T. ''
5857
NB. verify that tasks go to different threads if possible. We can ensure this only for as many threads as there are cores
5958
setth nwthreads=. 1 >. <: 0 { 8 T. '' NB. one worker thread per core, -1
6059
wthr nwthreads
61-
assert. (0[GITHUBCI) +. (>: i. nwthreads) *./@e. aaa__ =: > (3&T.@'')@(6!:3) t.'' "(0) (0.1 #~ <:nwthreads), 0.6
60+
assert. (>: i. nwthreads) *./@e. aaa__ =: > (3&T.@'')@(6!:3) t.'' "(0) (0.1 #~ <:nwthreads), 0.6
6261
wthr nwthreads
63-
assert. (0[GITHUBCI) +. (>: i. nwthreads) *./@e. > (3&T.@'')@(6!:3) t.'' "(0) (0.6 #~ <:nwthreads), 0.1
62+
assert. (>: i. nwthreads) *./@e. > (3&T.@'')@(6!:3) t.'' "(0) (0.6 #~ <:nwthreads), 0.1
6463
wthr nwthreads
6564
assert. (ccc__ =: ((<_1000) #~ <: nwthreads),(>: i. nwthreads);_1001) e.~&> bbb__ =: 4 T. aaa__ =: (3&T.@'')@(6!:3) t.'' "(0) (0.3 #~ <: nwthreads), 2 1 NB. last thread should run in master; earlier ones complete first
6665
wthr nwthreads
@@ -72,38 +71,30 @@ pyx =. 6!:3 t. ''"0 N # 1.0 NB. fill up with delaying threads
7271
NB. Verify forcetask arg
7372
t0 =. 6!:1''
7473
assert. 1. = >pyx
75-
techo^:chk 'gtdot3 a13'
7674
NB. Verify forcetask arg
7775
NB. assert. (t0 + 0.5) < 6!:1'' [ 'a1' NB. master should not wait
78-
techo^:chk 'gtdot3 a13a'
7976
wthr nwthreads
80-
techo^:chk 'gtdot3 a13b'
8177
pyx =. 6!:3 t. ''"0 (>:N) # 1.0 NB. fill up with delaying threads
82-
techo^:chk 'gtdot3 a13c'
8378
t0 =. 6!:1''
8479
assert. 1. = >pyx
8580
NB. assert. (t0 + 0.5) > 6!:1'' [ 'a2' NB. master should wait
8681
wthr nwthreads
8782
pyx =. 6!:3 t. 'worker'"0 (>:N) # 1.0 NB. fill up with delaying threads
88-
techo^:chk 'gtdot3 a13d'
8983
t0 =. 6!:1''
9084
assert. 1. = >pyx
9185
NB. assert. (t0 + 0.5) < 6!:1'' [ 'a3' NB. master should not wait
9286
wthr nwthreads
9387
pyx =. 6!:3 t. (<'worker') "0 (>:N) # 1.0 NB. fill up with delaying threads
94-
techo^:chk 'gtdot3 a13e'
9588
t0 =. 6!:1''
9689
assert. 1. = >pyx
9790
NB. assert. (t0 + 0.5) < 6!:1'' [ 'a4' NB. master should not wait
9891
wthr nwthreads
9992
pyx =. 6!:3 t. (<'worker';1) "0 (>:N) # 1.0 NB. fill up with delaying threads
100-
techo^:chk 'gtdot3 a13f'
10193
t0 =. 6!:1''
10294
assert. 1. = >pyx
10395
NB. assert. (t0 + 0.5) < 6!:1'' [ 'a5' NB. master should not wait
10496
wthr nwthreads
10597
pyx =. 6!:3 t. (<'worker';0) "0 (>:N) # 1.0 NB. fill up with delaying threads
106-
techo^:chk 'gtdot3 a13g'
10798
t0 =. 6!:1''
10899
1. = >pyx
109100
NB. assert. (t0 + 0.5) > 6!:1'' [ 'a6' NB. master should wait
@@ -123,22 +114,17 @@ mtx =. 10 T. 0
123114
assert. 0 = 11 T. mtx
124115
'domain error' -: 11 T. etx >:&.> mtx
125116
mtx =. 10 T. 0
126-
techo^:chk 'gtdot3 a32'
127117
tod =. 6!:1''
128-
techo^:chk 'gtdot3 a32a'
129118
assert. 0 = >{{11 T. y}}t.''mtx NB. boxed mtx OK
130-
techo^:chk 'gtdot3 a32b'
131119
NB. the following line hang on freebsd
132120
assert. 1 = 11 T. mtx;2.0
133-
techo^:chk 'gtdot3 a32c'
134-
assert. (0[GITHUBCI) +. (2.3 > dly) *. (2-granularity) <: dly =. tod-~6!:1'' NB. verify delay
135-
techo^:chk 'gtdot3 a32d'
121+
assert. (2.3 > dly) *. (2-granularity) <: dly =. tod-~6!:1'' NB. verify delay
136122
tod =. 6!:1''
137123
assert. 1 = 11 T. mtx;0.1
138-
assert. (0[GITHUBCI) +. (0.3 > dly) *. (0.1-granularity) <: dly =. tod-~6!:1'' NB. verify delay
124+
assert. (0.3 > dly) *. (0.1-granularity) <: dly =. tod-~6!:1'' NB. verify delay
139125
tod =. 6!:1''
140126
assert. 1 = 11 T. mtx;0
141-
assert. (0[GITHUBCI) +. (0.3 > dly) *. 0 <: dly =. tod-~6!:1'' NB. verify no delay
127+
assert. (0.3 > dly) *. 0 <: dly =. tod-~6!:1'' NB. verify no delay
142128
mtx=.10 T. 1 NB. recursive
143129
assert. 0 = 11 T. mtx
144130
assert. 0 = 11 T. mtx NB. lock count=2

test/gtdot4.ijs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ NB. Create 1 thread in pool 1; then verify that jobs in pool 1 are faster than t
1717
granularity=: 2e_13
1818
stime =: 6!:1''
1919
1 = > 6!:3 t. 0"0 ] 6 # 1
20-
(0[GITHUBCI) +. (5-granularity) < stime -~ 6!:1''
20+
(5-granularity) < stime -~ 6!:1''
2121
stime =: 6!:1''
2222
1 = > 6!:3 t. 1"0 ] 6 # 1
23-
(0[GITHUBCI) +. (5-granularity) > stime -~ 6!:1''
23+
(5-granularity) > stime -~ 6!:1''
2424
delth'' NB. clear all threadpools
2525
0 -: 2 { 2 T. 1
2626
0 -: 2 { 2 T. 0
2727
stime =: 6!:1''
2828
1 = > 6!:3 t. 0"0 ] 6 # 1
29-
(0[GITHUBCI) +. (5-granularity) < stime -~ 6!:1''
29+
(5-granularity) < stime -~ 6!:1''
3030
stime =: 6!:1''
3131
1 = > 6!:3 t. 1"0 ] 6 # 1
32-
(0[GITHUBCI) +. (5-granularity) < stime -~ 6!:1''
32+
(5-granularity) < stime -~ 6!:1''
3333

3434
4!:55 ;:'delth granularity stime'
3535

test/tsu.ijs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,15 @@ EMPTY
4646
NB. black list
4747
NB. gmbx.ijs is not an independent test
4848
NB. gfft and glapack - run separately with additional addons
49-
blacklist=: ((<testpath),each 'gmbx.ijs';'gfft.ijs';'glapack.ijs';'gcip1.ijs'),testfiles 'gmbx' NB. mapped boxed arrays no longer supported
49+
blacklist=: ((<testpath),each 'gmbx.ijs';'gfft.ijs';'glapack.ijs'),testfiles 'gmbx' NB. mapped boxed arrays no longer supported
50+
blacklist=: blacklist, (-. (<UNAME)e.<'Darwin')#(<testpath),each <'gcip1.ijs'
5051
blacklist=: blacklist, (IFRASPI<(IF64<UNAME-:'Linux')+.(IFWIN>IF64)+.IFIOS+.(UNAME-:'Wasm'))#(<testpath),each <'gregex.ijs' NB. require libjpcre2 binary
5152
blacklist=: blacklist, (-.IF64)#(<testpath),each <'g6x14.ijs' NB. require 64-bit
5253
blacklist=: blacklist, (1=1 { 8 T. '')#(<testpath),each 'gtdot.ijs';'gtdot1.ijs';'gtdot2.ijs';'gtdot3.ijs';'gtdot4.ijs' NB. require multithreading
5354
blacklist=: blacklist, (-.15!:23'')#(<testpath),each 'g15x.ijs';'g7x5.ijs';'gdll.ijs';'gdll_df.ijs';'gmmf.ijs';'gmmf1s.ijs';'gmmf1u.ijs';'gmmf1w.ijs' NB. 15!:0 unavailable
5455
blacklist=: blacklist, ('Wasm'-:UNAME)#(<testpath),each <'gstack.ijs' NB. crash
5556
blacklist=: blacklist, (IFQT*.'Wasm'-:UNAME)#(<testpath),each 'g331ps.ijs';'gsp422.ijs';'gsp432.ijs' NB. crash
5657
blacklist=: blacklist, IFIOS#(<testpath),each <'gipht.ijs' NB. crash if included in the whole suite, but ok if running alone
57-
NB. temp workaround
58-
NB. blacklist=: blacklist, (UNAME-:'OpenBSD')#(<testpath),each <'gtdot.ijs'
59-
NB. blacklist=: blacklist, (UNAME-:'FreeBSD')#(<testpath),each 'gsp.ijs';'gsp111.ijs';'gss.ijs'
6058

6159
blacklist=: ~.blacklist
6260
ddall =: blacklist -.~ testfiles 'g'

0 commit comments

Comments
 (0)