CHROMIUM: util/flashrom_tester: Make 'sys-info' dependency optional

The 'sys-info' crate is used for a single purpose: to check the
operating system release in the 'host_is_chrome_test'. This test is
specific to ChromeOS environments and is not relevant on other
platforms. Making the dependency optional improves the tester's
portability and allows it to be built and run on non-ChromeOS systems
without requiring this platform-specific check.

Create another feature flag, chromeos-host, for this.

BUG=b:426471570
TEST=`cargo test` in util/flashrom_tester
TEST=`cargo test --no-default-features`

Change-Id: I2e63725fc8a8ab36a7ef1800f7512a10056ffdff
Signed-off-by: Hsuan Ting Chen <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/6817762
Reviewed-by: Jian-Jia Su <[email protected]>
3 files changed
tree: 5a283a98fbd92892a5ecdd7451e6ebbdf62edd46
  1. .github/
  2. bindings/
  3. doc/
  4. flashchips/
  5. include/
  6. meson_cross/
  7. platform/
  8. scripts/
  9. subprojects/
  10. tests/
  11. util/
  12. .gitattributes
  13. .gitignore
  14. 82802ab.c
  15. action_descriptor.c
  16. action_descriptor.h
  17. amd_imc.c
  18. asm106x.c
  19. at45db.c
  20. atahpt.c
  21. atapromise.c
  22. atavia.c
  23. big_lock.c
  24. big_lock.h
  25. bitbang_spi.c
  26. board_enable.c
  27. buspirate_spi.c
  28. cbtable.c
  29. ch341a_spi.c
  30. ch347_spi.c
  31. chipset_enable.c
  32. cli_classic.c
  33. cli_common.c
  34. cli_getopt.c
  35. cli_output.c
  36. COPYING
  37. cros_ec.c
  38. cros_ec_commands.h
  39. custom_baud.c
  40. custom_baud_darwin.c
  41. custom_baud_linux.c
  42. dediprog.c
  43. developerbox_spi.c
  44. digilent_spi.c
  45. DIR_METADATA
  46. dirtyjtag_spi.c
  47. dmi.c
  48. Doxyfile
  49. drkaiser.c
  50. dummyflasher.c
  51. edi.c
  52. en29lv640b.c
  53. erasure_layout.c
  54. file_lock.c
  55. flashchips.c
  56. flashchips_crosbl.c
  57. flashrom.c
  58. fmap.c
  59. ft2232_spi.c
  60. gfxnvidia.c
  61. helpers.c
  62. helpers_fileio.c
  63. hwaccess_physmap.c
  64. hwaccess_x86_io.c
  65. hwaccess_x86_msr.c
  66. i2c_helper_linux.c
  67. ich_descriptors.c
  68. ichspi.c
  69. internal.c
  70. internal_par.c
  71. ipc_lock.h
  72. it8212.c
  73. it87spi.c
  74. jedec.c
  75. jlink_spi.c
  76. known_boards.c
  77. layout.c
  78. libflashrom.c
  79. libflashrom.map
  80. linux_mtd.c
  81. linux_spi.c
  82. MAINTAINERS
  83. mcp6x_spi.c
  84. mediatek_i2c_spi.c
  85. meson.build
  86. meson_options.txt
  87. mstarddc_spi.c
  88. ni845x_spi.c
  89. nic3com.c
  90. nicintel.c
  91. nicintel_eeprom.c
  92. nicintel_spi.c
  93. nicnatsemi.c
  94. nicrealtek.c
  95. ogp_spi.c
  96. opaque.c
  97. OWNERS
  98. parade_lspcon.c
  99. parallel.c
  100. pcidev.c
  101. pickit2_spi.c
  102. pony_spi.c
  103. power.c
  104. power.h
  105. PRESUBMIT.cfg
  106. print.c
  107. printlock.c
  108. processor_enable.c
  109. programmer.c
  110. programmer_table.c
  111. raiden_debug_spi.c
  112. rayer_spi.c
  113. README.chromiumos
  114. README.rst
  115. realtek_mst_i2c_spi.c
  116. s25f.c
  117. satamv.c
  118. satasii.c
  119. sb600spi.c
  120. serial.c
  121. serprog.c
  122. sfdp.c
  123. spi.c
  124. spi25.c
  125. spi25_statusreg.c
  126. spi95.c
  127. sst28sf040.c
  128. sst49lfxxxc.c
  129. sst_fwhub.c
  130. stlinkv3_spi.c
  131. stm50.c
  132. superio.c
  133. test_build.sh
  134. udelay.c
  135. udelay_dos.c
  136. unblocked_terms.txt
  137. usb_device.c
  138. usbblaster_spi.c
  139. usbdev.c
  140. VERSION
  141. w29ee011.c
  142. w39.c
  143. wbsio_spi.c
  144. writeprotect.c
  145. writeprotect_ranges.c