[Compass-ci] [PATCH v4 lkp-tests 3/4] test/cci-makepkg: Refactor encapsulate the statement as a function