CLAS: Avoid unnecessary serialize of testclasses include (#4013)

* CLAS: Avoid unnecessary serialize of testclass file

Unit tests are only functional if the corresponding flag is set (`seoclassdf-with_unit_tests`). Therefore, if the flag is not set, there's no need to serialize this include.

* Added version to select

* Switch to seo function

* Set  mv_skip_testclass

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Marc Bernard 2020-10-14 03:38:29 -04:00 committed by GitHub
parent 5068e7553c
commit 4ebde6d1a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,6 +297,24 @@ CLASS ZCL_ABAPGIT_OO_SERIALIZER IMPLEMENTATION.
METHOD serialize_testclasses.
DATA ls_vseoclass TYPE vseoclass.
CALL FUNCTION 'SEO_CLIF_GET'
EXPORTING
cifkey = is_clskey
version = seoc_version_active
IMPORTING
class = ls_vseoclass
EXCEPTIONS
not_existing = 1
deleted = 2
model_only = 3
OTHERS = 4.
IF sy-subrc <> 0 OR ls_vseoclass-with_unit_tests = abap_false.
mv_skip_testclass = abap_true.
RETURN.
ENDIF.
rt_source = read_include( is_clskey = is_clskey
iv_type = seop_ext_class_testclasses ).