-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24620 from dillaman/wip-36431-luminous
luminous: qa/workunits: replace 'realpath' with 'readlink -f' in fsstress.sh Reviewed-by: Jason Dillaman <dillaman@redhat.com>
- Loading branch information
Showing
13 changed files
with
122 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
tasks: | ||
- qemu: | ||
all: | ||
test: http://git.ceph.com/?p={repo};a=blob_plain;h={branch};f=qa/workunits/suites/iozone.sh | ||
test: qa/workunits/suites/iozone.sh | ||
image_size: 20480 | ||
exclude_arch: armv7l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import copy | ||
|
||
from teuthology import misc | ||
from teuthology.orchestra import run | ||
|
||
class Refspec: | ||
def __init__(self, refspec): | ||
self.refspec = refspec | ||
|
||
def __str__(self): | ||
return self.refspec | ||
|
||
def _clone(self, git_url, clonedir, opts=None): | ||
if opts is None: | ||
opts = [] | ||
return (['rm', '-rf', clonedir] + | ||
[run.Raw('&&')] + | ||
['git', 'clone'] + opts + | ||
[git_url, clonedir]) | ||
|
||
def _cd(self, clonedir): | ||
return ['cd', clonedir] | ||
|
||
def _checkout(self): | ||
return ['git', 'checkout', self.refspec] | ||
|
||
def clone(self, git_url, clonedir): | ||
return (self._clone(git_url, clonedir) + | ||
[run.Raw('&&')] + | ||
self._cd(clonedir) + | ||
[run.Raw('&&')] + | ||
self._checkout()) | ||
|
||
|
||
class Branch(Refspec): | ||
def __init__(self, tag): | ||
Refspec.__init__(self, tag) | ||
|
||
def clone(self, git_url, clonedir): | ||
opts = ['--depth', '1', | ||
'--branch', self.refspec] | ||
return (self._clone(git_url, clonedir, opts) + | ||
[run.Raw('&&')] + | ||
self._cd(clonedir)) | ||
|
||
|
||
class Head(Refspec): | ||
def __init__(self): | ||
Refspec.__init__(self, 'HEAD') | ||
|
||
def clone(self, git_url, clonedir): | ||
opts = ['--depth', '1'] | ||
return (self._clone(git_url, clonedir, opts) + | ||
[run.Raw('&&')] + | ||
self._cd(clonedir)) | ||
|
||
|
||
def get_refspec_after_overrides(config, overrides): | ||
# mimic the behavior of the "install" task, where the "overrides" are | ||
# actually the defaults of that task. in other words, if none of "sha1", | ||
# "tag", or "branch" is specified by a "workunit" tasks, we will update | ||
# it with the information in the "workunit" sub-task nested in "overrides". | ||
overrides = copy.deepcopy(overrides.get('workunit', {})) | ||
refspecs = {'suite_sha1': Refspec, 'suite_branch': Branch, | ||
'sha1': Refspec, 'tag': Refspec, 'branch': Branch} | ||
if any(map(lambda i: i in config, refspecs.iterkeys())): | ||
for i in refspecs.iterkeys(): | ||
overrides.pop(i, None) | ||
misc.deep_merge(config, overrides) | ||
|
||
for spec, cls in refspecs.iteritems(): | ||
refspec = config.get(spec) | ||
if refspec: | ||
refspec = cls(refspec) | ||
break | ||
if refspec is None: | ||
refspec = Head() | ||
return refspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.