Skip to contentSkip to conversation

cryptsetup: Add check for 'expect' in test_pre_check().

PATCH Applied Wang Mingyu 2 participants 3 messages Oct 12, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cryptsetup: Add check for 'expect' in test_pre_check().

---
 engine/tests/Functional.cryptsetup/fuego_test.sh | 2 ++
 1 file changed, 2 insertions(+)
engine/tests/Functional.cryptsetup/fuego_test.sh +2 -0
index 7354b01..fc916c4 100644
@@ -1,6 +1,8 @@
 function test_pre_check {
     is_on_target_path cryptsetup PROGRAM_CRYPTSETUP
     assert_define PROGRAM_CRYPTSETUP "Missing 'cryptsetup' program on target board"
+    is_on_target_path expect PROGRAM_EXPECT
+    assert_define PROGRAM_EXPECT "Missing 'expect' program on target board"
 }
 
 function test_deploy {
Signature · 1 line
1.8.3.1
#1 lore raw

Applied. Thanks,
-- Tim

Quoted 43 lines

-----Original Message-----
From: [email protected] [mailto:fuego- [email protected]] On Behalf Of Wang Mingyu
Sent: Thursday, October 11, 2018 8:17 PM
To: [email protected]
Subject: [Fuego] [PATCH] cryptsetup: Add check for 'expect' in test_pre_check().

---
 engine/tests/Functional.cryptsetup/fuego_test.sh | 2 ++
 1 file changed, 2 insertions(+)
engine/tests/Functional.cryptsetup/fuego_test.sh +0 -0
index 7354b01..fc916c4 100644
@@ -1,6 +1,8 @@
 function test_pre_check {
     is_on_target_path cryptsetup PROGRAM_CRYPTSETUP
     assert_define PROGRAM_CRYPTSETUP "Missing 'cryptsetup' program on

target board"

engine/tests/Functional.cryptsetup/fuego_test.sh +2 -0
+    is_on_target_path expect PROGRAM_EXPECT
+    assert_define PROGRAM_EXPECT "Missing 'expect' program on target

board"
}

function test_deploy {
--
1.8.3.1

_______________________________________________
Fuego mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-
3A__lists.linuxfoundation.org_mailman_listinfo_fuego&d=DwICAg&c=fP4tf- -1dS0biCFlB0saz0I0kjO5v7- GLPtvShAo4cc&r=jjTc71ylyJg68rRxrFQuDFMMybIqPCnrHF85A- GzCRg&m=qhk-LzKlTJVyWM27fX0UHee1-LpO0It4o0BA6BkCRIg&s=k- CLzWN5ap2S3xfTiZioK8V4ACMvlbyczB3CCi8zLb8&e=

#2 lore raw
In reply to Wang Mingyu
Quoted 18 lines

-----Original Message-----
From: Wang Mingyu

---
 engine/tests/Functional.cryptsetup/fuego_test.sh | 2 ++
 1 file changed, 2 insertions(+)
engine/tests/Functional.cryptsetup/fuego_test.sh +0 -0
index 7354b01..fc916c4 100644
@@ -1,6 +1,8 @@
 function test_pre_check {
     is_on_target_path cryptsetup PROGRAM_CRYPTSETUP
     assert_define PROGRAM_CRYPTSETUP "Missing 'cryptsetup' program on

target board"

engine/tests/Functional.cryptsetup/fuego_test.sh line 5

Quoted 2 lines
engine/tests/Functional.cryptsetup/fuego_test.sh +2 -0
+    is_on_target_path expect PROGRAM_EXPECT
+    assert_define PROGRAM_EXPECT "Missing 'expect' program on target board"

We do this combination often enough, that I'm starting to think we should add a core function: assert_has_program() that would just combine these two lines into a single function call:

Called like so:
assert_has_program expect

Would you be willing to write a patch for this, and put the new function in fuego-core/engine/scripts/functions.sh?

This will make a lot of these test_pre_check functions more readable, I think.

Thanks,
-- Tim

If you really want to finish up the feature, you could also add documentation for the function on the fuegotest.org wiki. You can copy one of the existing function wiki pages, and put a link to the new page on:
http://fuegotest.org/wiki/Test_Script_APIs