* Fixed systemd-sonic-generator for multi-asic 1. In function insert_instance_number instance_string was malloced for 2 char size which was limiting the instance number value in instance_name to 1 digit. Fixed insert_instance_number to use asprintf to generate instancd_name for any number of instances. Added _GNU_SOURCE to CFLAGS for asprintf. 2. Fixed get_unit_files() to use calloc instead of malloc. Uninitialized memory was causing incorrect string mismatch error while comparing unit file name string. 3. Increased MAX_NUM_TARGETS and MAX_NUM_INSTALL_LINES values to 48 to handle more asic instances. 4. Added build UT support for systemd-sonic-generator: a. Refactor systemd-sonic-generator.c to be used with UT infra. b. Added UT infra to run build UT for systemd-sonic-generator c. Added functional level and program level UT class and test cases. * Resolved review comments. 1. Explicitly setting global pointers to NULL in definitions. 2. Added a space before ": public" in class definitions to align style with SONiC C++ files. * Merged strtok_r statements in single command. Signed-off-by: Anand Mehra <anamehra@cisco.com>
18 lines
369 B
Makefile
Executable File
18 lines
369 B
Makefile
Executable File
#!/usr/bin/make -f
|
|
|
|
DISTRIBUTION = $(shell sed -n "s/^VERSION_CODENAME=//p" /etc/os-release)
|
|
VERSION = 1.0.0
|
|
PACKAGEVERSION = $(VERSION)
|
|
|
|
%:
|
|
dh $@
|
|
|
|
override_dh_auto_clean:
|
|
override_dh_auto_build:
|
|
override_dh_auto_install:
|
|
make systemd-sonic-generator
|
|
make install DESTDIR=debian/systemd-sonic-generator
|
|
|
|
override_dh_gencontrol:
|
|
dh_gencontrol -- -v$(PACKAGEVERSION)
|