jenkins: fix trials-cleanup.sh: use 'taken' marker
trials-cleanup.sh was still using the old 'SEEN' marker and thus didn't work. In trial.py, make sure that *every* trial that is run is marked as taken, not only those discovered by Trial.next(). Change-Id: I8aa6b2eece5d43266a7c84e6b2974b8fe7f3cda1
This commit is contained in:
parent
930ac952aa
commit
506edbc869
|
@ -17,7 +17,7 @@ rm_trial() {
|
|||
trial_name="$(basename "$trial_dir")"
|
||||
echo "Removing: $(ls -ld "$trial_dir")"
|
||||
# ensure atomic removal, so that the gsm-tester doesn't take it as a
|
||||
# newly added dir (can happen when the 'SEEN' marker is removed first).
|
||||
# newly added dir (can happen when the 'taken' marker is removed first).
|
||||
mv "$trial_dir" "$trial_prep_dir/"
|
||||
rm -rf "$trial_prep_dir/$trial_name"
|
||||
}
|
||||
|
@ -25,6 +25,6 @@ rm_trial() {
|
|||
# keep the N newest test session dirs that have been started: find all that
|
||||
# have been started sorted by time, then discard all but the N newest ones.
|
||||
|
||||
for seen in $(ls -1t "$trial_rx_dir"/*/SEEN | tail -n +31); do
|
||||
for seen in $(ls -1t "$trial_rx_dir"/*/taken | tail -n +31); do
|
||||
rm_trial "$(dirname "$seen")"
|
||||
done
|
||||
|
|
|
@ -61,6 +61,7 @@ class Trial(log.Origin):
|
|||
|
||||
def __enter__(self):
|
||||
self.log('Trial start')
|
||||
self.take()
|
||||
super().__enter__()
|
||||
|
||||
def __exit__(self, *exc_info):
|
||||
|
|
Loading…
Reference in New Issue