diff options
author | Jaremy Creechley <creechley@gmail.com> | 2020-09-14 00:57:49 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 08:57:49 +0200 |
commit | 6c49767a6c656fb097df71c41e4f123380bc1ca9 (patch) | |
tree | 851739f6b139423e77ba180032762fac6348bbc1 /tests | |
parent | 1df5cfba52ccc71e3c69b6cd7d08cebd70bbb187 (diff) | |
download | Nim-6c49767a6c656fb097df71c41e4f123380bc1ca9.tar.gz |
Fixing issue #15302 -- lwip doesn't support signals (#15303)
* Fixing issue #15302 -- lwip doesn't support signals * Adding test to catch issue #15302 -- lwip/freertos net library don't try to build / run on windows, it'll compile only but not run Fixing issue #15302 -- reworking test to compile on other platforms
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/tlwip.nim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/stdlib/tlwip.nim b/tests/stdlib/tlwip.nim new file mode 100644 index 000000000..7f7822236 --- /dev/null +++ b/tests/stdlib/tlwip.nim @@ -0,0 +1,30 @@ +discard """ + targets: "c" + cmd: "nim $target --os:freertos --gc:arc $options $file" + disabled: "bsd" + disabled: "windows" + action: compile +""" + +# Note: +# This file tests FreeRTOS/LwIP cross-compilation on UNIX platforms +# Windows should run when compiled with esp-idf, however I'm not +# sure how to test for only compilation on Windows without running +# a test exe +# +# Note: +# disabling *BSDs since they're not playing well with `gcc` + +import net +import asynchttpserver, asyncdispatch + +proc cb*(req: Request) {.async.} = + await req.respond(Http200, "Hello World") + +proc run_http_server*() {.exportc.} = + echo "starting http server" + var server = newAsyncHttpServer() + + waitFor server.serve(Port(8181), cb) + +echo("ok") |