'Returns the command to run the test, or None to skip.
Args:
test_name: The test to run.
spec: The test specification profile.
This argument will be pruned as values are consumed from it.
Returns:
The command line argument list, or None to skip.
This may throw an exception if the spec is invalid.
This does not consider quota, which is checked later.'

def make_test_command_or_none(self, test_name, spec):

    options = self.options
    microservice_api = spec.get('api')
    test_rel_path = (spec.pop('path', None) or os.path.join('citest', 'tests', '{0}.py'.format(test_name)))
    args = spec.pop('args', {})
    if (not self.validate_test_requirements(test_name, spec)):
        return None
    testing_root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'testing'))
    test_path = os.path.join(testing_root_dir, test_rel_path)
    citest_log_dir = os.path.join(options.log_dir, 'citest_logs')
    if (not os.path.exists(citest_log_dir)):
        try:
            os.makedirs(citest_log_dir)
        except:
            if (not os.path.exists(citest_log_dir)):
                raise
    command = ['python', test_path, '--log_dir', citest_log_dir, '--log_filebase', test_name, '--native_host', 'localhost', '--native_port', str(self.__forwarded_ports[microservice_api].port)]
    if options.test_stack:
        command.extend(['--test_stack', options.test_stack])
    self.add_extra_arguments(test_name, args, command)
    return command
