tags:

views:

38

answers:

1

I've a make file for a scripted system, with a lot of tests which should pass. Each test is a separate call to the scripting application:

#----------------------------------------------------------------------------
# run test scripts in the module::test
#----------------------------------------------------------------------------
scripted_tests: bin/kin modules/test/actor_equality.kin modules/test/actor_fibre.kin ...
    bin/kin modules/test/actor_equality.kin
    bin/kin modules/test/actor_fibre.kin
    ...

Which is fine. I also have some similar tests which should return failure. I know that - will ignore the return status, but there must be something simple to invert the return status so I can run

#----------------------------------------------------------------------------
# run test scripts in the module::test::errors
#----------------------------------------------------------------------------
inverse_tests: bin/kin modules/test/error/bad_function.kin ...
    not bin/kin modules/test/error/bad_function.kin
    ...
+1  A: 

Use the ! command.

echo This returns success
! echo This returns failure
Dave Hinton
Specifically, its "! bin/kin" rather than "!bin/kin", which I tried and got an error
Pete Kirkham