YMI
YMI

Reputation: 165

Specman e: Handling unexpected end of test

I'm looking for the function that handles unexpected end of tests and can't seem to find it. I know there should be one, because system errors (os11, for example) and debug aborts are handled by Specman.

We're using semaphores when running several tests in parallel, but whenever a test doesn't end properly due to a system error or during debug sessions, the function that frees the semaphore isn't executed, forcing us to manually release it and sometimes to completely restart Specview. I need to find a function (or functions) that can be extended so I can add the code that releases the semaphore to them.

Thanks!

Upvotes: 0

Views: 396

Answers (3)

YMI
YMI

Reputation: 165

Specman has no handler for aborted debug sessions. Cadence issued a patch that might find its way to future releases.

Upvotes: 0

Yuri Tsoglin
Yuri Tsoglin

Reputation: 963

Specifically for abort, you can also workaround it with a macro, for example:

define <my_abort'command> "my_abort" as {
    specman("do_my_special_things()");
    specman("abort");
};

it won't help with the GUI button, but typing my_abort from the command prompt will do it.

Upvotes: 0

Rodion Melnikov
Rodion Melnikov

Reputation: 338

You are probably looking for "configure run error_command=command_string". In the string you can call any method.

The problem is that though it is called for most mentioned cases, including os11 handled by Specman, it might not be called for some other real-life cases, like unhandled exceptions, critical exceptions handled by another tool, fatal errors, signal -9, etc.

So "config run" can significantly improve you situation, but will not give you a solution for the cases that Specman doesn't handle gracefully. For that you probably need some control mechanism outside of Specman.

Upvotes: 1

Related Questions