test: Provide test scripts and sample data
PATCH 1/1 test: Provide test scripts and sample data
Two test scripts cover basic functionality in both build and runtime with some sample data of three boards.
Signed-off-by Jianxun Zhang <[email protected]>
---
This is the first patch to rmc project since it was published in YP. After consulting some people, we choose yocto mailing list for rmc patch review.
Thanks
test/README | 63 +++++++++++++++++++++++ test/boards/NUC4.D54250WYK.fp | Bin 0 -> 149 bytes test/boards/NUC4.file.1 | 1 + test/boards/NUC4.file.2 | 1 + test/boards/NUC6.file.1 | 1 + test/boards/NUC6.file.2 | 1 + test/boards/NUC6.file.3 | 11 ++++ test/boards/NUC6i5SYB_H.fp | Bin 0 -> 149 bytes test/boards/T100.32.file.1 | 2 + test/boards/T100.32.file.2 | 1 + test/boards/T100TA-32bit.fp | Bin 0 -> 116 bytes test/db.build.sh | 89 ++++++++++++++++++++++++++++++++ test/rmctool.runtime.sh | 117 ++++++++++++++++++++++++++++++++++++++++++ 13 files changed, 287 insertions(+) create mode 100644 test/README create mode 100644 test/boards/NUC4.D54250WYK.fp create mode 100644 test/boards/NUC4.file.1 create mode 100644 test/boards/NUC4.file.2 create mode 100644 test/boards/NUC6.file.1 create mode 100644 test/boards/NUC6.file.2 create mode 100644 test/boards/NUC6.file.3 create mode 100644 test/boards/NUC6i5SYB_H.fp create mode 100644 test/boards/T100.32.file.1 create mode 100644 test/boards/T100.32.file.2 create mode 100644 test/boards/T100TA-32bit.fp create mode 100755 test/db.build.sh create mode 100755 test/rmctool.runtime.sh
test/README new file +63 -0
@@ -0,0 +1,63 @@ +Test Suite of RMC project +================================================================================ + +To test RMC functionality, we provide scripts and some launched commercial +boards with sample data. + +*.runtime.*: Test to run on a type of board + +*.build.*: Test to run at build time + +===== +db.build.sh - Test database generation with built-in samples + +What it does: +() Compile rmc tool +() Generate a RMC database file with data in ./boards and check if it is +identical to a known fully-tested database based on same data. + +Usage: +# To run test in test directory: +./db.build.sh + +# To run test against another database checksum: +RMC_TEST_DB_MD5=your_md5_digist_string ./db.build.sh + +# To obtain a copy of the current golden sample database, make sure no change +# in ./boards, then run: +RMC_TEST_DB_MD5="" ./db.build.sh + +===== +rmctool.runtime.sh - Test querying data and fingerprint at runtime on target + +What it does: +() Test obtaining fingerprint on a supported board +() Test querying data on a supported board +() Test querying data for other boards (negative case) + +Usage: +Copy rmctool.runtime.sh, a database file and rmc tool onto target. +Change permissions so that the test script and rmc tool for test are executable. + +# To run test with a provided rmc database file: +./rmctool.runtime.sh database_file + +# To run test with a specified rmc tool: +RMC_BIN=pathname_of_rmc ./rmctool.runtime.sh database_file + +# To run test and specify another directory for data generated in test: +./rmctool.runtime.sh database_file test_dir + +===== +Update sample data for test +() Modify data in ./boards + +() Run this command to generate a new database file: +RMC_TEST_DB_MD5="" ./db.build.sh + +() Run *.runtime.* scripts and pass ALL test cases on ALL boards with the new +database file. + +() Update database checksum in ./db.build.sh + +() Run *.build.* scripts and pass all tests in build time.
test/boards/NUC4.D54250WYK.fp new file binary +0 -0
test/boards/NUC4.file.1 new file +1 -0
@@ -0,0 +1 @@ +Sample data #1 for NUC Gen 4
test/boards/NUC4.file.2 new file +1 -0
@@ -0,0 +1 @@ +Sample data #2 for NUC Gen 4
test/boards/NUC6.file.1 new file +1 -0
@@ -0,0 +1 @@ +This is #1 sample data file of NUC Gen 6
test/boards/NUC6.file.2 new file +1 -0
@@ -0,0 +1 @@ +This is #2 sample data file of NUC Gen 6
test/boards/NUC6.file.3 new file +11 -0
@@ -0,0 +1,11 @@ +# This is #3 sample data file of NUC Gen 6 +# We put more lines here for diversity in test data. +# +# Name: RMC (Runtime Machine Configuration) +# Age: less than one year +# Why were you created: To reach the highest level of scalability in a generic SW stack +# What do you like: Run on boards as many as possible +# What do you hate: Become something giant, complicated and just to create jobs +# What do you believe in: Necessity +# When do you want to die: When what I believe in is gone or when what I hate becomes true +# What do you want to say to your creator: Please fix bugs in me
test/boards/NUC6i5SYB_H.fp new file binary +0 -0
test/boards/T100.32.file.1 new file +2 -0
@@ -0,0 +1,2 @@ +# Sample file #1 for ASUS T100 (32bit) +# We put more content (this line) for some diversity in data length.
test/boards/T100.32.file.2 new file +1 -0
@@ -0,0 +1 @@ +# This is #2 sample data file for ASUS T100 (32 bit)
test/boards/T100TA-32bit.fp new file binary +0 -0
test/db.build.sh new file +89 -0
89 lines not on this page · raw message
test/rmctool.runtime.sh new file +117 -0
117 lines not on this page · raw message
Signature · 1 line
2.7.4