diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/mozbase/mozdevice/sut_tests/test_push2.py | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/mozbase/mozdevice/sut_tests/test_push2.py')
-rw-r--r-- | testing/mozbase/mozdevice/sut_tests/test_push2.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/mozbase/mozdevice/sut_tests/test_push2.py b/testing/mozbase/mozdevice/sut_tests/test_push2.py new file mode 100644 index 000000000..5ccea509e --- /dev/null +++ b/testing/mozbase/mozdevice/sut_tests/test_push2.py @@ -0,0 +1,39 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +import os +import posixpath + +from dmunit import DeviceManagerTestCase + + +class Push2TestCase(DeviceManagerTestCase): + + def runTest(self): + """This tests copying a directory structure with files to the device. + """ + testroot = posixpath.join(self.dm.deviceRoot, 'infratest') + self.dm.removeDir(testroot) + self.dm.mkDir(testroot) + path = posixpath.join(testroot, 'push2') + self.dm.pushDir(os.path.join('test-files', 'push2'), path) + + # Let's walk the tree and make sure everything is there + # though it's kind of cheesy, we'll use the validate file to compare + # hashes - we use the client side hashing when testing the cat command + # specifically, so that makes this a little less cheesy, I guess. + self.assertTrue( + self.dm.dirExists(posixpath.join(testroot, 'push2', 'sub1'))) + self.assertTrue(self.dm.validateFile( + posixpath.join(testroot, 'push2', 'sub1', 'file1.txt'), + os.path.join('test-files', 'push2', 'sub1', 'file1.txt'))) + self.assertTrue(self.dm.validateFile( + posixpath.join(testroot, 'push2', 'sub1', 'sub1.1', 'file2.txt'), + os.path.join('test-files', 'push2', 'sub1', 'sub1.1', 'file2.txt'))) + self.assertTrue(self.dm.validateFile( + posixpath.join(testroot, 'push2', 'sub2', 'file3.txt'), + os.path.join('test-files', 'push2', 'sub2', 'file3.txt'))) + self.assertTrue(self.dm.validateFile( + posixpath.join(testroot, 'push2', 'file4.bin'), + os.path.join('test-files', 'push2', 'file4.bin'))) |