trial: always use abspath
No actual failure known, but using the abspath will prevent further problems when running a binary in its own run dir and passing trial paths to it. Adjust test expectations. Change-Id: Ia2ba876a42eef9122a92645edd1f28ddb56e6be3
This commit is contained in:
parent
e60df6961c
commit
e44a0cb0d9
|
@ -11,6 +11,6 @@ third
|
|||
None
|
||||
- test checksum verification
|
||||
- detect wrong checksum
|
||||
ok, got RuntimeError("Checksum mismatch for 'trial_test/invalid_checksum/file2' vs. 'trial_test/invalid_checksum/checksums.md5' line 2",)
|
||||
ok, got RuntimeError("Checksum mismatch for '[PATH]/trial_test/invalid_checksum/file2' vs. '[PATH]/trial_test/invalid_checksum/checksums.md5' line 2",)
|
||||
- detect missing file
|
||||
ok, got RuntimeError("File listed in checksums file but missing in trials dir: 'trial_test/missing_file/file2' vs. 'trial_test/missing_file/checksums.md5' line 2",)
|
||||
ok, got RuntimeError("File listed in checksums file but missing in trials dir: '[PATH]/trial_test/missing_file/file2' vs. '[PATH]/trial_test/missing_file/checksums.md5' line 2",)
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
/tmp/[^/]* [TMP]
|
||||
....-..-.._..-..-.. [TIMESTAMP]
|
||||
'[^']*/trial_test '[PATH]/trial_test
|
||||
|
|
|
@ -52,7 +52,7 @@ class Trial(log.Origin):
|
|||
return Trial(trials_dir.child(next_trial)).take()
|
||||
|
||||
def __init__(self, trial_dir):
|
||||
self.path = trial_dir
|
||||
self.path = os.path.abspath(trial_dir)
|
||||
self.set_name(os.path.basename(self.path))
|
||||
self.set_log_category(log.C_TST)
|
||||
self.dir = util.Dir(self.path)
|
||||
|
|
Loading…
Reference in New Issue