change cmi_and_test to first build the tests and then run them