[Xtro] Ensure that when we do auto sanitize we do not return a fail. (#15551)
When working on the bindings we can use the "AUTO_SANITIZE" env var to let xtro know that we want the lines that have been fixed to be removed, unfortunatly this mode has a bug. When we autosanitized we should do the same as the skip and not return the lines that have been cleaned as the return code. Returning the error code meant that when we did make all, the first target (classic) would work, but the second target would not because the first one failed. Doing this allows to work on the bindings and have AUTO_SANITIZE work both for classic and dotnet when doing make all.
This commit is contained in:
Родитель
e3a84d287d
Коммит
0a1437aac1
|
@ -302,7 +302,10 @@ namespace Extrospection {
|
||||||
Console.WriteLine ($"Sanity check failed ({count})");
|
Console.WriteLine ($"Sanity check failed ({count})");
|
||||||
|
|
||||||
// useful when updating stuff locally - we report but we don't fail
|
// useful when updating stuff locally - we report but we don't fail
|
||||||
return Environment.GetEnvironmentVariable ("XTRO_SANITY_SKIP") == "1" ? 0 : count;
|
var sanitizedOrSkippedSanity =
|
||||||
|
!string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("XTRO_SANITY_SKIP"))
|
||||||
|
|| !string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("AUTO_SANITIZE"));
|
||||||
|
return sanitizedOrSkippedSanity ? 0 : count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче