Add integration tests and improve revision calculation
Improve tests to also check for extra revision and source-rpm-only builds