Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMore emscripten test fixes #31623
Conversation
rust-highfive
assigned
brson
Feb 13, 2016
alexcrichton
reviewed
Feb 13, 2016
| let test_result = calc_result(&desc2, test_result); | ||
| let stdout = data3.lock().unwrap().to_vec(); | ||
| monitor_ch2.send((desc2.clone(), test_result, stdout)).unwrap(); | ||
| } |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Feb 13, 2016
Member
Perhaps this could become the way tests are run? It'd be good to exercise this all the time rather than just with emscripten.
This comment has been minimized.
This comment has been minimized.
tomaka
Feb 13, 2016
Author
Contributor
But then tests would execute one at a time instead of concurrently.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
brson
Feb 13, 2016
Contributor
It does look like a lot of duplication for a path that won't be exercised much. Can any of it be factored out?
This comment has been minimized.
This comment has been minimized.
tomaka
Feb 14, 2016
Author
Contributor
I don't think it's possible to reduce it, except for some minor things.
It would probably be feasible if Builder::spawn() returned the closure that was supposed to be called in the case of an error.
This comment has been minimized.
This comment has been minimized.
|
I pushed a second minor commit that finishes ignoring all tests. |
This comment has been minimized.
This comment has been minimized.
|
Can you link your emscripten changes? Are they likely to be accepted upstream? |
This comment has been minimized.
This comment has been minimized.
|
I submitted emscripten-core/emscripten#4097 and emscripten-core/emscripten#4095. The PRs may need some tweaks, but I think the nature of the changes is probably good. I also have some preliminary changes that add proper support for unwinding, but it needs more work before I submit it. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@tomaka Can we change the test runner code to use conditional compilation to detect emscripten and run single-threaded? That way we don't have this never-executed failure path on other platforms. |
This comment has been minimized.
This comment has been minimized.
|
Closing due to inactivity, but feel free to resubmit with a rebase! |
tomaka commentedFeb 13, 2016
r? @brson
libtestnow runs each test in single-threaded mode (aroundpanic::recover) if the test thread fails to spawn. This is required since emscripten doesn't have threads.abort(-1). I think it's better to always error when a symbol is missing.DISABLE_EXCEPTION_CATCHING=0is required to make exceptions work when optimizations are on. However the docs say that this causes a big difference in binary size and runtime performances. From my experience with emscripten, these differences can sometimes be massive.I also have some modifications in my local clone of the emscripten SDK to make all this work.