path: root/tests
diff options
authorGu Jinxiang <>2018-02-08 14:34:18 +0800
committerDavid Sterba <>2018-02-13 15:41:32 +0100
commiteb2fe7d1c476ebfa434ec2cf8afd1b52cce0f28e (patch)
tree1d4025a45b551910f4ddb402e3b97235262ef456 /tests
parentd5238ad71140b0222aa805382c679599b2c91025 (diff)
btrfs-progs: Add make testsuite command for export tests
Export the testsuite files to a separate tar. Since fsck tests depend on btrfs-corrupt-block, and misc tests depends on both btrfs-corrupt-block and fssum, so set it as prerequisites for package commad. Because, althougth fssum can be generated by source that are all in tests directory, and has no rely on the btrfs's structure. But btrfs-corrupt-block deeply relys on btrfs's structure. For consistency, at the present stage, generete the two when create test tar. Signed-off-by: Gu Jinxiang <> [ applied without changes, the generated tarball will be different from the one after the follow up commits ] Signed-off-by: David Sterba <>
Diffstat (limited to 'tests')
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/ b/tests/
new file mode 100755
index 00000000..0ed7dd99
--- /dev/null
+++ b/tests/
@@ -0,0 +1,37 @@
+# export the testsuite files to a separate tar
+if ! [ -f $TESTSUITES_LIST_FILE ];then
+ echo "testsuites list file is not exsit."
+ exit 1
+if [ -z "$TESTSUITES_LIST" ]; then
+ echo "no file be list in testsuites-list"
+ exit 1
+if [ -f $DEST ];then
+ echo "remove exsit package: " $DEST
+ rm $DEST
+if [ -f $TEST_ID ];then
+ rm $TEST_ID
+TIMESTAMP=`date -u "+%Y-%m-%d %T %Z"`
+echo "git version: " $VERSION > $TEST_ID
+echo "this tar is created in: " $TIMESTAMP >> $TEST_ID
+echo "begin create tar: " $DEST
+tar --exclude-vcs-ignores -zScf $DEST -C ../ $TESTSUITES_LIST
+if [ $? -eq 0 ]; then
+ echo "create tar successfully."
+rm $TEST_ID