Skip to content

Commit 5e841a1

Browse files
authored
Fixed command /usr/bin/thermalctld to /usr/local/bin/thermalctld in platform test (#3178)
The file path was changed in bellow pull request, but tests in sonic-mgmt were not updated, after that PR was merged sonic-net/sonic-buildimage#6176
1 parent 8cf9da9 commit 5e841a1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/platform_tests/test_platform_info.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,13 @@ def test_thermal_control_fan_status(duthosts, enum_rand_one_per_hwsku_hostname,
439439

440440
single_fan_mocker = mocker_factory(duthost, 'SingleFanMocker')
441441
time.sleep(THERMAL_CONTROL_TEST_WAIT_TIME)
442+
if "201811" in duthost.os_version or "201911" in duthost.os_version:
443+
THERMALCTLD_PATH = '/usr/bin/thermalctld'
444+
else:
445+
THERMALCTLD_PATH = '/usr/local/bin/thermalctld'
442446

443-
_fan_log_supported = duthost.command('docker exec pmon grep -E "{}" /usr/bin/thermalctld'\
444-
.format(LOG_EXPECT_INSUFFICIENT_FAN_NUM_RE), module_ignore_errors=True)
447+
_fan_log_supported = duthost.command('docker exec pmon grep -E "{}" {}'\
448+
.format(LOG_EXPECT_INSUFFICIENT_FAN_NUM_RE, THERMALCTLD_PATH), module_ignore_errors=True)
445449

446450
if single_fan_mocker.is_fan_removable():
447451
loganalyzer.expect_regex = [LOG_EXPECT_FAN_REMOVE_RE, LOG_EXPECT_INSUFFICIENT_FAN_NUM_RE]

0 commit comments

Comments
 (0)