summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2015-07-09 22:03:32 +0800
committerChase Qi <chase.qi@linaro.org>2015-07-09 22:06:16 +0800
commitf5bae31140cedda73cbb692d0a040ecafcf332e5 (patch)
tree966e4caaab03ed329fd3f9fa242cfbd75afc36ff /common
parent1f86b3de0620055a9c5f39f4ab43b2c0d2078e00 (diff)
downloadtest-definitions-pipe-f5bae31140cedda73cbb692d0a040ecafcf332e5.tar.gz
common: add overlay filesystem test
Change-Id: Ifb17c7e8e3c7a16a9c90a43878f866f8bc755563 Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'common')
-rwxr-xr-xcommon/overlayfs.yaml28
-rwxr-xr-xcommon/scripts/overlayfs.py108
2 files changed, 136 insertions, 0 deletions
diff --git a/common/overlayfs.yaml b/common/overlayfs.yaml
new file mode 100755
index 0000000..d6c41b1
--- /dev/null
+++ b/common/overlayfs.yaml
@@ -0,0 +1,28 @@
+metadata:
+ name: overlayfs
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Run overlay filesystem test from unionmount testsuite on
+ Linaro Ubuntu and OpenEmbedded"
+ maintainer:
+ - milosz.wasilewski@linaro.org
+ - chase.qi@linaro.org
+ os:
+ - ubuntu
+ - openembedded
+ scope:
+ - functional
+ devices:
+ - arndale
+ - beaglebone-black
+ - rtsm_fvp_base-aemv8a
+ - mustang
+ - panda
+ - juno
+
+install:
+ git-repos:
+ - url: http://git.linaro.org/qa/unionmount-testsuite.git
+
+run:
+ steps:
+ - './common/scripts/overlayfs.py $(readlink -f unionmount-testsuite)'
diff --git a/common/scripts/overlayfs.py b/common/scripts/overlayfs.py
new file mode 100755
index 0000000..4ce5c9a
--- /dev/null
+++ b/common/scripts/overlayfs.py
@@ -0,0 +1,108 @@
+#!/usr/bin/env python
+#
+# Run overlay filesystem test from unionmount testsuite on Linaro ubuntu and
+# OpenEmbedded.
+#
+# Copyright (C) 2012 - 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Chase Qi <chase.qi@linaro.org>
+#
+import os
+import sys
+import subprocess
+
+TestSuitePath = sys.argv[1]
+TermSlashList = ['0', '1']
+TESTS = ['open-plain',
+ 'open-trunc',
+ 'open-creat',
+ 'open-creat-trunc',
+ 'open-creat-excl',
+ 'open-creat-excl-trunc',
+ 'noent-plain',
+ 'noent-trunc',
+ 'noent-creat',
+ 'noent-creat-trunc',
+ 'noent-creat-excl',
+ 'noent-creat-excl-trunc',
+ 'sym1-plain',
+ 'sym1-trunc',
+ 'sym1-creat',
+ 'sym1-creat-excl',
+ 'sym2-plain',
+ 'sym2-trunc',
+ 'sym2-creat',
+ 'sym2-creat-excl',
+ 'symx-plain',
+ 'symx-trunc',
+ 'symx-creat',
+ 'symx-creat-excl',
+ 'symx-creat-trunc',
+ 'truncate',
+ 'dir-open',
+ 'dir-weird-open',
+ 'dir-open-dir',
+ 'dir-weird-open-dir',
+ 'dir-sym1-open',
+ 'dir-sym1-weird-open',
+ 'dir-sym2-open',
+ 'dir-sym2-weird-open',
+ 'readlink',
+ 'mkdir',
+ 'rmdir',
+ 'hard-link',
+ 'hard-link-dir',
+ 'hard-link-sym',
+ 'unlink',
+ 'rename-file',
+ 'rename-empty-dir',
+ 'rename-new-dir',
+ 'rename-pop-dir',
+ 'rename-new-pop-dir',
+ 'rename-move-dir',
+ 'rename-mass',
+ 'rename-mass-2',
+ 'rename-mass-3',
+ 'rename-mass-4',
+ 'rename-mass-5',
+ 'rename-mass-dir',
+ 'rename-mass-sym',
+ 'impermissible']
+
+if os.path.isfile('/usr/bin/python3'):
+ PYTHON = 'python3'
+else:
+ PYTHON = 'python'
+PythonVersion = subprocess.check_output([PYTHON, '--version'])
+print 'Running tests with: ' + PythonVersion
+
+for TEST in TESTS:
+ for TermSlash in TermSlashList:
+ if TermSlash == '1':
+ SUFFIX = '-termslash'
+ else:
+ SUFFIX = ''
+
+ TestCommand = [PYTHON, TestSuitePath + '/run', '--ov',
+ '--ts=' + TermSlash, TEST]
+ print 'Running %s with command: %s' % (TEST, TestCommand)
+ if subprocess.call(TestCommand) == 0:
+ subprocess.call(['lava-test-case', TEST + SUFFIX,
+ '--result', 'pass'])
+ else:
+ subprocess.call(['lava-test-case', TEST + SUFFIX,
+ '--result', 'fail'])