mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
Remove Nim tests
Nim is now built independently of the Genode repository using an SDK and Nimble. Fix #3300
This commit is contained in:
parent
5f0aa16184
commit
62a4d1de0e
@ -1,2 +0,0 @@
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
@ -1 +0,0 @@
|
||||
c66ded577d94199d842f558d532789e4099c0481
|
@ -1,10 +0,0 @@
|
||||
LICENSE := MIT
|
||||
VERSION := 0.18.0
|
||||
DOWNLOADS := nim.archive
|
||||
|
||||
URL(nim) := https://nim-lang.org/download/nim-$(VERSION).tar.xz
|
||||
SHA(nim) := 45c74adb35f08dfa9add1112ae17330e5d902ebb4a36e7046caee8b79e6f3bd0
|
||||
DIR(nim) := .
|
||||
|
||||
PATCHES := $(wildcard $(REP_DIR)/src/app/nim/*.patch)
|
||||
PATCH_OPT := -p1
|
@ -1,60 +0,0 @@
|
||||
set build_components {
|
||||
core init timer
|
||||
drivers/rtc
|
||||
test/nim
|
||||
}
|
||||
|
||||
build $build_components
|
||||
|
||||
create_boot_directory
|
||||
|
||||
set config {
|
||||
<config>
|
||||
<parent-provides>
|
||||
<service name="CPU"/>
|
||||
<service name="LOG"/>
|
||||
<service name="IO_PORT"/>
|
||||
<service name="PD"/>
|
||||
<service name="RM"/>
|
||||
<service name="ROM"/>
|
||||
<service name="SIGNAL"/>
|
||||
</parent-provides>
|
||||
<default caps="64"/>
|
||||
<default-route>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides> <service name="Timer"/> </provides>
|
||||
</start>
|
||||
<start name="rtc_drv">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides> <service name="Rtc"/> </provides>
|
||||
</start>
|
||||
<start name="test-nim" caps="128">
|
||||
<resource name="RAM" quantum="10M"/>
|
||||
<config>
|
||||
<vfs>
|
||||
<ram/> <log/> <rtc/>
|
||||
</vfs>
|
||||
<libc stdout="/log" stderr="/log" rtc="/rtc"/>
|
||||
</config>
|
||||
</start>
|
||||
</config>
|
||||
}
|
||||
|
||||
install_config $config
|
||||
|
||||
set boot_modules {
|
||||
core init ld.lib.so
|
||||
libc.lib.so vfs.lib.so
|
||||
rtc_drv
|
||||
test-nim
|
||||
timer
|
||||
}
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
||||
append qemu_args "-nographic"
|
||||
|
||||
run_genode_until {child "test-nim" exited with exit value 0} 30
|
@ -1,82 +0,0 @@
|
||||
assert_spec linux
|
||||
|
||||
set build_components {
|
||||
core init timer
|
||||
drivers/nic server/ram_fs server/vfs
|
||||
test/nim_echo_server
|
||||
lib/vfs/lxip
|
||||
}
|
||||
|
||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||
append_platform_drv_build_components
|
||||
|
||||
build $build_components
|
||||
|
||||
create_boot_directory
|
||||
|
||||
set config {
|
||||
<config verbose="yes">
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
<service name="IRQ"/>
|
||||
<service name="IO_MEM"/>
|
||||
<service name="IO_PORT"/>
|
||||
<service name="PD"/>
|
||||
<service name="RM"/>
|
||||
<service name="CPU"/>
|
||||
<service name="LOG"/>
|
||||
<service name="SIGNAL"/>
|
||||
</parent-provides>
|
||||
<default caps="128"/>
|
||||
<default-route>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides> <service name="Timer"/> </provides>
|
||||
</start>
|
||||
<start name="nic_drv">
|
||||
<binary name="linux_nic_drv"/>
|
||||
<resource name="RAM" quantum="2M"/>
|
||||
<provides> <service name="Nic"/> </provides>
|
||||
</start>
|
||||
|
||||
<start name="netty">
|
||||
<binary name="test-nim_echo_server"/>
|
||||
<resource name="RAM" quantum="32M"/>
|
||||
<config ld_verbose="yes">
|
||||
<vfs>
|
||||
<dir name="socket">
|
||||
<lxip ip_addr="10.0.2.55" netmask="255.255.255.0" gateway="10.0.2.1" nameserver="8.8.8.8"/>
|
||||
</dir>
|
||||
<dir name="dev"> <log/> </dir>
|
||||
<dir name="tmp"> <ram/> </dir>
|
||||
</vfs>
|
||||
<libc stdout="/dev/log" stderr="/dev/log" socket="/socket"/>
|
||||
</config>
|
||||
</start>
|
||||
}
|
||||
|
||||
append_platform_drv_config
|
||||
|
||||
append config {
|
||||
</config>
|
||||
}
|
||||
|
||||
install_config $config
|
||||
|
||||
set boot_modules {
|
||||
core init timer linux_nic_drv ram_fs vfs
|
||||
ld.lib.so libc.lib.so vfs.lib.so libm.lib.so
|
||||
stdcxx.lib.so
|
||||
vfs_lxip.lib.so lxip.lib.so
|
||||
test-nim_echo_server
|
||||
}
|
||||
|
||||
append_platform_drv_boot_modules
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
||||
run_genode_until forever
|
||||
|
||||
# vi: set ft=tcl :
|
@ -1,17 +0,0 @@
|
||||
diff --git a/config/nim.cfg b/config/nim.cfg
|
||||
index a2a774b23..a664e3e7b 100644
|
||||
--- a/config/nim.cfg
|
||||
+++ b/config/nim.cfg
|
||||
@@ -243,3 +243,12 @@ vcc.cpp.options.size = "/O1"
|
||||
|
||||
# Configuration for the Tiny C Compiler:
|
||||
tcc.options.always = "-w"
|
||||
+
|
||||
+# Configuration for Genode toolchain
|
||||
+amd64.genode.gcc.path = "/usr/local/genode-gcc/bin"
|
||||
+amd64.genode.gcc.exe = "genode-x86-gcc"
|
||||
+amd64.genode.gcc.cpp.exe = "genode-x86-g++"
|
||||
+
|
||||
+arm.genode.gcc.path = "/usr/local/genode-gcc/bin"
|
||||
+arm.genode.gcc.exe = "genode-arm-gcc"
|
||||
+arm.genode.gcc.cpp.exe = "genode-arm-g++"
|
@ -1,35 +0,0 @@
|
||||
commit 90f5e157c7f8edabcc625ee96e9db157da955d47
|
||||
Author: Emery Hemingway <emery@vfemail.net>
|
||||
Date: Wed May 2 21:29:53 2018 +0200
|
||||
|
||||
Disable setTerminate when noCppExceptions is defined
|
||||
|
||||
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
|
||||
index ff3e6714d..d838f9b9c 100644
|
||||
--- a/compiler/cgen.nim
|
||||
+++ b/compiler/cgen.nim
|
||||
@@ -265,7 +265,7 @@ proc rdCharLoc(a: TLoc): Rope =
|
||||
|
||||
proc genObjectInit(p: BProc, section: TCProcSection, t: PType, a: TLoc,
|
||||
takeAddr: bool) =
|
||||
- if p.module.compileToCpp and t.isException:
|
||||
+ if p.module.compileToCpp and t.isException and not isDefined("noCppExceptions"):
|
||||
# init vtable in Exception object for polymorphic exceptions
|
||||
includeHeader(p.module, "<new>")
|
||||
linefmt(p, section, "new ($1) $2;$n", rdLoc(a), getTypeDesc(p.module, t))
|
||||
diff --git a/lib/system.nim b/lib/system.nim
|
||||
index 5c0970f85..49f2a29bf 100644
|
||||
--- a/lib/system.nim
|
||||
+++ b/lib/system.nim
|
||||
@@ -4172,8 +4172,9 @@ template doAssertRaises*(exception, code: untyped): typed =
|
||||
if wrong:
|
||||
raiseAssert(astToStr(exception) & " wasn't raised by:\n" & astToStr(code))
|
||||
|
||||
-when defined(cpp) and appType != "lib" and not defined(js) and
|
||||
- not defined(nimscript) and hostOS != "standalone":
|
||||
+when defined(cpp) and appType != "lib" and
|
||||
+ not defined(js) and not defined(nimscript) and
|
||||
+ hostOS != "standalone" and not defined(noCppExceptions):
|
||||
proc setTerminate(handler: proc() {.noconv.})
|
||||
{.importc: "std::set_terminate", header: "<exception>".}
|
||||
setTerminate proc() {.noconv.} =
|
Loading…
x
Reference in New Issue
Block a user