Skip to content

Commit f18441b

Browse files
committed
lnms dev:check --os-modules-only always
Make --os-modules-only always work. So if you run as worked before like this to skip os detection tests: `lnms dev:check unit --os ios --os-modules-only` Or like this to just test all discovery/polling modules (new): `lnms dev:check unit --os-modules-only`
1 parent bc4dcac commit f18441b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

LibreNMS/Util/CiHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function checkUnit()
203203
array_push($phpunit_cmd, '--group', 'docs');
204204
} elseif ($this->flags['unit_svg']) {
205205
$phpunit_cmd[] = 'tests/SVGTest.php';
206-
} elseif ($this->flags['unit_modules']) {
206+
} elseif ($this->flags['unit_modules'] || $this->flags['os-modules-only']) {
207207
$phpunit_cmd[] = 'tests/OSModulesTest.php';
208208
}
209209

app/Console/Commands/DevCheckCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,14 @@ private function parseInput()
9696
'lint_enable' => false,
9797
'unit_enable' => true,
9898
'web_enable' => false,
99-
'os-modules-only' => $this->option('os-modules-only'),
10099
]);
101100
$this->helper->setOS(explode(',', $os));
102101
}
103102

103+
$this->helper->setFlags([
104+
'os-modules-only' => $this->option('os-modules-only'),
105+
]);
106+
104107
if ($modules = $this->option('module')) {
105108
$this->helper->setFlags(['style_enable' => false, 'lint_enable' => false, 'unit_enable' => true, 'web_enable' => false]);
106109
$this->helper->setModules(explode(',', $modules));

0 commit comments

Comments
 (0)