From 629286ac6e8cbb27a8df1dd8161c29a3ceae0c0e Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Thu, 7 Dec 2017 05:15:31 -0500 Subject: [PATCH] add 2 more cases for option d --- .../autotest/testcase/rflash/rflash_openbmc.0 | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 index 954e8dfa2..3f422a6df 100644 --- a/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 +++ b/xCAT-test/autotest/testcase/rflash/rflash_openbmc.0 @@ -399,3 +399,58 @@ check:output=~Error: Invalid ID provided to delete check:output!~Attempting to delete check:rc != 0 end + +start:rflash_option_d_with_multiple_values +description: basic usage check for option d. if there are multiple value assigned to d option, should throw out error message +os:Linux +hcp:openbmc +cmd:rflash $$CN -d /123/ /234/ +check:output=~Error: More than one +check:output!~Attempting to +check:rc != 0 +cmd:rflash $$CN /123/ /234/ -d +check:output=~Error: More than one +check:output!~Attempting to +check:rc != 0 +cmd:rflash $$CN /123/ -d /234/ +check:output=~Error: More than one +check:output!~Attempting to +check:rc != 0 +end + + +start:rflash_option_d_with_non_existent_dir +description: basic usage check for option -d. if try to oprate non-existent dir by d option, should throw out error message +os:Linux +hcp:openbmc +cmd:rm -rf /tmp/bogus123 +check:rc == 0 +cmd:rflash $$CN -d /tmp/bogus123 +check:output=~Error: Can't open directory +check:output!~Attempting to +check:rc != 0 +cmd:mkdir -p /tmp/bogus123 +check:rc == 0 +cmd:rflash $$CN /tmp/bogus123 -d +check:output =~Error: No BMC tar file found +check:output =~Error: No PNOR tar file found +check:output!~Attempting to +check:rc != 0 +cmd:touch obmc-phosphor-image-witherspoon.ubi.mtd.tar /tmp/bogus123 +check:rc == 0 +cmd:rflash $$CN -d /tmp/bogus123 +check::output =~Error: No BMC tar file found +check:output =~Error: No PNOR tar file found +check:output!~Attempting to +check:rc != 0 +cmd:touch witherspoon.pnor.squashfs.tar /tmp/bogus123 +check:rc == 0 +cmd:rflash $$CN -d /tmp/bogus123 +check:output =~Error: No BMC tar file found +check:output =~Error: No PNOR tar file found +check:output!~Attempting to +check:rc != 0 +cmd:rm -rf /tmp/bogus123 +check:rc == 0 +end +