diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-05-16 19:43:38 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-05-16 19:43:38 +0000 |
commit | 49b60d6f67a94560a802c6ff80c16c92093de877 (patch) | |
tree | acf5e7c4551b393c64fa35535427173751caca82 /t/test-lib.sh | |
parent | 39f625fff05d457b01f088017f463a86d3b6c626 (diff) | |
download | rainbows-49b60d6f67a94560a802c6ff80c16c92093de877.tar.gz |
This makes things easier to maintain as we add more concurrency options.
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index be654d6..2f02cf1 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -225,6 +225,37 @@ check_splice () { esac } +check_threaded_app_dispatch () { + case $model in + ThreadSpawn|ThreadPool) ;; + RevThreadSpawn|RevThreadPool) ;; + CoolioThreadSpawn|CoolioThreadPool) ;; + XEpollThreadSpawn|XEpollThreadPool) ;; + *) + t_info "$0 is only compatible with threaded app dispatch" + exit 0 ;; + esac +} + +check_copy_stream () { + case $RUBY_VERSION in + 1.9.*) ;; + *) + t_info "skipping $T since it can't IO.copy_stream" + exit 0 + ;; + esac + + case $model in + ThreadSpawn|WriterThreadSpawn|ThreadPool|WriterThreadPool|Base) ;; + XEpollThreadSpawn|XEpollThreadPool) ;; + *) + t_info "skipping $T since it doesn't use copy_stream" + exit 0 + ;; + esac +} + case $model in Rev) require_check rev Rev::VERSION ;; Coolio) require_check coolio Coolio::VERSION ;; |