Browse Source

test: update to use new routes configuration method

routes
Emery Hemingway 5 months ago
parent
commit
f11b5351a7

+ 4
- 20
compositions/pc-drivers.dhall View File

@@ -25,26 +25,16 @@ let relabel =
25 25
 
26 26
 let drivers =
27 27
       Init::{
28
+      , routes = [ ServiceRoute.parent "Timer" ]
28 29
       , services =
29 30
         [ ServiceRoute.child "Framebuffer" "dynamic"
30 31
         , ServiceRoute.child "Block" "dynamic"
31 32
         , ServiceRoute.child "Usb" "usb_drv"
32 33
         , ServiceRoute.child "Platform" "platform_drv"
33 34
         , ServiceRoute.child "Input" "input_filter"
34
-        , ServiceRoute.child "Rtc" "rtc"
35 35
         ]
36 36
       , children = toMap
37
-          { rtc =
38
-              Child.flat
39
-                Child.Attributes::{
40
-                , binary = "rtc_drv"
41
-                , provides = [ "Rtc" ]
42
-                , routes =
43
-                  [ ServiceRoute.parent "IO_PORT"
44
-                  , ServiceRoute.parent "IO_MEM"
45
-                  ]
46
-                }
47
-          , rom_reporter =
37
+          { rom_reporter =
48 38
               Child.flat
49 39
                 Child.Attributes::{
50 40
                 , binary = "rom_reporter"
@@ -107,7 +97,6 @@ let drivers =
107 97
                   [ ServiceRoute.parent "IRQ"
108 98
                   , ServiceRoute.parent "IO_MEM"
109 99
                   , ServiceRoute.parent "IO_PORT"
110
-                  , ServiceRoute.parent "Timer"
111 100
                   , ServiceRoute.parentLabel
112 101
                       "ROM"
113 102
                       (Some "system")
@@ -172,7 +161,6 @@ let drivers =
172 161
                       "Report"
173 162
                       (Some "config")
174 163
                       (Some "usb_active_config")
175
-                  , ServiceRoute.parent "Timer"
176 164
                   ]
177 165
                 }
178 166
           , ps2_drv =
@@ -180,10 +168,7 @@ let drivers =
180 168
                 Child.Attributes::{
181 169
                 , binary = "ps2_drv"
182 170
                 , provides = [ "Input" ]
183
-                , routes =
184
-                  [ ServiceRoute.child "Platform" "platform_drv"
185
-                  , ServiceRoute.parent "Timer"
186
-                  ]
171
+                , routes = [ ServiceRoute.child "Platform" "platform_drv" ]
187 172
                 }
188 173
           , input_filter =
189 174
               Child.flat
@@ -193,8 +178,7 @@ let drivers =
193 178
                 , resources = Resources::{ ram = Genode.units.MiB 2 }
194 179
                 , provides = [ "Input" ]
195 180
                 , routes =
196
-                  [ ServiceRoute.parent "Timer"
197
-                  , ServiceRoute.parentLabel
181
+                  [ ServiceRoute.parentLabel
198 182
                       "ROM"
199 183
                       (Some "config")
200 184
                       (Some "input_filter.config")

+ 4
- 4
tests/block_router.dhall View File

@@ -19,16 +19,16 @@ let ServiceRoute = Init.ServiceRoute
19 19
 let init =
20 20
       Init::{
21 21
       , verbose = True
22
+      , routes =
23
+        [ ServiceRoute.parent "Timer"
24
+        , ServiceRoute.child "Block" "block_router"
25
+        ]
22 26
       , children =
23 27
           let blockTest =
24 28
                 Child.flat
25 29
                   Child.Attributes::{
26 30
                   , binary = "test-block-client"
27 31
                   , resources = Resources::{ ram = Genode.units.MiB 5 }
28
-                  , routes =
29
-                    [ ServiceRoute.parent "Timer"
30
-                    , ServiceRoute.child "Block" "block_router"
31
-                    ]
32 32
                   }
33 33
 
34 34
           in  toMap

+ 1
- 2
tests/default.nix View File

@@ -69,8 +69,7 @@ listToAttrs ((concatLists (map (testsToList) [ linux hw nova ]))) // {
69 69
       }) novaTests);
70 70
 
71 71
   in buildPackages.stdenv.mkDerivation {
72
-    pname = "sotest";
73
-    version = toString self.revCount;
72
+    name = "sotest";
74 73
     buildCommand = ''
75 74
       mkdir zip; cd zip
76 75
       cp "${testPkgs.bender}" bender

+ 4
- 3
tests/driver_manager.dhall View File

@@ -29,6 +29,7 @@ let label = λ(_ : Text) → { local = _, route = _ }
29 29
 let init =
30 30
       Init::{
31 31
       , verbose = True
32
+      , routes = [ ServiceRoute.parent "Timer" ]
32 33
       , children = toMap
33 34
           { drivers =
34 35
               Init.toChild
@@ -44,10 +45,10 @@ let init =
44 45
                   , childRomRoute "dynamic_rom" "numlock"
45 46
                   , childRomRoute "dynamic_rom" "system"
46 47
                   , ServiceRoute.child "Report" "_report_rom"
48
+                  , ServiceRoute.parent "IRQ"
49
+                  , ServiceRoute.parent "IO_MEM"
50
+                  , ServiceRoute.parent "IO_PORT"
47 51
                   , ServiceRoute.parent "Timer"
48
-                  , Genode.Init.ServiceRoute.parent "IRQ"
49
-                  , Genode.Init.ServiceRoute.parent "IO_MEM"
50
-                  , Genode.Init.ServiceRoute.parent "IO_PORT"
51 52
                   ]
52 53
                 }
53 54
           , dynamic_rom =

+ 0
- 1
tests/log.dhall View File

@@ -17,7 +17,6 @@ in  Test::{
17 17
                 , caps = 500
18 18
                 , ram = Genode.units.MiB 10
19 19
                 }
20
-              , routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
21 20
               }
22 21
         }
23 22
     }

+ 0
- 1
tests/noux.dhall View File

@@ -17,7 +17,6 @@ in  Test::{
17 17
                 , caps = 500
18 18
                 , ram = Genode.units.MiB 10
19 19
                 }
20
-              , routes = [ Genode.Init.ServiceRoute.parent "Timer" ]
21 20
               , config = Genode.Init.Config::{
22 21
                 , attributes = toMap
23 22
                     { stdin = "/script"

+ 4
- 8
tests/solo5/net.dhall View File

@@ -12,6 +12,10 @@ let ServiceRoute = Init.ServiceRoute
12 12
 
13 13
 let init =
14 14
       Init::{
15
+      , routes =
16
+        [ Genode.Init.ServiceRoute.parent "Timer"
17
+        , Genode.Init.ServiceRoute.child "Nic" "bridge"
18
+        ]
15 19
       , children = toMap
16 20
           { nic =
17 21
               Child.flat
@@ -42,10 +46,6 @@ let init =
42 46
                 Child.Attributes::{
43 47
                 , binary = "solo5-test_net"
44 48
                 , resources = Res::{ caps = 256, ram = Genode.units.MiB 3 }
45
-                , routes =
46
-                  [ ServiceRoute.parent "Timer"
47
-                  , ServiceRoute.child "Nic" "bridge"
48
-                  ]
49 49
                 , config = Init.Config::{
50 50
                   , content =
51 51
                     [ Genode.Prelude.XML.text "<cmdline>limit</cmdline>" ]
@@ -57,10 +57,6 @@ let init =
57 57
                 , binary = "ping"
58 58
                 , exitPropagate = True
59 59
                 , resources = Res::{ caps = 128, ram = Genode.units.MiB 6 }
60
-                , routes =
61
-                  [ ServiceRoute.parent "Timer"
62
-                  , ServiceRoute.child "Nic" "bridge"
63
-                  ]
64 60
                 , config = Init.Config::{
65 61
                   , attributes = toMap
66 62
                       { interface = "10.0.0.72/24"

+ 4
- 8
tests/solo5/net_2if.dhall View File

@@ -10,6 +10,10 @@ let Res = Init.Resources
10 10
 
11 11
 let init =
12 12
       Init::{
13
+      , routes =
14
+        [ Genode.Init.ServiceRoute.parent "Timer"
15
+        , Genode.Init.ServiceRoute.child "Nic" "bridge"
16
+        ]
13 17
       , children = toMap
14 18
           { nic =
15 19
               Child.flat
@@ -40,10 +44,6 @@ let init =
40 44
                 Child.Attributes::{
41 45
                 , binary = "solo5-test_net_2if"
42 46
                 , resources = Res::{ caps = 256, ram = Genode.units.MiB 5 }
43
-                , routes =
44
-                  [ Genode.Init.ServiceRoute.parent "Timer"
45
-                  , Genode.Init.ServiceRoute.child "Nic" "bridge"
46
-                  ]
47 47
                 , config = Init.Config::{
48 48
                   , content =
49 49
                     [ Genode.Prelude.XML.text
@@ -59,10 +59,6 @@ let init =
59 59
                 , binary = "sequence"
60 60
                 , exitPropagate = True
61 61
                 , resources = Res::{ caps = 256, ram = Genode.units.MiB 8 }
62
-                , routes =
63
-                  [ Genode.Init.ServiceRoute.parent "Timer"
64
-                  , Genode.Init.ServiceRoute.child "Nic" "bridge"
65
-                  ]
66 62
                 , config = Init.Config::{
67 63
                   , content =
68 64
                     [ Genode.Prelude.XML.text

+ 0
- 1
tests/solo5/solo5.dhall View File

@@ -27,7 +27,6 @@ let toSimple =
27 27
                   }
28 28
               ]
29 29
             }
30
-          , routes = [ Init.ServiceRoute.parent "Timer" ]
31 30
           }
32 31
 
33 32
 let tests

+ 8
- 30
tests/solo5/time.dhall View File

@@ -6,34 +6,12 @@ let Init = Genode.Init
6 6
 
7 7
 let Child = Init.Child
8 8
 
9
-let init =
10
-      Init::{
11
-      , children = toMap
12
-          { solo5 =
13
-              Child.flat
14
-                Child.Attributes::{
15
-                , binary = "solo5-test_time"
16
-                , exitPropagate = True
17
-                , resources = Init.Resources::{
18
-                  , caps = 256
19
-                  , ram = Genode.units.MiB 3
20
-                  }
21
-                , routes =
22
-                  [ Init.ServiceRoute.parent "Timer"
23
-                  , Init.ServiceRoute.child "Rtc" "rtc_drv"
24
-                  ]
25
-                }
26
-          , rtc_drv =
27
-              Child.flat
28
-                Child.Attributes::{
29
-                , binary = "rtc_drv"
30
-                , exitPropagate = True
31
-                , provides = [ "Rtc" ]
32
-                , routes = [ Init.ServiceRoute.parent "IO_PORT" ]
33
-                }
34
-          }
35
-      }
9
+let solo5 =
10
+      Child.flat
11
+        Child.Attributes::{
12
+        , binary = "solo5-test_time"
13
+        , exitPropagate = True
14
+        , resources = Init.Resources::{ caps = 256, ram = Genode.units.MiB 3 }
15
+        }
36 16
 
37
-in  Init.toChild
38
-      init
39
-      Init.Attributes::{ routes = [ Init.ServiceRoute.parent "IO_PORT" ] }
17
+in  solo5

+ 0
- 1
tests/test.dhall View File

@@ -26,7 +26,6 @@ in  { Genode = Genode
26 26
                     , Init.ServiceRoute.parent "IO_PORT"
27 27
                     , Init.ServiceRoute.parent "IRQ"
28 28
                     , Init.ServiceRoute.parent "VM"
29
-                    , Init.ServiceRoute.child "Timer" "timer"
30 29
                     ]
31 30
                   }
32 31
             }

+ 1
- 4
tests/vmm_x86.dhall View File

@@ -16,10 +16,7 @@ let vmm =
16 16
           , caps = 2048
17 17
           , ram = Genode.units.MiB 256
18 18
           }
19
-        , routes =
20
-          [ Genode.Init.ServiceRoute.parent "Timer"
21
-          , Genode.Init.ServiceRoute.parent "VM"
22
-          ]
19
+        , routes = [ Genode.Init.ServiceRoute.parent "VM" ]
23 20
         }
24 21
 
25 22
 in  Test::{ children = toMap { vmm = vmm } }

+ 6
- 13
tests/x86.dhall View File

@@ -23,22 +23,17 @@ let signal =
23 23
         , exitPropagate = True
24 24
         , priority = 5
25 25
         , resources = Init.Resources::{ caps = 500, ram = Genode.units.MiB 10 }
26
-        , routes = [ Init.ServiceRoute.parent "Timer" ]
27 26
         }
28 27
 
29
-let rtc =
30
-      Child.flat
31
-        Child.Attributes::{
32
-        , binary = "test-rtc"
33
-        , routes =
34
-          [ Genode.Init.ServiceRoute.parent "Timer"
35
-          , Genode.Init.ServiceRoute.parent "Rtc"
36
-          ]
37
-        }
28
+let rtc = Child.flat Child.Attributes::{ binary = "test-rtc" }
38 29
 
39 30
 let pciInit =
40 31
       Init::{
41 32
       , verbose = True
33
+      , routes =
34
+        [ ServiceRoute.parent "Timer"
35
+        , ServiceRoute.child "Platform" "platform_drv"
36
+        ]
42 37
       , children = toMap
43 38
           { test-pci =
44 39
               Child.flat
@@ -46,7 +41,6 @@ let pciInit =
46 41
                 , binary = "test-pci"
47 42
                 , exitPropagate = True
48 43
                 , resources = Resources::{ ram = Genode.units.MiB 3 }
49
-                , routes = [ ServiceRoute.child "Platform" "platform_drv" ]
50 44
                 }
51 45
           , acpi_drv =
52 46
               Child.flat
@@ -77,8 +71,7 @@ let pciInit =
77 71
                 , reportRoms = [ label "acpi" ]
78 72
                 , provides = [ "Platform", "Acpi" ]
79 73
                 , routes =
80
-                  [ ServiceRoute.parent "Timer"
81
-                  , ServiceRoute.parent "IRQ"
74
+                  [ ServiceRoute.parent "IRQ"
82 75
                   , ServiceRoute.parent "IO_MEM"
83 76
                   , ServiceRoute.parent "IO_PORT"
84 77
                   ]

Loading…
Cancel
Save