build: use binary mask for build status flags

If multiple builds with fail with different errors it will be reflected
in the status code.

eg.

	103 => timeout + hash mismatch
	105 => timeout + check mismatch
	106 => hash mismatch + check mismatch
	107 => timeout + hash mismatch + check mismatch
This commit is contained in:
Daiderd Jordan 2019-05-11 23:14:19 +02:00
parent 97baf32fbc
commit cbf84bcce7
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -4471,7 +4471,15 @@ void Worker::waitForInput()
unsigned int Worker::exitStatus() unsigned int Worker::exitStatus()
{ {
return checkMismatch ? 104 : (hashMismatch ? 102 : (timedOut ? 101 : (permanentFailure ? 100 : 1))); unsigned int mask = 0;
if (timedOut)
mask |= 1;
if (hashMismatch)
mask |= 2;
if (checkMismatch)
mask |= 4;
return mask ? 100 + mask : 1;
} }