diff --git a/dhall/genode.nix b/dhall/genode.nix
index ca4294e..c01ee34 100644
--- a/dhall/genode.nix
+++ b/dhall/genode.nix
@@ -6,6 +6,6 @@
fetchgit {
url = "https://git.sr.ht/~ehmry/dhall-genode";
- rev = "031fb4ef77dc8a2dbe71fd806129b4eacfe0606a";
- sha256 = "1hvy21w406fy01b9fag3pmz22zlnfdkz17fmrv2h8xxj5lci9z5n";
+ rev = "4e05e7bf88e53c81a8f00460673fd48e858c6dfc";
+ sha256 = "0y92jinqr26wlrychk8mi58kqwmy4y25c2ffks3r3m78i8andi8y";
}
diff --git a/tests/default.nix b/tests/default.nix
index c726384..62b69bf 100644
--- a/tests/default.nix
+++ b/tests/default.nix
@@ -22,6 +22,18 @@ let
lib = hostPkgs.lib // {
+ dhallText = name: source:
+ hostPkgs.runCommand name {
+ inherit name source;
+ preferLocalBuild = true;
+ buildInputs = [ hostPkgs.dhall ];
+ DHALL_PRELUDE = "${testPkgs.dhallPackages.prelude}/package.dhall";
+ DHALL_GENODE = "${testPkgs.dhallPackages.genode}/package.dhall";
+ } ''
+ export XDG_CACHE_HOME=$NIX_BUILD_TOP
+ dhall text < $source > $out
+ '';
+
renderDhallInit = path: args:
hostPkgs.runCommand "init.xml" {
preferLocalBuild = true;
@@ -32,8 +44,8 @@ let
DHALL_GENODE = "${testPkgs.dhallPackages.genode}/package.dhall";
} ''
export XDG_CACHE_HOME=$NIX_BUILD_TOP
- echo 'let Prelude = env:DHALL_GENODE in Prelude.Init.render (Prelude.Init.defaults ⫽ { children = toMap (env:initConfig env:initArgs) })' \
- | dhall text \
+ dhall text \
+ <<< 'let Prelude = env:DHALL_GENODE in Prelude.Init.render (Prelude.Init::{ children = toMap (env:initConfig env:initArgs) })' \
> $out
'';
};
diff --git a/tests/libc.dhall b/tests/libc.dhall
index 7ee3b20..6e5ec7f 100644
--- a/tests/libc.dhall
+++ b/tests/libc.dhall
@@ -2,23 +2,23 @@ let Genode = env:DHALL_GENODE
in λ(_ : {})
→ { test-libc =
- Genode.Init.Start.defaults
- ⫽ { binary = "test-libc"
- , resources = { caps = 200, ram = Genode.units.MiB 400 }
- , routes = [ Genode.ServiceRoute.parent "Timer" ]
- , config =
- Genode.Prelude.XML.text
- ''
-
-
-
-
- 2019-08-20 15:01
-
-
-
-
- ''
- }
+ Genode.Init.Start::{
+ , binary = "test-libc"
+ , resources = { caps = 200, ram = Genode.units.MiB 400 }
+ , routes = [ Genode.ServiceRoute.parent "Timer" ]
+ , config =
+ Genode.Prelude.XML.text
+ ''
+
+
+
+
+ 2019-08-20 15:01
+
+
+
+
+ ''
+ }
: Genode.Init.Start.Type
}
diff --git a/tests/log.dhall b/tests/log.dhall
index c945776..3016eee 100644
--- a/tests/log.dhall
+++ b/tests/log.dhall
@@ -1,7 +1,3 @@
let Genode = env:DHALL_GENODE ? ../dhall-genode/package.dhall
-in λ(_ : {})
- → { test-log =
- Genode.Init.Start.defaults ⫽ { binary = "test-log" }
- : Genode.Init.Start.Type
- }
+in λ(_ : {}) → { test-log = Genode.Init.Start::{ binary = "test-log" } }
diff --git a/tests/nova-iso.nix b/tests/nova-iso.nix
index fdac305..8219388 100644
--- a/tests/nova-iso.nix
+++ b/tests/nova-iso.nix
@@ -66,11 +66,12 @@ in hostPkgs.stdenv.mkDerivation {
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
+ inherit modulesAsm;
installPhase = ''
mkdir -p boot/syslinux
# compile the boot modules into one object file
- echo '${modulesAsm}' | $CC -c -x assembler -o boot_modules.o -
+ $CC -c -x assembler -o boot_modules.o - <<< $modulesAsm
# link final image
$LD -nostdlib \
diff --git a/tests/pci.dhall b/tests/pci.dhall
index 3aed51d..28b1028 100644
--- a/tests/pci.dhall
+++ b/tests/pci.dhall
@@ -4,55 +4,54 @@ in λ ( _
: {}
)
→ { test-pci =
- Genode.Init.Start.defaults
- ⫽ { binary = "test-pci"
- , resources = { caps = 96, ram = Genode.units.MiB 2 }
- , routes = [ Genode.ServiceRoute.child "Platform" "platform_drv" ]
- }
+ Genode.Init.Start::{
+ , binary = "test-pci"
+ , resources = { caps = 96, ram = Genode.units.MiB 2 }
+ , routes = [ Genode.ServiceRoute.child "Platform" "platform_drv" ]
+ }
, acpi_report_rom =
- Genode.Init.Start.defaults
- ⫽ { binary =
- "report_rom"
- , resources = { caps = 96, ram = Genode.units.MiB 2 }
- , provides = [ "ROM", "Report" ]
- , config =
- Genode.Prelude.XML.text
- ''
-
-
-
-
- ''
- }
+ Genode.Init.Start::{
+ , binary = "report_rom"
+ , resources = { caps = 96, ram = Genode.units.MiB 2 }
+ , provides = [ "ROM", "Report" ]
+ , config =
+ Genode.Prelude.XML.text
+ ''
+
+
+
+
+ ''
+ }
, acpi_drv =
- Genode.Init.Start.defaults
- ⫽ { binary = "acpi_drv"
- , resources = { caps = 400, ram = Genode.units.MiB 4 }
- , constrainPhys = True
- , provides = [ "Platform", "Acpi" ]
- , routes =
- [ Genode.ServiceRoute.child "Report" "acpi_report_rom"
- , Genode.ServiceRoute.parent "IRQ"
- , Genode.ServiceRoute.parent "IO_MEM"
- , Genode.ServiceRoute.parent "IO_PORT"
- ]
- }
+ Genode.Init.Start::{
+ , binary = "acpi_drv"
+ , resources = { caps = 400, ram = Genode.units.MiB 4 }
+ , constrainPhys = True
+ , provides = [ "Platform", "Acpi" ]
+ , routes =
+ [ Genode.ServiceRoute.child "Report" "acpi_report_rom"
+ , Genode.ServiceRoute.parent "IRQ"
+ , Genode.ServiceRoute.parent "IO_MEM"
+ , Genode.ServiceRoute.parent "IO_PORT"
+ ]
+ }
, platform_drv =
- Genode.Init.Start.defaults
- ⫽ { binary = "platform_drv"
- , resources = { caps = 800, ram = Genode.units.MiB 4 }
- , constrainPhys = True
- , provides = [ "Platform", "Acpi" ]
- , routes =
- [ Genode.ServiceRoute.parent "Timer"
- , Genode.ServiceRoute.parent "IRQ"
- , Genode.ServiceRoute.parent "IO_MEM"
- , Genode.ServiceRoute.parent "IO_PORT"
- , Genode.ServiceRoute.childLabel
- "ROM"
- "acpi_report_rom"
- (Some "acpi")
- (None Text)
- ]
- }
+ Genode.Init.Start::{
+ , binary = "platform_drv"
+ , resources = { caps = 800, ram = Genode.units.MiB 4 }
+ , constrainPhys = True
+ , provides = [ "Platform", "Acpi" ]
+ , routes =
+ [ Genode.ServiceRoute.parent "Timer"
+ , Genode.ServiceRoute.parent "IRQ"
+ , Genode.ServiceRoute.parent "IO_MEM"
+ , Genode.ServiceRoute.parent "IO_PORT"
+ , Genode.ServiceRoute.childLabel
+ "ROM"
+ "acpi_report_rom"
+ (Some "acpi")
+ (None Text)
+ ]
+ }
}
diff --git a/tests/signal.dhall b/tests/signal.dhall
index b390c22..d541262 100644
--- a/tests/signal.dhall
+++ b/tests/signal.dhall
@@ -2,10 +2,10 @@ let Genode = env:DHALL_GENODE ? ../dhall-genode/package.dhall
in λ(_ : {})
→ { test-signal =
- Genode.Init.Start.defaults
- ⫽ { binary = "test-signal"
- , resources = { caps = 500, ram = Genode.units.MiB 10 }
- , routes = [ Genode.ServiceRoute.parent "Timer" ]
- }
+ Genode.Init.Start::{
+ , binary = "test-signal"
+ , resources = { caps = 500, ram = Genode.units.MiB 10 }
+ , routes = [ Genode.ServiceRoute.parent "Timer" ]
+ }
: Genode.Init.Start.Type
}
diff --git a/tests/solo5/blk.dhall b/tests/solo5/blk.dhall
index b0d34d3..146b3c4 100644
--- a/tests/solo5/blk.dhall
+++ b/tests/solo5/blk.dhall
@@ -2,23 +2,23 @@ let Genode = env:DHALL_GENODE
in λ(_ : {})
→ { solo5 =
- Genode.Init.Start.defaults
- ⫽ { binary = "test"
- , resources = { caps = 256, ram = Genode.units.MiB 3 }
- , routes =
- [ Genode.ServiceRoute.parent "Timer"
- , Genode.ServiceRoute.child "Block" "block"
- ]
- }
+ Genode.Init.Start::{
+ , binary = "test"
+ , resources = { caps = 256, ram = Genode.units.MiB 3 }
+ , routes =
+ [ Genode.ServiceRoute.parent "Timer"
+ , Genode.ServiceRoute.child "Block" "block"
+ ]
+ }
, block =
- Genode.Init.Start.defaults
- ⫽ { binary = "ram_block"
- , provides = [ "Block" ]
- , resources = { caps = 96, ram = Genode.units.MiB 9 }
- , config =
- Genode.Prelude.XML.text
- ''
-
- ''
- }
+ Genode.Init.Start::{
+ , binary = "ram_block"
+ , provides = [ "Block" ]
+ , resources = { caps = 96, ram = Genode.units.MiB 9 }
+ , config =
+ Genode.Prelude.XML.text
+ ''
+
+ ''
+ }
}
diff --git a/tests/solo5/net.dhall b/tests/solo5/net.dhall
index 40bccb7..01f91fe 100644
--- a/tests/solo5/net.dhall
+++ b/tests/solo5/net.dhall
@@ -2,53 +2,52 @@ let Genode = env:DHALL_GENODE
in λ(_ : {})
→ { nic =
- Genode.Init.Start.defaults
- ⫽ { binary = "nic_loopback", provides = [ "Nic" ] }
+ Genode.Init.Start::{ binary = "nic_loopback", provides = [ "Nic" ] }
, bridge =
- Genode.Init.Start.defaults
- ⫽ { binary = "nic_bridge"
- , resources = { caps = 200, ram = Genode.units.MiB 6 }
- , provides = [ "Nic" ]
- , routes = [ Genode.ServiceRoute.child "Nic" "nic" ]
- , config =
- Genode.Prelude.XML.text
- ''
-
-
-
-
- ''
- }
+ Genode.Init.Start::{
+ , binary = "nic_bridge"
+ , resources = { caps = 200, ram = Genode.units.MiB 6 }
+ , provides = [ "Nic" ]
+ , routes = [ Genode.ServiceRoute.child "Nic" "nic" ]
+ , config =
+ Genode.Prelude.XML.text
+ ''
+
+
+
+
+ ''
+ }
, solo5 =
- Genode.Init.Start.defaults
- ⫽ { binary = "test"
- , resources = { caps = 256, ram = Genode.units.MiB 3 }
- , routes =
- [ Genode.ServiceRoute.parent "Timer"
- , Genode.ServiceRoute.child "Nic" "bridge"
- ]
- , config =
- Genode.Prelude.XML.text
- ''
- limit
- ''
- }
+ Genode.Init.Start::{
+ , binary = "test"
+ , resources = { caps = 256, ram = Genode.units.MiB 3 }
+ , routes =
+ [ Genode.ServiceRoute.parent "Timer"
+ , Genode.ServiceRoute.child "Nic" "bridge"
+ ]
+ , config =
+ Genode.Prelude.XML.text
+ ''
+ limit
+ ''
+ }
, ping =
- Genode.Init.Start.defaults
- ⫽ { binary = "ping"
- , resources = { caps = 128, ram = Genode.units.MiB 6 }
- , routes =
- [ Genode.ServiceRoute.parent "Timer"
- , Genode.ServiceRoute.child "Nic" "bridge"
- ]
- , config =
- Genode.Prelude.XML.text
- ''
-
- ''
- }
+ Genode.Init.Start::{
+ , binary = "ping"
+ , resources = { caps = 128, ram = Genode.units.MiB 6 }
+ , routes =
+ [ Genode.ServiceRoute.parent "Timer"
+ , Genode.ServiceRoute.child "Nic" "bridge"
+ ]
+ , config =
+ Genode.Prelude.XML.text
+ ''
+
+ ''
+ }
}
diff --git a/tests/solo5/net_2if.dhall b/tests/solo5/net_2if.dhall
index ad0e1f7..993b0d8 100644
--- a/tests/solo5/net_2if.dhall
+++ b/tests/solo5/net_2if.dhall
@@ -4,60 +4,58 @@ in λ ( _
: {}
)
→ { nic =
- Genode.Init.Start.defaults
- ⫽ { binary = "nic_loopback", provides = [ "Nic" ] }
+ Genode.Init.Start::{ binary = "nic_loopback", provides = [ "Nic" ] }
, bridge =
- Genode.Init.Start.defaults
- ⫽ { binary = "nic_bridge"
- , resources = { caps = 200, ram = Genode.units.MiB 8 }
- , provides = [ "Nic" ]
- , routes = [ Genode.ServiceRoute.child "Nic" "nic" ]
- , config =
- Genode.Prelude.XML.text
- ''
-
-
-
-
-
- ''
- }
+ Genode.Init.Start::{
+ , binary = "nic_bridge"
+ , resources = { caps = 200, ram = Genode.units.MiB 8 }
+ , provides = [ "Nic" ]
+ , routes = [ Genode.ServiceRoute.child "Nic" "nic" ]
+ , config =
+ Genode.Prelude.XML.text
+ ''
+
+
+
+
+
+ ''
+ }
, solo5 =
- Genode.Init.Start.defaults
- ⫽ { binary = "test"
- , resources = { caps = 256, ram = Genode.units.MiB 4 }
- , routes =
- [ Genode.ServiceRoute.parent "Timer"
- , Genode.ServiceRoute.child "Nic" "bridge"
- ]
- , config =
- Genode.Prelude.XML.text
- ''
- limit
- ''
- }
+ Genode.Init.Start::{
+ , binary = "test"
+ , resources = { caps = 256, ram = Genode.units.MiB 4 }
+ , routes =
+ [ Genode.ServiceRoute.parent "Timer"
+ , Genode.ServiceRoute.child "Nic" "bridge"
+ ]
+ , config =
+ Genode.Prelude.XML.text
+ ''
+ limit
+ ''
+ }
, clients =
- Genode.Init.Start.defaults
- ⫽ { binary =
- "sequence"
- , resources = { caps = 256, ram = Genode.units.MiB 8 }
- , routes =
- [ Genode.ServiceRoute.parent "Timer"
- , Genode.ServiceRoute.child "Nic" "bridge"
- ]
- , config =
- Genode.Prelude.XML.text
- ''
-
-
-
-
-
-
-
-
-
-
- ''
- }
+ Genode.Init.Start::{
+ , binary = "sequence"
+ , resources = { caps = 256, ram = Genode.units.MiB 8 }
+ , routes =
+ [ Genode.ServiceRoute.parent "Timer"
+ , Genode.ServiceRoute.child "Nic" "bridge"
+ ]
+ , config =
+ Genode.Prelude.XML.text
+ ''
+
+
+
+
+
+
+
+
+
+
+ ''
+ }
}
diff --git a/tests/solo5/simple.dhall b/tests/solo5/simple.dhall
index 700d14e..eebc594 100644
--- a/tests/solo5/simple.dhall
+++ b/tests/solo5/simple.dhall
@@ -2,16 +2,16 @@ let Genode = env:DHALL_GENODE
in λ(_ : {})
→ { solo5 =
- Genode.Init.Start.defaults
- ⫽ { binary = "test"
- , resources = { caps = 256, ram = Genode.units.MiB 3 }
- , routes = [ Genode.ServiceRoute.parent "Timer" ]
- , config =
- Genode.Prelude.XML.text
- ''
-
- Hello_Solo5
-
- ''
- }
+ Genode.Init.Start::{
+ , binary = "test"
+ , resources = { caps = 256, ram = Genode.units.MiB 3 }
+ , routes = [ Genode.ServiceRoute.parent "Timer" ]
+ , config =
+ Genode.Prelude.XML.text
+ ''
+
+ Hello_Solo5
+
+ ''
+ }
}
diff --git a/tests/solo5/time.dhall b/tests/solo5/time.dhall
index 969bd1a..2c0efd6 100644
--- a/tests/solo5/time.dhall
+++ b/tests/solo5/time.dhall
@@ -2,20 +2,18 @@ let Genode = env:DHALL_GENODE
in λ(_ : {})
→ { solo5 =
- Genode.Init.Start.defaults
- ⫽ { binary = "test"
- , resources = { caps = 256, ram = Genode.units.MiB 3 }
- , routes =
- [ Genode.ServiceRoute.parent "Timer"
- , Genode.ServiceRoute.child "Rtc" "clock"
- ]
- }
+ Genode.Init.Start::{
+ , binary = "test"
+ , resources = { caps = 256, ram = Genode.units.MiB 3 }
+ , routes =
+ [ Genode.ServiceRoute.parent "Timer"
+ , Genode.ServiceRoute.child "Rtc" "clock"
+ ]
+ }
, clock =
- Genode.Init.Start.defaults
- ⫽ { binary = "rtc_drv"
- , provides = [ "Rtc" ]
- , routes =
- [ Genode.ServiceRoute.parent "IO_PORT"
- ]
- }
+ Genode.Init.Start::{
+ , binary = "rtc_drv"
+ , provides = [ "Rtc" ]
+ , routes = [ Genode.ServiceRoute.parent "IO_PORT" ]
+ }
}