This is the problem here: it is making

```rust
mod __something {
     use test;

     // ... things using `test::foo()`
}
```

but libtest has no module `test`. One fix would be to add a module to `libtest/lib.rs` that reexports the relevant functions, e.g.

```rust
mod libtest_satisfy_the_test_runner { 
    pub use {test_main_static, 
             TestDescAndFn,
             TestDesc, StaticTestName,
             StaticTestFn, StaticBenchFn};
}
```

(Change the `let test_crate_id = token::str_to_ident("test");` to `"libtest_satisfy_the_test_runner"`.)

Hopefully someone has a better idea because that solution is really ugly. :(