So when the environment value isn't set, one can specify the default
value to return.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
return list_subtests;
}
-static bool env_set(const char *env_var)
+static bool env_set(const char *env_var, bool default_value)
{
char *val;
val = getenv(env_var);
if (!val)
- return false;
+ return default_value;
return atoi(val) != 0;
}
static int simulation = -1;
if (simulation == -1)
- simulation = env_set("INTEL_SIMULATION");
+ simulation = env_set("INTEL_SIMULATION", false);
return simulation;
}