tags:

views:

27

answers:

1

Is there any way to specify that a function should be called when a test ends in Specman?

I'm looking for something similar to C's atexit().

+1  A: 

Hi Nathan,

haven't tried my self, but you should probably have a look at the finalize() or quit() methods which are defined for any_struct. You could try to extend it for sys.

extend sys {
    finalize() is also {
        // ...
    };
};

Cheers, Daniel

danielpoe
Looking at specman's help, it looks like `finalize()` is what I'm looking for. `quit()` will simply exit the test. Thanks!
Nathan Fellman