added the --test switch, instead of setting the variable in code.