[ANN] test-loop 12.0.3

Discussion in 'Ruby' started by Suraj Kurapati, Apr 26, 2011.

  1. test-loop - Continuous testing for Ruby with fork/eval
    https://github.com/sunaku/test-loop#readme


    What is it?
    -----------

    test-loop is a fast continuous testing tool for Ruby that automatically
    detects and tests changes in your application in an efficient manner:

    1. Absorbs the test execution overhead into the main Ruby process.
    2. Forks to run your test files without overhead and in parallel.
    3. Avoids running unchanged test blocks inside changed test files.


    What is new?
    ------------

    Bug fixes:

    * Fix SIGCHLD handling and test completion reporting.
    (Daniel Pittman)

    We need to reap all ready children in SIGCHLD, not just the
    first, and should not be reporting completion in the signal
    handler.

    On a fast machine, or where there is a slow hook executed at the
    completion of a test run, more than one test child can terminate
    before the SIGCHLD handler is invoked, or while it is running.

    In that event we will only get another SIGCHLD when a new child
    terminates, not to signal that there was more than one current
    termination. We need to loop to collect all terminated children
    during each invocation of the handler.

    Since we don't know which child terminated, we wait on any
    terminated child with NOHANG, until it informs us that there are
    no more zombies hanging about.

    Doing all the work of finishing the test case, cleaning up, and
    running user hooks inside the SIGCHLD handler block was pretty
    slow. This could lead to a big pile-up of children that needed
    to be cleaned up, especially if the user hook did something like
    run another external process to signal completion.

    Moving the heavy work of completion outside the signal handler
    makes the whole thing a lot faster, and less likely to bump into
    the low limit for per-user processes on Mac OS-X.

    * Send SIGTERM to each worker PGID to kill workers.
    (Brian D. Burns)

    Using Process.setsid() in the workers establishes each process
    "as a new session and process group leader". So, the SIGTERM
    sent to the master's process group was not recieved by the
    workers. kill_workers was simply waiting for the workers to
    finish.

    * Revert "skip at_exit() handlers defined in master process".

    This reverts commit 0a0837f0b7ec92810e1c81d7506f2c8309f25f62
    which was originally written to skip the reporting of an empty
    test suite (master does not load test files, workers do) by
    Test::Unit and Minitest in the master process.

    Such a harmless annoyance should not warrant the crippling of
    at_exit in the master process because that would inhibit its
    valid uses as well:

    > "UNIX was not designed to stop you from doing stupid things,
    > because that would also stop you from doing clever things."
    > ~Doug Gwyn


    * `Thread.new { system() }` is not really backgrounded so `fork()`
    instead! Many thanks to Brian D. Burns and Daniel Pittman for
    helping solve [this
    issue](https://github.com/sunaku/test-loop/issues/5).

    --
    Posted via http://www.ruby-forum.com/.
     
    Suraj Kurapati, Apr 26, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Skybuck Flying

    Call oddities: &Test() vs &Test vs Test

    Skybuck Flying, Oct 4, 2009, in forum: C Programming
    Replies:
    1
    Views:
    705
    Skybuck Flying
    Oct 4, 2009
  2. Suraj Kurapati
    Replies:
    7
    Views:
    109
    Suraj Kurapati
    Jan 14, 2011
  3. Suraj Kurapati

    [ANN] test-loop 5.0.0

    Suraj Kurapati, Jan 17, 2011, in forum: Ruby
    Replies:
    0
    Views:
    102
    Suraj Kurapati
    Jan 17, 2011
  4. Suraj Kurapati

    [ANN] test-loop 5.0.3

    Suraj Kurapati, Jan 25, 2011, in forum: Ruby
    Replies:
    0
    Views:
    96
    Suraj Kurapati
    Jan 25, 2011
  5. Isaac Won
    Replies:
    9
    Views:
    382
    Ulrich Eckhardt
    Mar 4, 2013
Loading...

Share This Page