diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index 86b635151..08ee50be1 100644 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -415,6 +415,8 @@ my %usage = ( rflash -p [--activate {disruptive|deferred}] [-d ] rflash [--commit | --recover] rflash [--bpa_acdl] + NeXtScale FPC specific: + rflash http:///path/to/update.rom OpenPOWER BMC specific (using IPMI): rflash [|-d ] [-c|--check] [--retry=] rflash --recover diff --git a/xCAT-test/unit/rflash_usage.t b/xCAT-test/unit/rflash_usage.t new file mode 100644 index 000000000..4d49dc854 --- /dev/null +++ b/xCAT-test/unit/rflash_usage.t @@ -0,0 +1,34 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +use FindBin; +use lib "$FindBin::Bin/../../perl-xCAT"; +use Test::More; + +BEGIN { + package xCAT::Utils; + sub Version { return 'test'; } +} + +{ + local $INC{'xCAT/Utils.pm'} = __FILE__; + require xCAT::Usage; +} + +my $usage = xCAT::Usage->parseCommand( 'rflash', '--help' ); + +like( $usage, qr/\QNeXtScale FPC specific:\E/x, + 'rflash help identifies the NeXtScale FPC form' ); +like( + $usage, + qr{\Qrflash http:///path/to/update.rom\E}x, + 'rflash help gives the complete FPC firmware URL syntax' +); + +like( $usage, qr/\QPPC (using Direct FSP Management) specific:\E/x, + 'rflash help retains the Direct FSP form' ); +like( $usage, qr/\QOpenPOWER BMC specific (using IPMI):\E/x, + 'rflash help retains the OpenPOWER IPMI form' ); + +done_testing();