-module(my_testsuite). -export([test/0, test/1]). test() -> test([]). test(Options) -> TestSpec = {module, testme}, ReturnValue = case code:load_file(eunit) of {module, _} -> case eunit:test(TestSpec, Options) of ok -> 0; %% test passes _ -> 1 %% test fails end; _ -> 77 %% EUnit not found, test skipped end, init:stop(ReturnValue).