Skip to content

Commit

Permalink
* run-tests.py: Exit on failed test. Fixed order of tests.
Browse files Browse the repository at this point in the history
git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@304 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information
ludvigm committed Dec 29, 2008
1 parent d3e5fa0 commit 86ae045
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* s3cmd: Replace unknown Unicode characters with '?'
to avoid UnicodeEncodeError's. Also make all output strings
unicode.
* run-tests.py: Exit on failed test. Fixed order of tests.

2008-12-29 Michal Ludvig <michal@logix.cz>

Expand Down
19 changes: 10 additions & 9 deletions run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def failure(message = ""):
print "----"
print stdout
print "----"
return 1
#return 1
sys.exit(1)
def success(message = ""):
global count_pass
if message:
Expand Down Expand Up @@ -186,7 +187,7 @@ def test_rmdir(label, dir_name):

## ====== Sync to S3
exclude_unicode_args = []
if have_unicode:
if not have_unicode:
exclude_unicode_args = [ '--exclude', 'unicode/*' ]
test_s3cmd("Sync to S3", ['sync', 'testsuite', 's3://s3cmd-autotest-1/xyz/', '--exclude', '.svn/*', '--exclude', '*.png', '--no-encrypt'] + exclude_unicode_args)

Expand Down Expand Up @@ -253,6 +254,13 @@ def test_rmdir(label, dir_name):
must_not_find = [ 'Object s3://s3cmd-autotest-1/xyz/etc/logo.png moved to s3://s3cmd-autotest-1/xyz/etc2/Logo.PNG' ])


## ====== Sync more from S3
test_s3cmd("Sync more from S3", ['sync', '--delete-removed', 's3://s3cmd-autotest-1/xyz', 'testsuite-out'],
must_find = [ "deleted 'testsuite-out/etc/logo.png'", "stored as testsuite-out/etc2/Logo.PNG (22059 bytes",
"stored as testsuite-out/.svn/format " ],
must_not_find_re = [ "not-deleted.*etc/logo.png" ])


## ====== Make dst dir for get
test_rmdir("Remove dst dir for get", "testsuite-out")

Expand All @@ -272,13 +280,6 @@ def test_rmdir(label, dir_name):
must_find = [ u"saved as 'testsuite-out/Logo.PNG'", u"saved as 'testsuite-out/AtomicClockRadio.ttf'" ])


## ====== Sync more from S3
test_s3cmd("Sync more from S3", ['sync', '--delete-removed', 's3://s3cmd-autotest-1/xyz', 'testsuite-out'],
must_find = [ "deleted 'testsuite-out/etc/logo.png'", "stored as testsuite-out/etc2/Logo.PNG (22059 bytes",
"stored as testsuite-out/.svn/format " ],
must_not_find_re = [ "not-deleted.*etc/logo.png" ])


## ====== Copy between buckets
test_s3cmd("Copy between buckets", ['cp', 's3://s3cmd-autotest-1/xyz/etc2/Logo.PNG', 's3://s3cmd-Autotest-3'],
must_find = [ "Object s3://s3cmd-autotest-1/xyz/etc2/Logo.PNG copied to s3://s3cmd-Autotest-3/xyz/etc2/Logo.PNG" ])
Expand Down

0 comments on commit 86ae045

Please sign in to comment.